blob: 4e8a420221e5f858c9c7e2906c6c876bb5277d15 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00002# From configure.in Revision: 79902 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004# Generated by GNU Autoconf 2.61 for python 2.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandl464432d2009-05-20 18:24:08 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Martin v. Löwiseba40652007-08-30 20:10:57 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Martin v. Löwiseba40652007-08-30 20:10:57 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000022 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000025else
Martin v. Löwiseba40652007-08-30 20:10:57 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
31
Skip Montanaro6dead952003-09-25 14:50:04 +000032
Martin v. Löwis11437992002-04-12 09:54:03 +000033
34
Martin v. Löwiseba40652007-08-30 20:10:57 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
49 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
53 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Martin v. Löwiseba40652007-08-30 20:10:57 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Martin v. Löwiseba40652007-08-30 20:10:57 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000069as_nl='
70'
Martin v. Löwiseba40652007-08-30 20:10:57 +000071IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Martin v. Löwiseba40652007-08-30 20:10:57 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Martin v. Löwiseba40652007-08-30 20:10:57 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000093 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +000094 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
115 fi
116done
Martin v. Löwiseba40652007-08-30 20:10:57 +0000117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000138echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +0000139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000164 if test $as_have_required = yes && (eval ":
Martin v. Löwiseba40652007-08-30 20:10:57 +0000165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Martin v. Löwiseba40652007-08-30 20:10:57 +0000247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Martin v. Löwiseba40652007-08-30 20:10:57 +0000268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Skip Montanaro89e975f2007-08-22 19:05:21 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaro89e975f2007-08-22 19:05:21 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Martin v. Löwiseba40652007-08-30 20:10:57 +0000351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
Martin v. Löwiseba40652007-08-30 20:10:57 +0000422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000456 chmod +x "$as_me.lineno" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Martin v. Löwiseba40652007-08-30 20:10:57 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000485
Martin v. Löwiseba40652007-08-30 20:10:57 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000498 mkdir conf$$.dir
Martin v. Löwiseba40652007-08-30 20:10:57 +0000499fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +0000511else
512 as_ln_s='cp -p'
513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Martin v. Löwiseba40652007-08-30 20:10:57 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000535 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +0000536 else
537 case $1 in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000538 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Martin v. Löwiseba40652007-08-30 20:10:57 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Martin v. Löwis174440b2008-10-03 08:59:41 +0000578PACKAGE_VERSION='2.7'
579PACKAGE_STRING='python 2.7'
Georg Brandl464432d2009-05-20 18:24:08 +0000580PACKAGE_BUGREPORT='http://bugs.python.org/'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000611#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000619ac_subst_vars='SHELL
Alexandre Vassalottia2db6872009-07-17 07:46:46 +0000620PATH_SEPARATOR
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
660ARCH_RUN_32BIT
Ronald Oussoren92919a62009-12-24 13:30:58 +0000661LIPO_32BIT_FLAGS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000662PYTHONFRAMEWORK
663PYTHONFRAMEWORKIDENTIFIER
664PYTHONFRAMEWORKDIR
665PYTHONFRAMEWORKPREFIX
666PYTHONFRAMEWORKINSTALLDIR
667FRAMEWORKINSTALLFIRST
668FRAMEWORKINSTALLLAST
669FRAMEWORKALTINSTALLFIRST
670FRAMEWORKALTINSTALLLAST
671FRAMEWORKUNIXTOOLSPREFIX
672MACHDEP
673SGI_ABI
674EXTRAPLATDIR
675EXTRAMACHDEPPATH
676CONFIGURE_MACOSX_DEPLOYMENT_TARGET
677EXPORT_MACOSX_DEPLOYMENT_TARGET
678CC
679CFLAGS
680LDFLAGS
681CPPFLAGS
682ac_ct_CC
683EXEEXT
684OBJEXT
685CXX
686MAINCC
687CPP
688GREP
689EGREP
690BUILDEXEEXT
691LIBRARY
692LDLIBRARY
693DLLLIBRARY
694BLDLIBRARY
695LDLIBRARYDIR
696INSTSONAME
697RUNSHARED
698LINKCC
699GNULD
700RANLIB
701AR
702ARFLAGS
703SVNVERSION
704INSTALL_PROGRAM
705INSTALL_SCRIPT
706INSTALL_DATA
707LN
708OPT
709BASECFLAGS
710UNIVERSAL_ARCH_FLAGS
711OTHER_LIBTOOL_OPT
712LIBTOOL_CRUFT
713SO
714LDSHARED
Ronald Oussoren75912852010-04-08 08:13:31 +0000715LDCXXSHARED
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000716BLDSHARED
717CCSHARED
718LINKFORSHARED
719CFLAGSFORSHARED
720SHLIBS
Benjamin Peterson1c335e62010-01-01 15:16:29 +0000721PKG_CONFIG
722LIBFFI_INCLUDEDIR
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000723USE_SIGNAL_MODULE
724SIGNAL_OBJS
725USE_THREAD_MODULE
726LDLAST
727THREADOBJ
728DLINCLDIR
729DYNLOADFILE
730MACHDEP_OBJS
731TRUE
732LIBOBJS
733HAVE_GETHOSTBYNAME_R_6_ARG
734HAVE_GETHOSTBYNAME_R_5_ARG
735HAVE_GETHOSTBYNAME_R_3_ARG
736HAVE_GETHOSTBYNAME_R
737HAVE_GETHOSTBYNAME
738LIBM
739LIBC
740UNICODE_OBJS
741THREADHEADERS
742SRCDIRS
743LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000744ac_subst_files=''
Martin v. Löwiseba40652007-08-30 20:10:57 +0000745 ac_precious_vars='build_alias
746host_alias
747target_alias
748CC
749CFLAGS
750LDFLAGS
751LIBS
752CPPFLAGS
753CPP'
754
Guido van Rossum627b2d71993-12-24 10:39:16 +0000755
Guido van Rossum7f43da71994-08-01 12:15:30 +0000756# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000757ac_init_help=
758ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000759# The variables have the same names as the options, with
760# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000761cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000762exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000763no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000764no_recursion=
765prefix=NONE
766program_prefix=NONE
767program_suffix=NONE
768program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000769silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000770site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000771srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000772verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000773x_includes=NONE
774x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000775
776# Installation directory options.
777# These are left unexpanded so users can "make install exec_prefix=/foo"
778# and all the variables that are supposed to be based on exec_prefix
779# by default will actually change.
780# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000781# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000782bindir='${exec_prefix}/bin'
783sbindir='${exec_prefix}/sbin'
784libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000785datarootdir='${prefix}/share'
786datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000787sysconfdir='${prefix}/etc'
788sharedstatedir='${prefix}/com'
789localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000790includedir='${prefix}/include'
791oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000792docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
793infodir='${datarootdir}/info'
794htmldir='${docdir}'
795dvidir='${docdir}'
796pdfdir='${docdir}'
797psdir='${docdir}'
798libdir='${exec_prefix}/lib'
799localedir='${datarootdir}/locale'
800mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000801
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000803ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000804for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000805do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000806 # If the previous option needs an argument, assign it.
807 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000808 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000809 ac_prev=
810 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000811 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000812
Martin v. Löwiseba40652007-08-30 20:10:57 +0000813 case $ac_option in
814 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
815 *) ac_optarg=yes ;;
816 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000817
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000818 # Accept the important Cygnus configure options, so we can diagnose typos.
819
Martin v. Löwiseba40652007-08-30 20:10:57 +0000820 case $ac_dashdash$ac_option in
821 --)
822 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000823
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000824 -bindir | --bindir | --bindi | --bind | --bin | --bi)
825 ac_prev=bindir ;;
826 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000827 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000828
829 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000830 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000831 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000832 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000833
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000834 -cache-file | --cache-file | --cache-fil | --cache-fi \
835 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
836 ac_prev=cache_file ;;
837 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
838 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000839 cache_file=$ac_optarg ;;
840
841 --config-cache | -C)
842 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000843
Martin v. Löwiseba40652007-08-30 20:10:57 +0000844 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000845 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000846 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000847 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000848
Martin v. Löwiseba40652007-08-30 20:10:57 +0000849 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
850 | --dataroo | --dataro | --datar)
851 ac_prev=datarootdir ;;
852 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
853 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
854 datarootdir=$ac_optarg ;;
855
Guido van Rossum7f43da71994-08-01 12:15:30 +0000856 -disable-* | --disable-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000857 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000858 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000859 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
860 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000861 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000862 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
863 eval enable_$ac_feature=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000864
865 -docdir | --docdir | --docdi | --doc | --do)
866 ac_prev=docdir ;;
867 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
868 docdir=$ac_optarg ;;
869
870 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
871 ac_prev=dvidir ;;
872 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
873 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874
875 -enable-* | --enable-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000876 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000877 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000878 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
879 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000880 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000881 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
882 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883
Guido van Rossum7f43da71994-08-01 12:15:30 +0000884 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
885 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
886 | --exec | --exe | --ex)
887 ac_prev=exec_prefix ;;
888 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
889 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
890 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000891 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892
893 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000894 # Obsolete; use --with-gas.
895 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000896
Martin v. Löwis11437992002-04-12 09:54:03 +0000897 -help | --help | --hel | --he | -h)
898 ac_init_help=long ;;
899 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
900 ac_init_help=recursive ;;
901 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
902 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903
904 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000905 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000906 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000907 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000908
Martin v. Löwiseba40652007-08-30 20:10:57 +0000909 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
910 ac_prev=htmldir ;;
911 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
912 | --ht=*)
913 htmldir=$ac_optarg ;;
914
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000915 -includedir | --includedir | --includedi | --included | --include \
916 | --includ | --inclu | --incl | --inc)
917 ac_prev=includedir ;;
918 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
919 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000920 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000921
922 -infodir | --infodir | --infodi | --infod | --info | --inf)
923 ac_prev=infodir ;;
924 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000925 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000926
927 -libdir | --libdir | --libdi | --libd)
928 ac_prev=libdir ;;
929 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000930 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000931
932 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
933 | --libexe | --libex | --libe)
934 ac_prev=libexecdir ;;
935 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
936 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938
Martin v. Löwiseba40652007-08-30 20:10:57 +0000939 -localedir | --localedir | --localedi | --localed | --locale)
940 ac_prev=localedir ;;
941 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
942 localedir=$ac_optarg ;;
943
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000944 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000945 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946 ac_prev=localstatedir ;;
947 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000948 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000949 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000950
951 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
952 ac_prev=mandir ;;
953 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000954 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000955
Guido van Rossum7f43da71994-08-01 12:15:30 +0000956 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000957 # Obsolete; use --without-fp.
958 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000959
960 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000961 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000962 no_create=yes ;;
963
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000964 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
965 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
966 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000967
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000968 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
969 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
970 | --oldin | --oldi | --old | --ol | --o)
971 ac_prev=oldincludedir ;;
972 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
973 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
974 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000975 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000976
Guido van Rossum7f43da71994-08-01 12:15:30 +0000977 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
978 ac_prev=prefix ;;
979 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000980 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000981
982 -program-prefix | --program-prefix | --program-prefi | --program-pref \
983 | --program-pre | --program-pr | --program-p)
984 ac_prev=program_prefix ;;
985 -program-prefix=* | --program-prefix=* | --program-prefi=* \
986 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000987 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988
989 -program-suffix | --program-suffix | --program-suffi | --program-suff \
990 | --program-suf | --program-su | --program-s)
991 ac_prev=program_suffix ;;
992 -program-suffix=* | --program-suffix=* | --program-suffi=* \
993 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000994 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000995
996 -program-transform-name | --program-transform-name \
997 | --program-transform-nam | --program-transform-na \
998 | --program-transform-n | --program-transform- \
999 | --program-transform | --program-transfor \
1000 | --program-transfo | --program-transf \
1001 | --program-trans | --program-tran \
1002 | --progr-tra | --program-tr | --program-t)
1003 ac_prev=program_transform_name ;;
1004 -program-transform-name=* | --program-transform-name=* \
1005 | --program-transform-nam=* | --program-transform-na=* \
1006 | --program-transform-n=* | --program-transform-=* \
1007 | --program-transform=* | --program-transfor=* \
1008 | --program-transfo=* | --program-transf=* \
1009 | --program-trans=* | --program-tran=* \
1010 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012
Martin v. Löwiseba40652007-08-30 20:10:57 +00001013 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1014 ac_prev=pdfdir ;;
1015 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1016 pdfdir=$ac_optarg ;;
1017
1018 -psdir | --psdir | --psdi | --psd | --ps)
1019 ac_prev=psdir ;;
1020 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1021 psdir=$ac_optarg ;;
1022
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1024 | -silent | --silent | --silen | --sile | --sil)
1025 silent=yes ;;
1026
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001027 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1028 ac_prev=sbindir ;;
1029 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1030 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001032
1033 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1034 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1035 | --sharedst | --shareds | --shared | --share | --shar \
1036 | --sha | --sh)
1037 ac_prev=sharedstatedir ;;
1038 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1039 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1040 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1041 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001043
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001044 -site | --site | --sit)
1045 ac_prev=site ;;
1046 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001048
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1050 ac_prev=srcdir ;;
1051 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001053
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1055 | --syscon | --sysco | --sysc | --sys | --sy)
1056 ac_prev=sysconfdir ;;
1057 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1058 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001060
Guido van Rossum7f43da71994-08-01 12:15:30 +00001061 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001063 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001065
1066 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1067 verbose=yes ;;
1068
Martin v. Löwis11437992002-04-12 09:54:03 +00001069 -version | --version | --versio | --versi | --vers | -V)
1070 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071
1072 -with-* | --with-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001073 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001074 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001075 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1076 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001078 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1079 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080
1081 -without-* | --without-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001082 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001083 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001084 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1085 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001086 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001087 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1088 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001090 --x)
1091 # Obsolete; use --with-x.
1092 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093
1094 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1095 | --x-incl | --x-inc | --x-in | --x-i)
1096 ac_prev=x_includes ;;
1097 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1098 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100
1101 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1102 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1103 ac_prev=x_libraries ;;
1104 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1105 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001108 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001109Try \`$0 --help' for more information." >&2
1110 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001111 ;;
1112
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 *=*)
1114 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1115 # Reject names that are not valid shell variable names.
1116 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001117 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001119 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 export $ac_envvar ;;
1121
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001122 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 # FIXME: should be removed in autoconf 3.0.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001124 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001125 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001126 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001127 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001128 ;;
1129
1130 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001131done
1132
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001135 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001136 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001137fi
1138
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001139# Be sure to have absolute directory names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001140for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1141 datadir sysconfdir sharedstatedir localstatedir includedir \
1142 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1143 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001144do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001145 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001146 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001147 [\\/$]* | ?:[\\/]* ) continue;;
1148 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001149 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001150 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001151 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001152done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001153
Martin v. Löwis11437992002-04-12 09:54:03 +00001154# There might be people who depend on the old broken behavior: `$host'
1155# used to hold the argument of --host etc.
1156# FIXME: To remove some day.
1157build=$build_alias
1158host=$host_alias
1159target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001160
Martin v. Löwis11437992002-04-12 09:54:03 +00001161# FIXME: To remove some day.
1162if test "x$host_alias" != x; then
1163 if test "x$build_alias" = x; then
1164 cross_compiling=maybe
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001165 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 +00001166 If a cross compiler is detected then cross compile mode will be used." >&2
1167 elif test "x$build_alias" != "x$host_alias"; then
1168 cross_compiling=yes
1169 fi
1170fi
1171
1172ac_tool_prefix=
1173test -n "$host_alias" && ac_tool_prefix=$host_alias-
1174
1175test "$silent" = yes && exec 6>/dev/null
1176
Guido van Rossum627b2d71993-12-24 10:39:16 +00001177
Martin v. Löwiseba40652007-08-30 20:10:57 +00001178ac_pwd=`pwd` && test -n "$ac_pwd" &&
1179ac_ls_di=`ls -di .` &&
1180ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001181 { echo "$as_me: error: Working directory cannot be determined" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001182 { (exit 1); exit 1; }; }
1183test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001184 { echo "$as_me: error: pwd does not report name of working directory" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001185 { (exit 1); exit 1; }; }
1186
1187
Guido van Rossum627b2d71993-12-24 10:39:16 +00001188# Find the source files, if location was not specified.
1189if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001191 # Try the directory containing this script, then the parent directory.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001192 ac_confdir=`$as_dirname -- "$0" ||
1193$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1194 X"$0" : 'X\(//\)[^/]' \| \
1195 X"$0" : 'X\(//\)$' \| \
1196 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1197echo X"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001198 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1199 s//\1/
1200 q
1201 }
1202 /^X\(\/\/\)[^/].*/{
1203 s//\1/
1204 q
1205 }
1206 /^X\(\/\/\)$/{
1207 s//\1/
1208 q
1209 }
1210 /^X\(\/\).*/{
1211 s//\1/
1212 q
1213 }
1214 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001215 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001216 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001217 srcdir=..
1218 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001219else
1220 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001221fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001222if test ! -r "$srcdir/$ac_unique_file"; then
1223 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001224 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001225 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001226fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001227ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1228ac_abs_confdir=`(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001229 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001230 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001231 pwd)`
1232# When building in place, set srcdir=.
1233if test "$ac_abs_confdir" = "$ac_pwd"; then
1234 srcdir=.
1235fi
1236# Remove unnecessary trailing slashes from srcdir.
1237# Double slashes in file names in object file debugging info
1238# mess up M-x gdb in Emacs.
1239case $srcdir in
1240*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1241esac
1242for ac_var in $ac_precious_vars; do
1243 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1244 eval ac_env_${ac_var}_value=\$${ac_var}
1245 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1246 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1247done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001248
Martin v. Löwis11437992002-04-12 09:54:03 +00001249#
1250# Report the --help message.
1251#
1252if test "$ac_init_help" = "long"; then
1253 # Omit some internal or obsolete options to make the list less imposing.
1254 # This message is too long to be a string in the A/UX 3.1 sh.
1255 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001256\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001257
1258Usage: $0 [OPTION]... [VAR=VALUE]...
1259
1260To assign environment variables (e.g., CC, CFLAGS...), specify them as
1261VAR=VALUE. See below for descriptions of some of the useful variables.
1262
1263Defaults for the options are specified in brackets.
1264
1265Configuration:
1266 -h, --help display this help and exit
1267 --help=short display options specific to this package
1268 --help=recursive display the short help of all the included packages
1269 -V, --version display version information and exit
1270 -q, --quiet, --silent do not print \`checking...' messages
1271 --cache-file=FILE cache test results in FILE [disabled]
1272 -C, --config-cache alias for \`--cache-file=config.cache'
1273 -n, --no-create do not create output files
1274 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1275
Martin v. Löwis11437992002-04-12 09:54:03 +00001276Installation directories:
1277 --prefix=PREFIX install architecture-independent files in PREFIX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001278 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001279 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001280 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001281
1282By default, \`make install' will install all the files in
1283\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1284an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1285for instance \`--prefix=\$HOME'.
1286
1287For better control, use the options below.
1288
1289Fine tuning of the installation directories:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001290 --bindir=DIR user executables [EPREFIX/bin]
1291 --sbindir=DIR system admin executables [EPREFIX/sbin]
1292 --libexecdir=DIR program executables [EPREFIX/libexec]
1293 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1294 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1295 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1296 --libdir=DIR object code libraries [EPREFIX/lib]
1297 --includedir=DIR C header files [PREFIX/include]
1298 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1299 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1300 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1301 --infodir=DIR info documentation [DATAROOTDIR/info]
1302 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1303 --mandir=DIR man documentation [DATAROOTDIR/man]
1304 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1305 --htmldir=DIR html documentation [DOCDIR]
1306 --dvidir=DIR dvi documentation [DOCDIR]
1307 --pdfdir=DIR pdf documentation [DOCDIR]
1308 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001309_ACEOF
1310
1311 cat <<\_ACEOF
1312_ACEOF
1313fi
1314
1315if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001316 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001317 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001318 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001319 cat <<\_ACEOF
1320
1321Optional Features:
1322 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1323 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001324 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001325 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001326 --enable-framework[=INSTALLDIR]
1327 Build (MacOSX|Darwin) framework
1328 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001329 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001330 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1331 --enable-ipv6 Enable ipv6 (with ipv4) support
1332 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001333 --enable-big-digits[=BITS]
1334 use big digits for Python longs [BITS=30]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001335 --enable-unicode[=ucs[24]]
1336 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001337
1338Optional Packages:
1339 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1340 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001341 --with-universal-archs=ARCH
1342 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001343 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001344 --with-framework-name=FRAMEWORK
1345 specify an alternate name of the framework built
1346 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001347 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001348 --with-cxx-main=<compiler>
1349 compile main() and link python executable with C++
1350 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001351 --with-suffix=.exe set executable suffix
1352 --with-pydebug build with Py_DEBUG defined
1353 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001354 --with-system-expat build pyexpat module using an installed expat
1355 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001356 --with-system-ffi build _ctypes module using an installed ffi library
Benjamin Peterson867475c2009-04-29 20:36:25 +00001357 --with-dbmliborder=db1:db2:...
1358 order to check db backends for dbm. Valid value is a
1359 colon separated string with the backend names
1360 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001361 --with-signal-module disable/enable signal module
1362 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1363 --with(out)-threads[=DIRECTORY]
1364 disable/enable thread support
1365 --with(out)-thread[=DIRECTORY]
1366 deprecated; use --with(out)-threads
1367 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001368 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001369 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001370 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001371 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001372 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001373 --with-fpectl enable SIGFPE catching
1374 --with-libm=STRING math library
1375 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001376
1377Some influential environment variables:
1378 CC C compiler command
1379 CFLAGS C compiler flags
1380 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1381 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001382 LIBS libraries to pass to the linker, e.g. -l<library>
1383 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1384 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001385 CPP C preprocessor
1386
1387Use these variables to override the choices made by `configure' or to help
1388it to find libraries and programs with nonstandard names/locations.
1389
Georg Brandl464432d2009-05-20 18:24:08 +00001390Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001391_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001392ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001393fi
1394
1395if test "$ac_init_help" = "recursive"; then
1396 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001397 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001398 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001399 ac_builddir=.
1400
Martin v. Löwiseba40652007-08-30 20:10:57 +00001401case "$ac_dir" in
1402.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1403*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001404 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001405 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001406 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001407 case $ac_top_builddir_sub in
1408 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1409 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1410 esac ;;
1411esac
1412ac_abs_top_builddir=$ac_pwd
1413ac_abs_builddir=$ac_pwd$ac_dir_suffix
1414# for backward compatibility:
1415ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001416
1417case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001418 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001419 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001420 ac_top_srcdir=$ac_top_builddir_sub
1421 ac_abs_top_srcdir=$ac_pwd ;;
1422 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001423 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001424 ac_top_srcdir=$srcdir
1425 ac_abs_top_srcdir=$srcdir ;;
1426 *) # Relative name.
1427 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1428 ac_top_srcdir=$ac_top_build_prefix$srcdir
1429 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001430esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001431ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001432
Martin v. Löwiseba40652007-08-30 20:10:57 +00001433 cd "$ac_dir" || { ac_status=$?; continue; }
1434 # Check for guested configure.
1435 if test -f "$ac_srcdir/configure.gnu"; then
1436 echo &&
1437 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1438 elif test -f "$ac_srcdir/configure"; then
1439 echo &&
1440 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001441 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001442 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001443 fi || ac_status=$?
1444 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001445 done
1446fi
1447
Martin v. Löwiseba40652007-08-30 20:10:57 +00001448test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001449if $ac_init_version; then
1450 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001451python configure 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001452generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001453
Martin v. Löwiseba40652007-08-30 20:10:57 +00001454Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014552002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001456This configure script is free software; the Free Software Foundation
1457gives unlimited permission to copy, distribute and modify it.
1458_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001459 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001461cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001462This file contains any messages produced by compilers while
1463running configure, to aid debugging if configure makes a mistake.
1464
Martin v. Löwis174440b2008-10-03 08:59:41 +00001465It was created by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001466generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001467
1468 $ $0 $@
1469
1470_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001471exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001472{
1473cat <<_ASUNAME
1474## --------- ##
1475## Platform. ##
1476## --------- ##
1477
1478hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1479uname -m = `(uname -m) 2>/dev/null || echo unknown`
1480uname -r = `(uname -r) 2>/dev/null || echo unknown`
1481uname -s = `(uname -s) 2>/dev/null || echo unknown`
1482uname -v = `(uname -v) 2>/dev/null || echo unknown`
1483
1484/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1485/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1486
1487/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1488/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1489/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001490/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001491/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1492/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1493/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1494
1495_ASUNAME
1496
1497as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1498for as_dir in $PATH
1499do
1500 IFS=$as_save_IFS
1501 test -z "$as_dir" && as_dir=.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001502 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001503done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001504IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001505
1506} >&5
1507
1508cat >&5 <<_ACEOF
1509
1510
1511## ----------- ##
1512## Core tests. ##
1513## ----------- ##
1514
1515_ACEOF
1516
1517
1518# Keep a trace of the command line.
1519# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001520# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001521# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001522# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001523ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001524ac_configure_args0=
1525ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001526ac_must_keep_next=false
1527for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001528do
Skip Montanaro6dead952003-09-25 14:50:04 +00001529 for ac_arg
1530 do
1531 case $ac_arg in
1532 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1533 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1534 | -silent | --silent | --silen | --sile | --sil)
1535 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001536 *\'*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001537 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001538 esac
1539 case $ac_pass in
1540 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1541 2)
1542 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1543 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001544 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001545 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001546 case $ac_arg in
1547 *=* | --config-cache | -C | -disable-* | --disable-* \
1548 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1549 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1550 | -with-* | --with-* | -without-* | --without-* | --x)
1551 case "$ac_configure_args0 " in
1552 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1553 esac
1554 ;;
1555 -* ) ac_must_keep_next=true ;;
1556 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001557 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001558 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001559 ;;
1560 esac
1561 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001562done
Skip Montanaro6dead952003-09-25 14:50:04 +00001563$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1564$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 +00001565
1566# When interrupted or exit'd, cleanup temporary files, and complete
1567# config.log. We remove comments because anyway the quotes in there
1568# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001569# WARNING: Use '\'' to represent an apostrophe within the trap.
1570# 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 +00001571trap 'exit_status=$?
1572 # Save into config.log some information that might help in debugging.
1573 {
1574 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001575
Martin v. Löwis11437992002-04-12 09:54:03 +00001576 cat <<\_ASBOX
1577## ---------------- ##
1578## Cache variables. ##
1579## ---------------- ##
1580_ASBOX
1581 echo
1582 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001583(
1584 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1585 eval ac_val=\$$ac_var
1586 case $ac_val in #(
1587 *${as_nl}*)
1588 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001589 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1590echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001591 esac
1592 case $ac_var in #(
1593 _ | IFS | as_nl) ;; #(
1594 *) $as_unset $ac_var ;;
1595 esac ;;
1596 esac
1597 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001598 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001599 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1600 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001601 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001602 "s/'\''/'\''\\\\'\'''\''/g;
1603 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1604 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001605 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001606 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001607 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001608 esac |
1609 sort
1610)
Martin v. Löwis11437992002-04-12 09:54:03 +00001611 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001612
1613 cat <<\_ASBOX
1614## ----------------- ##
1615## Output variables. ##
1616## ----------------- ##
1617_ASBOX
1618 echo
1619 for ac_var in $ac_subst_vars
1620 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001621 eval ac_val=\$$ac_var
1622 case $ac_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001623 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001624 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001625 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001626 done | sort
1627 echo
1628
1629 if test -n "$ac_subst_files"; then
1630 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001631## ------------------- ##
1632## File substitutions. ##
1633## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001634_ASBOX
1635 echo
1636 for ac_var in $ac_subst_files
1637 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001638 eval ac_val=\$$ac_var
1639 case $ac_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001640 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001641 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001642 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001643 done | sort
1644 echo
1645 fi
1646
Martin v. Löwis11437992002-04-12 09:54:03 +00001647 if test -s confdefs.h; then
1648 cat <<\_ASBOX
1649## ----------- ##
1650## confdefs.h. ##
1651## ----------- ##
1652_ASBOX
1653 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001654 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001655 echo
1656 fi
1657 test "$ac_signal" != 0 &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001658 echo "$as_me: caught signal $ac_signal"
1659 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001660 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001661 rm -f core *.core core.conftest.* &&
1662 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001663 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001664' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001665for ac_signal in 1 2 13 15; do
1666 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1667done
1668ac_signal=0
1669
1670# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001671rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001672
1673# Predefined preprocessor variables.
1674
1675cat >>confdefs.h <<_ACEOF
1676#define PACKAGE_NAME "$PACKAGE_NAME"
1677_ACEOF
1678
1679
1680cat >>confdefs.h <<_ACEOF
1681#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1682_ACEOF
1683
1684
1685cat >>confdefs.h <<_ACEOF
1686#define PACKAGE_VERSION "$PACKAGE_VERSION"
1687_ACEOF
1688
1689
1690cat >>confdefs.h <<_ACEOF
1691#define PACKAGE_STRING "$PACKAGE_STRING"
1692_ACEOF
1693
1694
1695cat >>confdefs.h <<_ACEOF
1696#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1697_ACEOF
1698
1699
1700# Let the site file select an alternate cache file if it wants to.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001701# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001702if test -n "$CONFIG_SITE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001703 set x "$CONFIG_SITE"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001704elif test "x$prefix" != xNONE; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001705 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001706else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001707 set x "$ac_default_prefix/share/config.site" \
1708 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001709fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001710shift
1711for ac_site_file
Martin v. Löwiseba40652007-08-30 20:10:57 +00001712do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001713 if test -r "$ac_site_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001714 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1715echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001716 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001717 . "$ac_site_file"
1718 fi
1719done
1720
1721if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001722 # Some versions of bash will fail to source /dev/null (special
1723 # files actually), so we avoid doing that.
1724 if test -f "$cache_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001725 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1726echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001727 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001728 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1729 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001730 esac
1731 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001732else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001733 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1734echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001735 >$cache_file
1736fi
1737
1738# Check that the precious variables saved in the cache have kept the same
1739# value.
1740ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001741for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001742 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1743 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001744 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1745 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001746 case $ac_old_set,$ac_new_set in
1747 set,)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001748 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1749echo "$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 +00001750 ac_cache_corrupted=: ;;
1751 ,set)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001752 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1753echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001754 ac_cache_corrupted=: ;;
1755 ,);;
1756 *)
1757 if test "x$ac_old_val" != "x$ac_new_val"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001758 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1759echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1760 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1761echo "$as_me: former value: $ac_old_val" >&2;}
1762 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1763echo "$as_me: current value: $ac_new_val" >&2;}
1764 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001765 fi;;
1766 esac
1767 # Pass precious variables to config.status.
1768 if test "$ac_new_set" = set; then
1769 case $ac_new_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001770 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001771 *) ac_arg=$ac_var=$ac_new_val ;;
1772 esac
1773 case " $ac_configure_args " in
1774 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1775 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1776 esac
1777 fi
1778done
1779if $ac_cache_corrupted; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001780 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1781echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1782 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1783echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001784 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001785fi
1786
Martin v. Löwiseba40652007-08-30 20:10:57 +00001787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
Guido van Rossum7f43da71994-08-01 12:15:30 +00001811ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001812ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001813ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1814ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1815ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001816
Guido van Rossum627b2d71993-12-24 10:39:16 +00001817
Michael W. Hudson54241132001-12-07 15:38:26 +00001818
Martin v. Löwiseba40652007-08-30 20:10:57 +00001819ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001820
1821
Martin v. Löwis11437992002-04-12 09:54:03 +00001822
Georg Brandlbcd64a32009-03-31 21:45:18 +00001823if test "$prefix" != "/"; then
1824 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1825fi
1826
1827
Martin v. Löwis11437992002-04-12 09:54:03 +00001828
1829
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001830
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001831
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001832# We don't use PACKAGE_ variables, and they cause conflicts
1833# with other autoconf-based packages that include Python.h
1834grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1835rm confdefs.h
1836mv confdefs.h.new confdefs.h
1837
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001838
Martin v. Löwis174440b2008-10-03 08:59:41 +00001839VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001840
Martin v. Löwis1142de32002-03-29 16:28:31 +00001841
1842SOVERSION=1.0
1843
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001844# The later defininition of _XOPEN_SOURCE disables certain features
1845# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1846
1847cat >>confdefs.h <<\_ACEOF
1848#define _GNU_SOURCE 1
1849_ACEOF
1850
1851
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001852# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1853# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1854# them.
1855
1856cat >>confdefs.h <<\_ACEOF
1857#define _NETBSD_SOURCE 1
1858_ACEOF
1859
1860
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001861# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1862# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1863# them.
1864
1865cat >>confdefs.h <<\_ACEOF
1866#define __BSD_VISIBLE 1
1867_ACEOF
1868
1869
Martin v. Löwisd6320502004-08-12 13:45:08 +00001870# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1871# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1872
1873cat >>confdefs.h <<\_ACEOF
1874#define _BSD_TYPES 1
1875_ACEOF
1876
1877
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001878# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1879# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1880# them.
1881
1882cat >>confdefs.h <<\_ACEOF
1883#define _DARWIN_C_SOURCE 1
1884_ACEOF
1885
1886
1887
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001888define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001889
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001890# Arguments passed to configure.
1891
1892CONFIG_ARGS="$ac_configure_args"
1893
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00001894{ echo "$as_me:$LINENO: checking for --enable-universalsdk" >&5
1895echo $ECHO_N "checking for --enable-universalsdk... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001896# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001897if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001898 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001899 case $enableval in
1900 yes)
1901 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00001902 if test ! -d "${enableval}"
1903 then
1904 enableval=/
1905 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001906 ;;
1907 esac
1908 case $enableval in
1909 no)
1910 UNIVERSALSDK=
1911 enable_universalsdk=
1912 ;;
1913 *)
1914 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00001915 if test ! -d "${UNIVERSALSDK}"
1916 then
1917 { { echo "$as_me:$LINENO: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&5
1918echo "$as_me: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&2;}
1919 { (exit 1); exit 1; }; }
1920 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001921 ;;
1922 esac
1923
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00001924
Ronald Oussoren988117f2006-04-29 11:31:35 +00001925else
1926
1927 UNIVERSALSDK=
1928 enable_universalsdk=
1929
Martin v. Löwiseba40652007-08-30 20:10:57 +00001930fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001931
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00001932if test -n "${UNIVERSALSDK}"
1933then
1934 { echo "$as_me:$LINENO: result: ${UNIVERSALSDK}" >&5
1935echo "${ECHO_T}${UNIVERSALSDK}" >&6; }
1936else
1937 { echo "$as_me:$LINENO: result: no" >&5
1938echo "${ECHO_T}no" >&6; }
1939fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001940
Martin v. Löwiseba40652007-08-30 20:10:57 +00001941
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00001942
1943
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001944UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00001945
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001946{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1947echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001948
1949# Check whether --with-universal-archs was given.
1950if test "${with_universal_archs+set}" = set; then
1951 withval=$with_universal_archs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001952 { echo "$as_me:$LINENO: result: $withval" >&5
1953echo "${ECHO_T}$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001954 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00001955 if test "${enable_universalsdk}" ; then
1956 :
1957 else
1958 { { echo "$as_me:$LINENO: error: --with-universal-archs without --enable-universalsdk. See Mac/README" >&5
1959echo "$as_me: error: --with-universal-archs without --enable-universalsdk. See Mac/README" >&2;}
1960 { (exit 1); exit 1; }; }
1961 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001962
1963else
1964
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001965 { echo "$as_me:$LINENO: result: 32-bit" >&5
1966echo "${ECHO_T}32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001967
1968fi
1969
1970
1971
1972
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001973
1974# Check whether --with-framework-name was given.
1975if test "${with_framework_name+set}" = set; then
1976 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00001977 if test "${enable_framework}"; then
1978 :
1979 else
1980 { { echo "$as_me:$LINENO: error: --with-framework-name without --enable-framework. See Mac/README" >&5
1981echo "$as_me: error: --with-framework-name without --enable-framework. See Mac/README" >&2;}
1982 { (exit 1); exit 1; }; }
1983 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001984 PYTHONFRAMEWORK=${withval}
1985 PYTHONFRAMEWORKDIR=${withval}.framework
1986 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1987
1988else
1989
1990 PYTHONFRAMEWORK=Python
1991 PYTHONFRAMEWORKDIR=Python.framework
1992 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1993
1994fi
1995
Martin v. Löwiseba40652007-08-30 20:10:57 +00001996# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001997if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001998 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001999 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002000 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002001 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002002 esac
2003 case $enableval in
2004 no)
2005 PYTHONFRAMEWORK=
2006 PYTHONFRAMEWORKDIR=no-framework
2007 PYTHONFRAMEWORKPREFIX=
2008 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002009 FRAMEWORKINSTALLFIRST=
2010 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002011 FRAMEWORKALTINSTALLFIRST=
2012 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002013 if test "x${prefix}" = "xNONE"; then
2014 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2015 else
2016 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2017 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002018 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002019 ;;
2020 *)
2021 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00002022 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002023 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002024 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002025 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2026 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002027
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002028 if test "x${prefix}" = "xNONE" ; then
2029 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2030 else
2031 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2032 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002033 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00002034
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002035 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00002036 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00002037 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002038
Martin v. Löwiseba40652007-08-30 20:10:57 +00002039 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002040
Martin v. Löwiseba40652007-08-30 20:10:57 +00002041 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002042
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002043 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2044
2045 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2046
Jack Jansene578a632001-08-15 01:27:14 +00002047 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002048
Guido van Rossum563e7081996-09-10 18:20:48 +00002049else
Martin v. Löwis11437992002-04-12 09:54:03 +00002050
Jack Jansene578a632001-08-15 01:27:14 +00002051 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002052 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002053 PYTHONFRAMEWORKPREFIX=
2054 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002055 FRAMEWORKINSTALLFIRST=
2056 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002057 FRAMEWORKALTINSTALLFIRST=
2058 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002059 if test "x${prefix}" = "xNONE" ; then
2060 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2061 else
2062 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2063 fi
Jack Jansene578a632001-08-15 01:27:14 +00002064 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002065
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002066
Martin v. Löwiseba40652007-08-30 20:10:57 +00002067fi
2068
Michael W. Hudson54241132001-12-07 15:38:26 +00002069
2070
2071
2072
Jack Jansene578a632001-08-15 01:27:14 +00002073
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002074
2075
Ronald Oussoren5b787322006-06-06 19:50:24 +00002076
2077
2078
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002079
Jack Jansene578a632001-08-15 01:27:14 +00002080##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002081## AC_HELP_STRING(--with-dyld,
2082## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002083##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002084# Set name for machine-dependent library files
2085
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002086{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2087echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002088if test -z "$MACHDEP"
2089then
Guido van Rossum563e7081996-09-10 18:20:48 +00002090 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00002091 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002092 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002093 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002094 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002095 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002096 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002097 ac_md_system=`echo $ac_sys_system |
2098 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2099 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002100 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002101 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002102
Guido van Rossum07397971997-04-29 21:49:50 +00002103 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002104 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002105 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002106 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002107 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002108 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002109 esac
2110fi
Guido van Rossum91922671997-10-09 20:24:13 +00002111
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002112# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2113# disable features if it is defined, without any means to access these
2114# features as extensions. For these systems, we skip the definition of
2115# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2116# some feature, make sure there is no alternative way to access this
2117# feature. Also, when using wildcards, make sure you have verified the
2118# need for not defining _XOPEN_SOURCE on all systems matching the
2119# wildcard, and that the wildcard does not include future systems
2120# (which may remove their limitations).
2121case $ac_sys_system/$ac_sys_release in
2122 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2123 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002124 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00002125 # In addition, Stefan Krah confirms that issue #1244610 exists through
2126 # OpenBSD 4.6, but is fixed in 4.7.
2127 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002128 define_xopen_source=no
2129 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2130 # also defined. This can be overridden by defining _BSD_SOURCE
2131 # As this has a different meaning on Linux, only define it on OpenBSD
2132
2133cat >>confdefs.h <<\_ACEOF
2134#define _BSD_SOURCE 1
2135_ACEOF
2136
2137 ;;
Martin v. Löwis7875ef62010-02-15 21:41:12 +00002138 OpenBSD/4.[789])
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00002139 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2140 # also defined. This can be overridden by defining _BSD_SOURCE
2141 # As this has a different meaning on Linux, only define it on OpenBSD
2142
2143cat >>confdefs.h <<\_ACEOF
2144#define _BSD_SOURCE 1
2145_ACEOF
2146
2147 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002148 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2149 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2150 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00002151 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 +00002152 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002153 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2154 # of union __?sigval. Reported by Stuart Bishop.
2155 SunOS/5.6)
2156 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002157 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2158 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002159 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002160 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002161 define_xopen_source=no;;
2162 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002163 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002164 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002165 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00002166 # On FreeBSD 4, the math functions C89 does not cover are never defined
2167 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2168 FreeBSD/4.*)
2169 define_xopen_source=no;;
2170 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2171 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2172 # identifies itself as Darwin/7.*
2173 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2174 # disables platform specific features beyond repair.
2175 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2176 # has no effect, don't bother defining them
2177 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002178 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00002179 Darwin/1[0-9].*)
2180 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002181 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2182 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2183 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002184 AIX/4)
2185 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002186 AIX/5)
2187 if test `uname -r` -eq 1; then
2188 define_xopen_source=no
2189 fi
2190 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002191 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2192 # defining NI_NUMERICHOST.
2193 QNX/6.3.2)
2194 define_xopen_source=no
2195 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002196
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002197esac
2198
2199if test $define_xopen_source = yes
2200then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002201 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2202 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002203 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2204 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002205 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002206 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002207
2208cat >>confdefs.h <<\_ACEOF
2209#define _XOPEN_SOURCE 500
2210_ACEOF
2211
2212 ;;
2213 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002214
2215cat >>confdefs.h <<\_ACEOF
2216#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002217_ACEOF
2218
Skip Montanarof0d5f792004-08-15 14:08:23 +00002219 ;;
2220 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002221
2222 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2223 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2224 # several APIs are not declared. Since this is also needed in some
2225 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002226 # except for Solaris 10, where it must not be defined,
2227 # as it implies XPG4.2
2228 case $ac_sys_system/$ac_sys_release in
2229 SunOS/5.10)
2230 ;;
2231 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002232
2233cat >>confdefs.h <<\_ACEOF
2234#define _XOPEN_SOURCE_EXTENDED 1
2235_ACEOF
2236
Martin v. Löwis7dece662005-11-26 11:38:24 +00002237 ;;
2238 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002239
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002240
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002241cat >>confdefs.h <<\_ACEOF
2242#define _POSIX_C_SOURCE 200112L
2243_ACEOF
2244
2245
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002246fi
2247
Guido van Rossum91922671997-10-09 20:24:13 +00002248#
2249# SGI compilers allow the specification of the both the ABI and the
2250# ISA on the command line. Depending on the values of these switches,
2251# different and often incompatable code will be generated.
2252#
2253# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2254# thus supply support for various ABI/ISA combinations. The MACHDEP
2255# variable is also adjusted.
2256#
2257
2258if test ! -z "$SGI_ABI"
2259then
2260 CC="cc $SGI_ABI"
2261 LDFLAGS="$SGI_ABI $LDFLAGS"
2262 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2263fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002264{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2265echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002266
Jack Jansen83f898c2002-12-30 22:23:40 +00002267# And add extra plat-mac for darwin
2268
Jack Jansen7b59b422003-03-17 15:44:10 +00002269
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002270{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2271echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002272if test -z "$EXTRAPLATDIR"
2273then
2274 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002275 darwin)
2276 EXTRAPLATDIR="\$(PLATMACDIRS)"
2277 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2278 ;;
2279 *)
2280 EXTRAPLATDIR=""
2281 EXTRAMACHDEPPATH=""
2282 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002283 esac
2284fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002285{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2286echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002287
Jack Jansen6b08a402004-06-03 12:41:45 +00002288# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2289# it may influence the way we can build extensions, so distutils
2290# needs to check it
2291
Ronald Oussoren988117f2006-04-29 11:31:35 +00002292
Jack Jansen6b08a402004-06-03 12:41:45 +00002293CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002294EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002295
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002296{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2297echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002298ac_sys_machine=`uname -m`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002299{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2300echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002301
Guido van Rossum627b2d71993-12-24 10:39:16 +00002302# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002303
2304# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2305# for debug/optimization stuff. BASECFLAGS is for flags that are required
2306# just to get things to compile and link. Users are free to override OPT
2307# when running configure or make. The build should not break if they do.
2308# BASECFLAGS should generally not be messed with, however.
2309
2310# XXX shouldn't some/most/all of this code be merged with the stuff later
2311# on that fiddles with OPT and BASECFLAGS?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002312{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2313echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002314
Martin v. Löwiseba40652007-08-30 20:10:57 +00002315# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002316if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002317 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002318 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00002319 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002320 without_gcc=yes;;
2321 yes) CC=gcc
2322 without_gcc=no;;
2323 *) CC=$withval
2324 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002325 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002326else
Martin v. Löwis11437992002-04-12 09:54:03 +00002327
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002328 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002329 AIX*) CC=cc_r
2330 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002331 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002332 case $BE_HOST_CPU in
2333 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002334 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002335 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002336 BASECFLAGS="$BASECFLAGS -export pragma"
2337 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002338 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002339 ;;
2340 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002341 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002342 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002343 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002344 ;;
2345 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002346 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2347echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002348 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002349 ;;
2350 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002351 AR="\$(srcdir)/Modules/ar_beos"
2352 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002353 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002354 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002355 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002356fi
2357
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002358{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2359echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002360
Guido van Rossum8b131c51995-03-09 14:10:13 +00002361# If the user switches compilers, we can't believe the cache
2362if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2363then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002364 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002365(it is also a good idea to do 'make clean' before compiling)" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002366echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002367(it is also a good idea to do 'make clean' before compiling)" >&2;}
2368 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002369fi
2370
Victor Stinner6cbf90f2010-03-25 00:21:53 +00002371save_CFLAGS=$CFLAGS
Martin v. Löwis11437992002-04-12 09:54:03 +00002372ac_ext=c
2373ac_cpp='$CPP $CPPFLAGS'
2374ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2375ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2376ac_compiler_gnu=$ac_cv_c_compiler_gnu
2377if test -n "$ac_tool_prefix"; then
2378 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2379set dummy ${ac_tool_prefix}gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002380{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2381echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002382if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002383 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002384else
2385 if test -n "$CC"; then
2386 ac_cv_prog_CC="$CC" # Let the user override the test.
2387else
Martin v. Löwis11437992002-04-12 09:54:03 +00002388as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2389for as_dir in $PATH
2390do
2391 IFS=$as_save_IFS
2392 test -z "$as_dir" && as_dir=.
2393 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002394 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 +00002395 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002396 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002397 break 2
2398 fi
2399done
2400done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002401IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002402
Jack Jansendd19cf82001-12-06 22:36:17 +00002403fi
2404fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002405CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002406if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002407 { echo "$as_me:$LINENO: result: $CC" >&5
2408echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002409else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002410 { echo "$as_me:$LINENO: result: no" >&5
2411echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002412fi
2413
Martin v. Löwiseba40652007-08-30 20:10:57 +00002414
Martin v. Löwis11437992002-04-12 09:54:03 +00002415fi
2416if test -z "$ac_cv_prog_CC"; then
2417 ac_ct_CC=$CC
2418 # Extract the first word of "gcc", so it can be a program name with args.
2419set dummy gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002420{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2421echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002422if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002423 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002424else
2425 if test -n "$ac_ct_CC"; then
2426 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2427else
2428as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2429for as_dir in $PATH
2430do
2431 IFS=$as_save_IFS
2432 test -z "$as_dir" && as_dir=.
2433 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002434 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 +00002435 ac_cv_prog_ac_ct_CC="gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002436 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002437 break 2
2438 fi
2439done
2440done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002441IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002442
2443fi
2444fi
2445ac_ct_CC=$ac_cv_prog_ac_ct_CC
2446if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002447 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2448echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002449else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002450 { echo "$as_me:$LINENO: result: no" >&5
2451echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002452fi
2453
Martin v. Löwiseba40652007-08-30 20:10:57 +00002454 if test "x$ac_ct_CC" = x; then
2455 CC=""
2456 else
2457 case $cross_compiling:$ac_tool_warned in
2458yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002459{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2460whose name does not start with the host triplet. If you think this
2461configuration is useful to you, please write to autoconf@gnu.org." >&5
2462echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2463whose name does not start with the host triplet. If you think this
2464configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002465ac_tool_warned=yes ;;
2466esac
2467 CC=$ac_ct_CC
2468 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002469else
2470 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002471fi
2472
Jack Jansendd19cf82001-12-06 22:36:17 +00002473if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002474 if test -n "$ac_tool_prefix"; then
2475 # 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 +00002476set dummy ${ac_tool_prefix}cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002477{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2478echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002479if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002480 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002481else
2482 if test -n "$CC"; then
2483 ac_cv_prog_CC="$CC" # Let the user override the test.
2484else
Martin v. Löwis11437992002-04-12 09:54:03 +00002485as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2486for as_dir in $PATH
2487do
2488 IFS=$as_save_IFS
2489 test -z "$as_dir" && as_dir=.
2490 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002491 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 +00002492 ac_cv_prog_CC="${ac_tool_prefix}cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002493 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002494 break 2
2495 fi
2496done
2497done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002498IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002499
2500fi
2501fi
2502CC=$ac_cv_prog_CC
2503if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002504 { echo "$as_me:$LINENO: result: $CC" >&5
2505echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002506else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002507 { echo "$as_me:$LINENO: result: no" >&5
2508echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002509fi
2510
Martin v. Löwiseba40652007-08-30 20:10:57 +00002511
Martin v. Löwis11437992002-04-12 09:54:03 +00002512 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002513fi
2514if test -z "$CC"; then
2515 # Extract the first word of "cc", so it can be a program name with args.
2516set dummy cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002517{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2518echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002519if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002520 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002521else
2522 if test -n "$CC"; then
2523 ac_cv_prog_CC="$CC" # Let the user override the test.
2524else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002525 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002526as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2527for as_dir in $PATH
2528do
2529 IFS=$as_save_IFS
2530 test -z "$as_dir" && as_dir=.
2531 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002532 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 +00002533 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2534 ac_prog_rejected=yes
2535 continue
2536 fi
2537 ac_cv_prog_CC="cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002538 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002539 break 2
2540 fi
2541done
2542done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002543IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002544
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002545if test $ac_prog_rejected = yes; then
2546 # We found a bogon in the path, so make sure we never use it.
2547 set dummy $ac_cv_prog_CC
2548 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002549 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002550 # We chose a different compiler from the bogus one.
2551 # However, it has the same basename, so the bogon will be chosen
2552 # first if we set CC to just the basename; use the full file name.
2553 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002554 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002555 fi
2556fi
2557fi
2558fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002559CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002560if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002561 { echo "$as_me:$LINENO: result: $CC" >&5
2562echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002563else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002564 { echo "$as_me:$LINENO: result: no" >&5
2565echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002566fi
2567
Martin v. Löwiseba40652007-08-30 20:10:57 +00002568
Martin v. Löwis11437992002-04-12 09:54:03 +00002569fi
2570if test -z "$CC"; then
2571 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002572 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002573 do
2574 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2575set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002576{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2577echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002578if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002579 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002580else
2581 if test -n "$CC"; then
2582 ac_cv_prog_CC="$CC" # Let the user override the test.
2583else
Martin v. Löwis11437992002-04-12 09:54:03 +00002584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2585for as_dir in $PATH
2586do
2587 IFS=$as_save_IFS
2588 test -z "$as_dir" && as_dir=.
2589 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002590 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 +00002591 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002592 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002593 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002594 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002595done
2596done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002597IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002598
2599fi
2600fi
2601CC=$ac_cv_prog_CC
2602if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002603 { echo "$as_me:$LINENO: result: $CC" >&5
2604echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002605else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002606 { echo "$as_me:$LINENO: result: no" >&5
2607echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002608fi
2609
Martin v. Löwiseba40652007-08-30 20:10:57 +00002610
Martin v. Löwis11437992002-04-12 09:54:03 +00002611 test -n "$CC" && break
2612 done
2613fi
2614if test -z "$CC"; then
2615 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002616 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002617do
2618 # Extract the first word of "$ac_prog", so it can be a program name with args.
2619set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002620{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2621echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002622if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002623 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002624else
2625 if test -n "$ac_ct_CC"; then
2626 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2627else
2628as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2629for as_dir in $PATH
2630do
2631 IFS=$as_save_IFS
2632 test -z "$as_dir" && as_dir=.
2633 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002634 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 +00002635 ac_cv_prog_ac_ct_CC="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002636 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002637 break 2
2638 fi
2639done
2640done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002641IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002642
Martin v. Löwis11437992002-04-12 09:54:03 +00002643fi
2644fi
2645ac_ct_CC=$ac_cv_prog_ac_ct_CC
2646if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002647 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2648echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002649else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002650 { echo "$as_me:$LINENO: result: no" >&5
2651echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002652fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002653
Martin v. Löwiseba40652007-08-30 20:10:57 +00002654
Martin v. Löwis11437992002-04-12 09:54:03 +00002655 test -n "$ac_ct_CC" && break
2656done
Michael W. Hudson54241132001-12-07 15:38:26 +00002657
Martin v. Löwiseba40652007-08-30 20:10:57 +00002658 if test "x$ac_ct_CC" = x; then
2659 CC=""
2660 else
2661 case $cross_compiling:$ac_tool_warned in
2662yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002663{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2664whose name does not start with the host triplet. If you think this
2665configuration is useful to you, please write to autoconf@gnu.org." >&5
2666echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2667whose name does not start with the host triplet. If you think this
2668configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002669ac_tool_warned=yes ;;
2670esac
2671 CC=$ac_ct_CC
2672 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002673fi
2674
2675fi
2676
2677
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002678test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002679See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002680echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002681See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002682 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002683
2684# Provide some information about the compiler.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002685echo "$as_me:$LINENO: checking for C compiler version" >&5
2686ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002687{ (ac_try="$ac_compiler --version >&5"
2688case "(($ac_try" in
2689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2690 *) ac_try_echo=$ac_try;;
2691esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002693 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002694 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002696 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002697{ (ac_try="$ac_compiler -v >&5"
2698case "(($ac_try" in
2699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2700 *) ac_try_echo=$ac_try;;
2701esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002703 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002704 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002706 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002707{ (ac_try="$ac_compiler -V >&5"
2708case "(($ac_try" in
2709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2710 *) ac_try_echo=$ac_try;;
2711esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002713 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002714 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002716 (exit $ac_status); }
2717
2718cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002719/* confdefs.h. */
2720_ACEOF
2721cat confdefs.h >>conftest.$ac_ext
2722cat >>conftest.$ac_ext <<_ACEOF
2723/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002724
Martin v. Löwis11437992002-04-12 09:54:03 +00002725int
2726main ()
2727{
2728
2729 ;
2730 return 0;
2731}
2732_ACEOF
2733ac_clean_files_save=$ac_clean_files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002734ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002735# Try to create an executable without -o first, disregard a.out.
2736# It will help us diagnose broken compilers, and finding out an intuition
2737# of exeext.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002738{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2739echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2740ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2741#
2742# List of possible output files, starting from the most likely.
2743# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2744# only as a last resort. b.out is created by i960 compilers.
2745ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2746#
2747# The IRIX 6 linker writes into existing files which may not be
2748# executable, retaining their permissions. Remove them first so a
2749# subsequent execution test works.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002750ac_rmfiles=
2751for ac_file in $ac_files
2752do
2753 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002754 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002755 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2756 esac
2757done
2758rm -f $ac_rmfiles
2759
2760if { (ac_try="$ac_link_default"
2761case "(($ac_try" in
2762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2763 *) ac_try_echo=$ac_try;;
2764esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002766 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002767 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002769 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002770 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2771# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2772# in a Makefile. We should not override ac_cv_exeext if it was cached,
2773# so that the user can short-circuit this test for compilers unknown to
2774# Autoconf.
2775for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002776do
2777 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002778 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002779 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002780 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002781 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002782 # We found the default executable, but exeext='' is most
2783 # certainly right.
2784 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002785 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002786 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2787 then :; else
2788 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2789 fi
2790 # We set ac_cv_exeext here because the later test for it is not
2791 # safe: cross compilers may not add the suffix if given an `-o'
2792 # argument, so we may need to know it at that point already.
2793 # Even if this section looks crufty: it has the advantage of
2794 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002795 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002796 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002797 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002798 esac
2799done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002800test "$ac_cv_exeext" = no && ac_cv_exeext=
2801
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002802else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002803 ac_file=''
2804fi
2805
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002806{ echo "$as_me:$LINENO: result: $ac_file" >&5
2807echo "${ECHO_T}$ac_file" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002808if test -z "$ac_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002809 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002810sed 's/^/| /' conftest.$ac_ext >&5
2811
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002812{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002813See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002814echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002815See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002816 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002817fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002818
Martin v. Löwis11437992002-04-12 09:54:03 +00002819ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002820
Martin v. Löwiseba40652007-08-30 20:10:57 +00002821# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002822# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002823{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2824echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002825# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2826# If not cross compiling, check that we can run a simple program.
2827if test "$cross_compiling" != yes; then
2828 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002829 { (case "(($ac_try" in
2830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2831 *) ac_try_echo=$ac_try;;
2832esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002834 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002835 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002837 (exit $ac_status); }; }; then
2838 cross_compiling=no
2839 else
2840 if test "$cross_compiling" = maybe; then
2841 cross_compiling=yes
2842 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002843 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002844If you meant to cross compile, use \`--host'.
2845See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002846echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002847If you meant to cross compile, use \`--host'.
2848See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002849 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002850 fi
2851 fi
2852fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002853{ echo "$as_me:$LINENO: result: yes" >&5
2854echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002855
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002856rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002857ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002858# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002859# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002860{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2861echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2862{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2863echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002864
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002865{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2866echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002867if { (ac_try="$ac_link"
2868case "(($ac_try" in
2869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2870 *) ac_try_echo=$ac_try;;
2871esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002873 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002874 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002876 (exit $ac_status); }; then
2877 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2878# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2879# work properly (i.e., refer to `conftest.exe'), while it won't with
2880# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002881for ac_file in conftest.exe conftest conftest.*; do
2882 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002883 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002884 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002885 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002886 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002887 * ) break;;
2888 esac
2889done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002890else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002891 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002892See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002893echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002894See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002895 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002896fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002897
Martin v. Löwis11437992002-04-12 09:54:03 +00002898rm -f conftest$ac_cv_exeext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002899{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2900echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002901
2902rm -f conftest.$ac_ext
2903EXEEXT=$ac_cv_exeext
2904ac_exeext=$EXEEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002905{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2906echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002907if test "${ac_cv_objext+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002908 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002909else
Martin v. Löwis11437992002-04-12 09:54:03 +00002910 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002911/* confdefs.h. */
2912_ACEOF
2913cat confdefs.h >>conftest.$ac_ext
2914cat >>conftest.$ac_ext <<_ACEOF
2915/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002916
Martin v. Löwis11437992002-04-12 09:54:03 +00002917int
2918main ()
2919{
2920
2921 ;
2922 return 0;
2923}
2924_ACEOF
2925rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002926if { (ac_try="$ac_compile"
2927case "(($ac_try" in
2928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2929 *) ac_try_echo=$ac_try;;
2930esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002932 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002933 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002935 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002936 for ac_file in conftest.o conftest.obj conftest.*; do
2937 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002938 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002939 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002940 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2941 break;;
2942 esac
2943done
2944else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002945 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002946sed 's/^/| /' conftest.$ac_ext >&5
2947
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002948{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002949See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002950echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002951See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002952 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002953fi
2954
2955rm -f conftest.$ac_cv_objext conftest.$ac_ext
2956fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002957{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2958echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002959OBJEXT=$ac_cv_objext
2960ac_objext=$OBJEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002961{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2962echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002963if test "${ac_cv_c_compiler_gnu+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002964 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002965else
2966 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002967/* confdefs.h. */
2968_ACEOF
2969cat confdefs.h >>conftest.$ac_ext
2970cat >>conftest.$ac_ext <<_ACEOF
2971/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002972
Martin v. Löwis11437992002-04-12 09:54:03 +00002973int
2974main ()
2975{
2976#ifndef __GNUC__
2977 choke me
2978#endif
2979
2980 ;
2981 return 0;
2982}
2983_ACEOF
2984rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002985if { (ac_try="$ac_compile"
2986case "(($ac_try" in
2987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2988 *) ac_try_echo=$ac_try;;
2989esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002991 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002992 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002993 grep -v '^ *+' conftest.er1 >conftest.err
2994 rm -f conftest.er1
2995 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002997 (exit $ac_status); } && {
2998 test -z "$ac_c_werror_flag" ||
2999 test ! -s conftest.err
3000 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003001 ac_compiler_gnu=yes
3002else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003003 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003004sed 's/^/| /' conftest.$ac_ext >&5
3005
Martin v. Löwiseba40652007-08-30 20:10:57 +00003006 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003007fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003008
3009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003010ac_cv_c_compiler_gnu=$ac_compiler_gnu
3011
3012fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003013{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3014echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
3015GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00003016ac_test_CFLAGS=${CFLAGS+set}
3017ac_save_CFLAGS=$CFLAGS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003018{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3019echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003020if test "${ac_cv_prog_cc_g+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003021 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003022else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003023 ac_save_c_werror_flag=$ac_c_werror_flag
3024 ac_c_werror_flag=yes
3025 ac_cv_prog_cc_g=no
3026 CFLAGS="-g"
3027 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003028/* confdefs.h. */
3029_ACEOF
3030cat confdefs.h >>conftest.$ac_ext
3031cat >>conftest.$ac_ext <<_ACEOF
3032/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003033
Martin v. Löwis11437992002-04-12 09:54:03 +00003034int
3035main ()
3036{
3037
3038 ;
3039 return 0;
3040}
3041_ACEOF
3042rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003043if { (ac_try="$ac_compile"
3044case "(($ac_try" in
3045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3046 *) ac_try_echo=$ac_try;;
3047esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003049 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003050 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003051 grep -v '^ *+' conftest.er1 >conftest.err
3052 rm -f conftest.er1
3053 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003055 (exit $ac_status); } && {
3056 test -z "$ac_c_werror_flag" ||
3057 test ! -s conftest.err
3058 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003059 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003060else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003061 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003062sed 's/^/| /' conftest.$ac_ext >&5
3063
Martin v. Löwiseba40652007-08-30 20:10:57 +00003064 CFLAGS=""
3065 cat >conftest.$ac_ext <<_ACEOF
3066/* confdefs.h. */
3067_ACEOF
3068cat confdefs.h >>conftest.$ac_ext
3069cat >>conftest.$ac_ext <<_ACEOF
3070/* end confdefs.h. */
3071
3072int
3073main ()
3074{
3075
3076 ;
3077 return 0;
3078}
3079_ACEOF
3080rm -f conftest.$ac_objext
3081if { (ac_try="$ac_compile"
3082case "(($ac_try" in
3083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3084 *) ac_try_echo=$ac_try;;
3085esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003087 (eval "$ac_compile") 2>conftest.er1
3088 ac_status=$?
3089 grep -v '^ *+' conftest.er1 >conftest.err
3090 rm -f conftest.er1
3091 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003093 (exit $ac_status); } && {
3094 test -z "$ac_c_werror_flag" ||
3095 test ! -s conftest.err
3096 } && test -s conftest.$ac_objext; then
3097 :
3098else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003099 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003100sed 's/^/| /' conftest.$ac_ext >&5
3101
3102 ac_c_werror_flag=$ac_save_c_werror_flag
3103 CFLAGS="-g"
3104 cat >conftest.$ac_ext <<_ACEOF
3105/* confdefs.h. */
3106_ACEOF
3107cat confdefs.h >>conftest.$ac_ext
3108cat >>conftest.$ac_ext <<_ACEOF
3109/* end confdefs.h. */
3110
3111int
3112main ()
3113{
3114
3115 ;
3116 return 0;
3117}
3118_ACEOF
3119rm -f conftest.$ac_objext
3120if { (ac_try="$ac_compile"
3121case "(($ac_try" in
3122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3123 *) ac_try_echo=$ac_try;;
3124esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003126 (eval "$ac_compile") 2>conftest.er1
3127 ac_status=$?
3128 grep -v '^ *+' conftest.er1 >conftest.err
3129 rm -f conftest.er1
3130 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003132 (exit $ac_status); } && {
3133 test -z "$ac_c_werror_flag" ||
3134 test ! -s conftest.err
3135 } && test -s conftest.$ac_objext; then
3136 ac_cv_prog_cc_g=yes
3137else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003138 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003139sed 's/^/| /' conftest.$ac_ext >&5
3140
3141
Guido van Rossum627b2d71993-12-24 10:39:16 +00003142fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003143
3144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003145fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003146
3147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3148fi
3149
3150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3151 ac_c_werror_flag=$ac_save_c_werror_flag
3152fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003153{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3154echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003155if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003156 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003157elif test $ac_cv_prog_cc_g = yes; then
3158 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003159 CFLAGS="-g -O2"
3160 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003161 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003162 fi
3163else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003164 if test "$GCC" = yes; then
3165 CFLAGS="-O2"
3166 else
3167 CFLAGS=
3168 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003169fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003170{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3171echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003172if test "${ac_cv_prog_cc_c89+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003173 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003174else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003175 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003176ac_save_CC=$CC
3177cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003178/* confdefs.h. */
3179_ACEOF
3180cat confdefs.h >>conftest.$ac_ext
3181cat >>conftest.$ac_ext <<_ACEOF
3182/* end confdefs.h. */
3183#include <stdarg.h>
3184#include <stdio.h>
3185#include <sys/types.h>
3186#include <sys/stat.h>
3187/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3188struct buf { int x; };
3189FILE * (*rcsopen) (struct buf *, struct stat *, int);
3190static char *e (p, i)
3191 char **p;
3192 int i;
3193{
3194 return p[i];
3195}
3196static char *f (char * (*g) (char **, int), char **p, ...)
3197{
3198 char *s;
3199 va_list v;
3200 va_start (v,p);
3201 s = g (p, va_arg (v,int));
3202 va_end (v);
3203 return s;
3204}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003205
3206/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3207 function prototypes and stuff, but not '\xHH' hex character constants.
3208 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003209 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003210 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3211 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003212 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003213int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3214
Martin v. Löwiseba40652007-08-30 20:10:57 +00003215/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3216 inside strings and character constants. */
3217#define FOO(x) 'x'
3218int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3219
Skip Montanaro6dead952003-09-25 14:50:04 +00003220int test (int i, double x);
3221struct s1 {int (*f) (int a);};
3222struct s2 {int (*f) (double a);};
3223int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3224int argc;
3225char **argv;
3226int
3227main ()
3228{
3229return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3230 ;
3231 return 0;
3232}
3233_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003234for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3235 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003236do
3237 CC="$ac_save_CC $ac_arg"
3238 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003239if { (ac_try="$ac_compile"
3240case "(($ac_try" in
3241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3242 *) ac_try_echo=$ac_try;;
3243esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003245 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003246 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003247 grep -v '^ *+' conftest.er1 >conftest.err
3248 rm -f conftest.er1
3249 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003251 (exit $ac_status); } && {
3252 test -z "$ac_c_werror_flag" ||
3253 test ! -s conftest.err
3254 } && test -s conftest.$ac_objext; then
3255 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003256else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003257 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003258sed 's/^/| /' conftest.$ac_ext >&5
3259
Martin v. Löwiseba40652007-08-30 20:10:57 +00003260
Skip Montanaro6dead952003-09-25 14:50:04 +00003261fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003262
3263rm -f core conftest.err conftest.$ac_objext
3264 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003265done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003266rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003267CC=$ac_save_CC
3268
3269fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003270# AC_CACHE_VAL
3271case "x$ac_cv_prog_cc_c89" in
3272 x)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003273 { echo "$as_me:$LINENO: result: none needed" >&5
3274echo "${ECHO_T}none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003275 xno)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003276 { echo "$as_me:$LINENO: result: unsupported" >&5
3277echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003278 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003279 CC="$CC $ac_cv_prog_cc_c89"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003280 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3281echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003282esac
3283
Skip Montanaro6dead952003-09-25 14:50:04 +00003284
Martin v. Löwis11437992002-04-12 09:54:03 +00003285ac_ext=c
3286ac_cpp='$CPP $CPPFLAGS'
3287ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3288ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3289ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003290
Victor Stinner6cbf90f2010-03-25 00:21:53 +00003291CFLAGS=$save_CFLAGS
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003292
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003293
3294
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003295{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3296echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003297
Martin v. Löwiseba40652007-08-30 20:10:57 +00003298# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003299if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003300 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003301
3302 case $withval in
3303 no) with_cxx_main=no
3304 MAINCC='$(CC)';;
3305 yes) with_cxx_main=yes
3306 MAINCC='$(CXX)';;
3307 *) with_cxx_main=yes
3308 MAINCC=$withval
3309 if test -z "$CXX"
3310 then
3311 CXX=$withval
3312 fi;;
3313 esac
3314else
3315
3316 with_cxx_main=no
3317 MAINCC='$(CC)'
3318
Martin v. Löwiseba40652007-08-30 20:10:57 +00003319fi
3320
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003321{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3322echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003323
3324preset_cxx="$CXX"
3325if test -z "$CXX"
3326then
3327 case "$CC" in
3328 gcc) # Extract the first word of "g++", so it can be a program name with args.
3329set dummy g++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003330{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3331echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003332if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003333 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003334else
3335 case $CXX in
3336 [\\/]* | ?:[\\/]*)
3337 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3338 ;;
3339 *)
3340 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3341for as_dir in notfound
3342do
3343 IFS=$as_save_IFS
3344 test -z "$as_dir" && as_dir=.
3345 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003346 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 +00003347 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003348 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003349 break 2
3350 fi
3351done
3352done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003353IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003354
3355 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3356 ;;
3357esac
3358fi
3359CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003360if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003361 { echo "$as_me:$LINENO: result: $CXX" >&5
3362echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003363else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003364 { echo "$as_me:$LINENO: result: no" >&5
3365echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003366fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003367
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003368 ;;
3369 cc) # Extract the first word of "c++", so it can be a program name with args.
3370set dummy c++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003371{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3372echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003373if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003374 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003375else
3376 case $CXX in
3377 [\\/]* | ?:[\\/]*)
3378 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3379 ;;
3380 *)
3381 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3382for as_dir in notfound
3383do
3384 IFS=$as_save_IFS
3385 test -z "$as_dir" && as_dir=.
3386 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003387 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 +00003388 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003389 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003390 break 2
3391 fi
3392done
3393done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003394IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003395
3396 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3397 ;;
3398esac
3399fi
3400CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003401if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003402 { echo "$as_me:$LINENO: result: $CXX" >&5
3403echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003404else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003405 { echo "$as_me:$LINENO: result: no" >&5
3406echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003407fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003408
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003409 ;;
3410 esac
3411 if test "$CXX" = "notfound"
3412 then
3413 CXX=""
3414 fi
3415fi
3416if test -z "$CXX"
3417then
3418 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3419do
3420 # Extract the first word of "$ac_prog", so it can be a program name with args.
3421set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003422{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3423echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003424if test "${ac_cv_prog_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003425 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003426else
3427 if test -n "$CXX"; then
3428 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3429else
3430as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3431for as_dir in $PATH
3432do
3433 IFS=$as_save_IFS
3434 test -z "$as_dir" && as_dir=.
3435 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003436 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 +00003437 ac_cv_prog_CXX="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003438 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003439 break 2
3440 fi
3441done
3442done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003443IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003444
3445fi
3446fi
3447CXX=$ac_cv_prog_CXX
3448if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003449 { echo "$as_me:$LINENO: result: $CXX" >&5
3450echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003451else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003452 { echo "$as_me:$LINENO: result: no" >&5
3453echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003454fi
3455
Martin v. Löwiseba40652007-08-30 20:10:57 +00003456
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003457 test -n "$CXX" && break
3458done
3459test -n "$CXX" || CXX="notfound"
3460
3461 if test "$CXX" = "notfound"
3462 then
3463 CXX=""
3464 fi
3465fi
3466if test "$preset_cxx" != "$CXX"
3467then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003468 { echo "$as_me:$LINENO: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003469
3470 By default, distutils will build C++ extension modules with \"$CXX\".
3471 If this is not intended, then set CXX on the configure command line.
3472 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003473echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003474
3475 By default, distutils will build C++ extension modules with \"$CXX\".
3476 If this is not intended, then set CXX on the configure command line.
3477 " >&2;}
3478fi
3479
3480
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003481# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003482
3483ac_ext=c
3484ac_cpp='$CPP $CPPFLAGS'
3485ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3486ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3487ac_compiler_gnu=$ac_cv_c_compiler_gnu
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003488{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3489echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003490# On Suns, sometimes $CPP names a directory.
3491if test -n "$CPP" && test -d "$CPP"; then
3492 CPP=
3493fi
3494if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003495 if test "${ac_cv_prog_CPP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003496 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003497else
Martin v. Löwis11437992002-04-12 09:54:03 +00003498 # Double quotes because CPP needs to be expanded
3499 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3500 do
3501 ac_preproc_ok=false
3502for ac_c_preproc_warn_flag in '' yes
3503do
3504 # Use a header file that comes with gcc, so configuring glibc
3505 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003506 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3507 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003508 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003509 # not just through cpp. "Syntax error" is here to catch this case.
3510 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003511/* confdefs.h. */
3512_ACEOF
3513cat confdefs.h >>conftest.$ac_ext
3514cat >>conftest.$ac_ext <<_ACEOF
3515/* end confdefs.h. */
3516#ifdef __STDC__
3517# include <limits.h>
3518#else
3519# include <assert.h>
3520#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003521 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003522_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003523if { (ac_try="$ac_cpp conftest.$ac_ext"
3524case "(($ac_try" in
3525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3526 *) ac_try_echo=$ac_try;;
3527esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003529 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003530 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003531 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003532 rm -f conftest.er1
3533 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003535 (exit $ac_status); } >/dev/null && {
3536 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3537 test ! -s conftest.err
3538 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003539 :
3540else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003542sed 's/^/| /' conftest.$ac_ext >&5
3543
Martin v. Löwis11437992002-04-12 09:54:03 +00003544 # Broken: fails on valid input.
3545continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003546fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003547
Martin v. Löwis11437992002-04-12 09:54:03 +00003548rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003549
Martin v. Löwiseba40652007-08-30 20:10:57 +00003550 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003551 # can be detected and how.
3552 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003553/* confdefs.h. */
3554_ACEOF
3555cat confdefs.h >>conftest.$ac_ext
3556cat >>conftest.$ac_ext <<_ACEOF
3557/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003558#include <ac_nonexistent.h>
3559_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003560if { (ac_try="$ac_cpp conftest.$ac_ext"
3561case "(($ac_try" in
3562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3563 *) ac_try_echo=$ac_try;;
3564esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003566 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003567 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003568 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003569 rm -f conftest.er1
3570 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003572 (exit $ac_status); } >/dev/null && {
3573 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3574 test ! -s conftest.err
3575 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003576 # Broken: success on invalid input.
3577continue
3578else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003579 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003580sed 's/^/| /' conftest.$ac_ext >&5
3581
Martin v. Löwis11437992002-04-12 09:54:03 +00003582 # Passes both tests.
3583ac_preproc_ok=:
3584break
3585fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003586
Martin v. Löwis11437992002-04-12 09:54:03 +00003587rm -f conftest.err conftest.$ac_ext
3588
3589done
3590# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3591rm -f conftest.err conftest.$ac_ext
3592if $ac_preproc_ok; then
3593 break
3594fi
3595
3596 done
3597 ac_cv_prog_CPP=$CPP
3598
3599fi
3600 CPP=$ac_cv_prog_CPP
3601else
3602 ac_cv_prog_CPP=$CPP
3603fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003604{ echo "$as_me:$LINENO: result: $CPP" >&5
3605echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003606ac_preproc_ok=false
3607for ac_c_preproc_warn_flag in '' yes
3608do
3609 # Use a header file that comes with gcc, so configuring glibc
3610 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003611 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3612 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003613 # On the NeXT, cc -E runs the code through the compiler's parser,
3614 # not just through cpp. "Syntax error" is here to catch this case.
3615 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003616/* confdefs.h. */
3617_ACEOF
3618cat confdefs.h >>conftest.$ac_ext
3619cat >>conftest.$ac_ext <<_ACEOF
3620/* end confdefs.h. */
3621#ifdef __STDC__
3622# include <limits.h>
3623#else
3624# include <assert.h>
3625#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003626 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003627_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003628if { (ac_try="$ac_cpp conftest.$ac_ext"
3629case "(($ac_try" in
3630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3631 *) ac_try_echo=$ac_try;;
3632esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003634 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003635 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003636 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003637 rm -f conftest.er1
3638 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003640 (exit $ac_status); } >/dev/null && {
3641 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3642 test ! -s conftest.err
3643 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003644 :
3645else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003646 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003647sed 's/^/| /' conftest.$ac_ext >&5
3648
Martin v. Löwis11437992002-04-12 09:54:03 +00003649 # Broken: fails on valid input.
3650continue
3651fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003652
Martin v. Löwis11437992002-04-12 09:54:03 +00003653rm -f conftest.err conftest.$ac_ext
3654
Martin v. Löwiseba40652007-08-30 20:10:57 +00003655 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003656 # can be detected and how.
3657 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003658/* confdefs.h. */
3659_ACEOF
3660cat confdefs.h >>conftest.$ac_ext
3661cat >>conftest.$ac_ext <<_ACEOF
3662/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003663#include <ac_nonexistent.h>
3664_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003665if { (ac_try="$ac_cpp conftest.$ac_ext"
3666case "(($ac_try" in
3667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3668 *) ac_try_echo=$ac_try;;
3669esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003671 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003672 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003673 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003674 rm -f conftest.er1
3675 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003677 (exit $ac_status); } >/dev/null && {
3678 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3679 test ! -s conftest.err
3680 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003681 # Broken: success on invalid input.
3682continue
3683else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003684 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003685sed 's/^/| /' conftest.$ac_ext >&5
3686
Martin v. Löwis11437992002-04-12 09:54:03 +00003687 # Passes both tests.
3688ac_preproc_ok=:
3689break
3690fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003691
Martin v. Löwis11437992002-04-12 09:54:03 +00003692rm -f conftest.err conftest.$ac_ext
3693
3694done
3695# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3696rm -f conftest.err conftest.$ac_ext
3697if $ac_preproc_ok; then
3698 :
3699else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003700 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003701See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003702echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003703See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003704 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003705fi
3706
3707ac_ext=c
3708ac_cpp='$CPP $CPPFLAGS'
3709ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3710ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3711ac_compiler_gnu=$ac_cv_c_compiler_gnu
3712
3713
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003714{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3715echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003716if test "${ac_cv_path_GREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003717 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003718else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003719 # Extract the first word of "grep ggrep" to use in msg output
3720if test -z "$GREP"; then
3721set dummy grep ggrep; ac_prog_name=$2
3722if test "${ac_cv_path_GREP+set}" = set; then
3723 echo $ECHO_N "(cached) $ECHO_C" >&6
3724else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003725 ac_path_GREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003726# Loop through the user's path and test for each of PROGNAME-LIST
3727as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003728for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3729do
3730 IFS=$as_save_IFS
3731 test -z "$as_dir" && as_dir=.
3732 for ac_prog in grep ggrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003733 for ac_exec_ext in '' $ac_executable_extensions; do
3734 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3735 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3736 # Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003737 # Check for GNU $ac_path_GREP
3738case `"$ac_path_GREP" --version 2>&1` in
3739*GNU*)
3740 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3741*)
3742 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003743 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003744 while :
3745 do
3746 cat "conftest.in" "conftest.in" >"conftest.tmp"
3747 mv "conftest.tmp" "conftest.in"
3748 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003749 echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003750 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3751 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3752 ac_count=`expr $ac_count + 1`
3753 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3754 # Best one so far, save it but keep looking for a better one
3755 ac_cv_path_GREP="$ac_path_GREP"
3756 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003757 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003758 # 10*(2^10) chars as input seems more than enough
3759 test $ac_count -gt 10 && break
3760 done
3761 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3762esac
3763
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003764
3765 $ac_path_GREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003766 done
3767done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003768
3769done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003770IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003771
3772
3773fi
3774
3775GREP="$ac_cv_path_GREP"
3776if test -z "$GREP"; then
3777 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3778echo "$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 +00003779 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003780fi
3781
Martin v. Löwiseba40652007-08-30 20:10:57 +00003782else
3783 ac_cv_path_GREP=$GREP
3784fi
3785
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003786
Martin v. Löwiseba40652007-08-30 20:10:57 +00003787fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003788{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3789echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003790 GREP="$ac_cv_path_GREP"
3791
3792
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003793{ echo "$as_me:$LINENO: checking for egrep" >&5
3794echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003795if test "${ac_cv_path_EGREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003796 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00003797else
3798 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3799 then ac_cv_path_EGREP="$GREP -E"
3800 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003801 # Extract the first word of "egrep" to use in msg output
3802if test -z "$EGREP"; then
3803set dummy egrep; ac_prog_name=$2
3804if test "${ac_cv_path_EGREP+set}" = set; then
3805 echo $ECHO_N "(cached) $ECHO_C" >&6
3806else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003807 ac_path_EGREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003808# Loop through the user's path and test for each of PROGNAME-LIST
3809as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003810for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3811do
3812 IFS=$as_save_IFS
3813 test -z "$as_dir" && as_dir=.
3814 for ac_prog in egrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003815 for ac_exec_ext in '' $ac_executable_extensions; do
3816 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3817 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3818 # Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003819 # Check for GNU $ac_path_EGREP
3820case `"$ac_path_EGREP" --version 2>&1` in
3821*GNU*)
3822 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3823*)
3824 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003825 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003826 while :
3827 do
3828 cat "conftest.in" "conftest.in" >"conftest.tmp"
3829 mv "conftest.tmp" "conftest.in"
3830 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003831 echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003832 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3833 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3834 ac_count=`expr $ac_count + 1`
3835 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3836 # Best one so far, save it but keep looking for a better one
3837 ac_cv_path_EGREP="$ac_path_EGREP"
3838 ac_path_EGREP_max=$ac_count
3839 fi
3840 # 10*(2^10) chars as input seems more than enough
3841 test $ac_count -gt 10 && break
3842 done
3843 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3844esac
3845
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003846
3847 $ac_path_EGREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003848 done
3849done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003850
3851done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003852IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003853
3854
3855fi
3856
3857EGREP="$ac_cv_path_EGREP"
3858if test -z "$EGREP"; then
3859 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3860echo "$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 +00003861 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003862fi
3863
Martin v. Löwiseba40652007-08-30 20:10:57 +00003864else
3865 ac_cv_path_EGREP=$EGREP
3866fi
3867
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003868
Martin v. Löwiseba40652007-08-30 20:10:57 +00003869 fi
3870fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003871{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3872echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003873 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003874
3875
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003876
3877{ echo "$as_me:$LINENO: checking for AIX" >&5
3878echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3879cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003880/* confdefs.h. */
3881_ACEOF
3882cat confdefs.h >>conftest.$ac_ext
3883cat >>conftest.$ac_ext <<_ACEOF
3884/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003885#ifdef _AIX
3886 yes
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003887#endif
3888
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003889_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003890if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3891 $EGREP "yes" >/dev/null 2>&1; then
3892 { echo "$as_me:$LINENO: result: yes" >&5
3893echo "${ECHO_T}yes" >&6; }
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003894cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003895#define _ALL_SOURCE 1
3896_ACEOF
3897
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003898else
3899 { echo "$as_me:$LINENO: result: no" >&5
3900echo "${ECHO_T}no" >&6; }
3901fi
Ronald Oussoren75912852010-04-08 08:13:31 +00003902rm -f -r conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003903
3904
3905
3906# Check for unsupported systems
3907case $ac_sys_system/$ac_sys_release in
3908atheos*|Linux*/1*)
3909 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3910 echo See README for details.
3911 exit 1;;
3912esac
3913
3914
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003915{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3916echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003917
3918# Check whether --with-suffix was given.
3919if test "${with_suffix+set}" = set; then
3920 withval=$with_suffix;
3921 case $withval in
3922 no) EXEEXT=;;
3923 yes) EXEEXT=.exe;;
3924 *) EXEEXT=$withval;;
3925 esac
3926fi
3927
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003928{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3929echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003930
3931# Test whether we're running on a non-case-sensitive system, in which
3932# case we give a warning if no ext is given
3933
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003934{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3935echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003936if test ! -d CaseSensitiveTestDir; then
3937mkdir CaseSensitiveTestDir
3938fi
3939
3940if test -d casesensitivetestdir
3941then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003942 { echo "$as_me:$LINENO: result: yes" >&5
3943echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003944 BUILDEXEEXT=.exe
3945else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003946 { echo "$as_me:$LINENO: result: no" >&5
3947echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003948 BUILDEXEEXT=$EXEEXT
3949fi
3950rmdir CaseSensitiveTestDir
3951
3952case $MACHDEP in
3953bsdos*)
3954 case $CC in
3955 gcc) CC="$CC -D_HAVE_BSDI";;
3956 esac;;
3957esac
3958
3959case $ac_sys_system in
3960hp*|HP*)
3961 case $CC in
3962 cc|*/cc) CC="$CC -Ae";;
3963 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003964SunOS*)
3965 # Some functions have a prototype only with that define, e.g. confstr
3966
3967cat >>confdefs.h <<\_ACEOF
3968#define __EXTENSIONS__ 1
3969_ACEOF
3970
3971 ;;
3972esac
3973
3974
3975
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003976{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3977echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003978if test -z "$LIBRARY"
3979then
3980 LIBRARY='libpython$(VERSION).a'
3981fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003982{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3983echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003984
3985# LDLIBRARY is the name of the library to link against (as opposed to the
3986# name of the library into which to insert object files). BLDLIBRARY is also
3987# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3988# is blank as the main program is not linked directly against LDLIBRARY.
3989# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3990# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3991# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3992# DLLLIBRARY is the shared (i.e., DLL) library.
3993#
3994# RUNSHARED is used to run shared python without installed libraries
3995#
3996# INSTSONAME is the name of the shared library that will be use to install
3997# on the system - some systems like version suffix, others don't
3998
3999
4000
4001
4002
4003
4004LDLIBRARY="$LIBRARY"
4005BLDLIBRARY='$(LDLIBRARY)'
4006INSTSONAME='$(LDLIBRARY)'
4007DLLLIBRARY=''
4008LDLIBRARYDIR=''
4009RUNSHARED=''
4010
4011# LINKCC is the command that links the python executable -- default is $(CC).
4012# If CXX is set, and if it is needed to link a main function that was
4013# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4014# python might then depend on the C++ runtime
4015# This is altered for AIX in order to build the export list before
4016# linking.
4017
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004018{ echo "$as_me:$LINENO: checking LINKCC" >&5
4019echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004020if test -z "$LINKCC"
4021then
4022 LINKCC='$(PURIFY) $(MAINCC)'
4023 case $ac_sys_system in
4024 AIX*)
4025 exp_extra="\"\""
4026 if test $ac_sys_release -ge 5 -o \
4027 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4028 exp_extra="."
4029 fi
4030 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004031 QNX*)
4032 # qcc must be used because the other compilers do not
4033 # support -N.
4034 LINKCC=qcc;;
4035 esac
4036fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004037{ echo "$as_me:$LINENO: result: $LINKCC" >&5
4038echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004039
4040# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4041# make sure we default having it set to "no": this is used by
4042# distutils.unixccompiler to know if it should add --enable-new-dtags
4043# to linker command lines, and failing to detect GNU ld simply results
4044# in the same bahaviour as before.
4045
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004046{ echo "$as_me:$LINENO: checking for GNU ld" >&5
4047echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004048ac_prog=ld
4049if test "$GCC" = yes; then
4050 ac_prog=`$CC -print-prog-name=ld`
4051fi
4052case `"$ac_prog" -V 2>&1 < /dev/null` in
4053 *GNU*)
4054 GNULD=yes;;
4055 *)
4056 GNULD=no;;
4057esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004058{ echo "$as_me:$LINENO: result: $GNULD" >&5
4059echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004060
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004061{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
4062echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004063# Check whether --enable-shared was given.
4064if test "${enable_shared+set}" = set; then
4065 enableval=$enable_shared;
4066fi
4067
4068
4069if test -z "$enable_shared"
4070then
4071 case $ac_sys_system in
4072 CYGWIN* | atheos*)
4073 enable_shared="yes";;
4074 *)
4075 enable_shared="no";;
4076 esac
4077fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004078{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4079echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004080
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004081{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4082echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004083# Check whether --enable-profiling was given.
4084if test "${enable_profiling+set}" = set; then
4085 enableval=$enable_profiling; ac_save_cc="$CC"
4086 CC="$CC -pg"
4087 if test "$cross_compiling" = yes; then
4088 ac_enable_profiling="no"
4089else
4090 cat >conftest.$ac_ext <<_ACEOF
4091/* confdefs.h. */
4092_ACEOF
4093cat confdefs.h >>conftest.$ac_ext
4094cat >>conftest.$ac_ext <<_ACEOF
4095/* end confdefs.h. */
4096int main() { return 0; }
4097_ACEOF
4098rm -f conftest$ac_exeext
4099if { (ac_try="$ac_link"
4100case "(($ac_try" in
4101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4102 *) ac_try_echo=$ac_try;;
4103esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004105 (eval "$ac_link") 2>&5
4106 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004108 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4109 { (case "(($ac_try" in
4110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4111 *) ac_try_echo=$ac_try;;
4112esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004114 (eval "$ac_try") 2>&5
4115 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004117 (exit $ac_status); }; }; then
4118 ac_enable_profiling="yes"
4119else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004120 echo "$as_me: program exited with status $ac_status" >&5
4121echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004122sed 's/^/| /' conftest.$ac_ext >&5
4123
4124( exit $ac_status )
4125ac_enable_profiling="no"
4126fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004127rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4128fi
4129
4130
4131 CC="$ac_save_cc"
4132fi
4133
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004134{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4135echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004136
4137case "$ac_enable_profiling" in
4138 "yes")
4139 BASECFLAGS="-pg $BASECFLAGS"
4140 LDFLAGS="-pg $LDFLAGS"
4141 ;;
4142esac
4143
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004144{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4145echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004146
4147# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4148# library that we build, but we do not want to link against it (we
4149# will find it with a -framework option). For this reason there is an
4150# extra variable BLDLIBRARY against which Python and the extension
4151# modules are linked, BLDLIBRARY. This is normally the same as
4152# LDLIBRARY, but empty for MacOSX framework builds.
4153if test "$enable_framework"
4154then
4155 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4156 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4157 BLDLIBRARY=''
4158else
4159 BLDLIBRARY='$(LDLIBRARY)'
4160fi
4161
4162# Other platforms follow
4163if test $enable_shared = "yes"; then
4164
4165cat >>confdefs.h <<\_ACEOF
4166#define Py_ENABLE_SHARED 1
4167_ACEOF
4168
4169 case $ac_sys_system in
4170 BeOS*)
4171 LDLIBRARY='libpython$(VERSION).so'
4172 ;;
4173 CYGWIN*)
4174 LDLIBRARY='libpython$(VERSION).dll.a'
4175 DLLLIBRARY='libpython$(VERSION).dll'
4176 ;;
4177 SunOS*)
4178 LDLIBRARY='libpython$(VERSION).so'
4179 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4180 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4181 INSTSONAME="$LDLIBRARY".$SOVERSION
4182 ;;
4183 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4184 LDLIBRARY='libpython$(VERSION).so'
4185 BLDLIBRARY='-L. -lpython$(VERSION)'
4186 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4187 case $ac_sys_system in
4188 FreeBSD*)
4189 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4190 ;;
4191 esac
4192 INSTSONAME="$LDLIBRARY".$SOVERSION
4193 ;;
4194 hp*|HP*)
4195 case `uname -m` in
4196 ia64)
4197 LDLIBRARY='libpython$(VERSION).so'
4198 ;;
4199 *)
4200 LDLIBRARY='libpython$(VERSION).sl'
4201 ;;
4202 esac
4203 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4204 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4205 ;;
4206 OSF*)
4207 LDLIBRARY='libpython$(VERSION).so'
4208 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4209 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4210 ;;
4211 atheos*)
4212 LDLIBRARY='libpython$(VERSION).so'
4213 BLDLIBRARY='-L. -lpython$(VERSION)'
4214 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4215 ;;
4216 Darwin*)
4217 LDLIBRARY='libpython$(VERSION).dylib'
4218 BLDLIBRARY='-L. -lpython$(VERSION)'
4219 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4220 ;;
4221
4222 esac
4223else # shared is disabled
4224 case $ac_sys_system in
4225 CYGWIN*)
4226 BLDLIBRARY='$(LIBRARY)'
4227 LDLIBRARY='libpython$(VERSION).dll.a'
4228 ;;
4229 esac
4230fi
4231
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004232{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4233echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004234
4235if test -n "$ac_tool_prefix"; then
4236 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4237set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004238{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4239echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004240if test "${ac_cv_prog_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004241 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004242else
4243 if test -n "$RANLIB"; then
4244 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4245else
4246as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4247for as_dir in $PATH
4248do
4249 IFS=$as_save_IFS
4250 test -z "$as_dir" && as_dir=.
4251 for ac_exec_ext in '' $ac_executable_extensions; do
4252 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4253 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004254 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004255 break 2
4256 fi
4257done
4258done
4259IFS=$as_save_IFS
4260
4261fi
4262fi
4263RANLIB=$ac_cv_prog_RANLIB
4264if test -n "$RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004265 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4266echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004267else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004268 { echo "$as_me:$LINENO: result: no" >&5
4269echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004270fi
4271
4272
4273fi
4274if test -z "$ac_cv_prog_RANLIB"; then
4275 ac_ct_RANLIB=$RANLIB
4276 # Extract the first word of "ranlib", so it can be a program name with args.
4277set dummy ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004278{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4279echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004280if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004281 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004282else
4283 if test -n "$ac_ct_RANLIB"; then
4284 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4285else
4286as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4287for as_dir in $PATH
4288do
4289 IFS=$as_save_IFS
4290 test -z "$as_dir" && as_dir=.
4291 for ac_exec_ext in '' $ac_executable_extensions; do
4292 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4293 ac_cv_prog_ac_ct_RANLIB="ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004294 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004295 break 2
4296 fi
4297done
4298done
4299IFS=$as_save_IFS
4300
4301fi
4302fi
4303ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4304if test -n "$ac_ct_RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004305 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4306echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004307else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004308 { echo "$as_me:$LINENO: result: no" >&5
4309echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004310fi
4311
4312 if test "x$ac_ct_RANLIB" = x; then
4313 RANLIB=":"
4314 else
4315 case $cross_compiling:$ac_tool_warned in
4316yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004317{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4318whose name does not start with the host triplet. If you think this
4319configuration is useful to you, please write to autoconf@gnu.org." >&5
4320echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4321whose name does not start with the host triplet. If you think this
4322configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004323ac_tool_warned=yes ;;
4324esac
4325 RANLIB=$ac_ct_RANLIB
4326 fi
4327else
4328 RANLIB="$ac_cv_prog_RANLIB"
4329fi
4330
4331
4332for ac_prog in ar aal
4333do
4334 # Extract the first word of "$ac_prog", so it can be a program name with args.
4335set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004336{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4337echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004338if test "${ac_cv_prog_AR+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004339 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004340else
4341 if test -n "$AR"; then
4342 ac_cv_prog_AR="$AR" # Let the user override the test.
4343else
4344as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4345for as_dir in $PATH
4346do
4347 IFS=$as_save_IFS
4348 test -z "$as_dir" && as_dir=.
4349 for ac_exec_ext in '' $ac_executable_extensions; do
4350 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4351 ac_cv_prog_AR="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004352 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004353 break 2
4354 fi
4355done
4356done
4357IFS=$as_save_IFS
4358
4359fi
4360fi
4361AR=$ac_cv_prog_AR
4362if test -n "$AR"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004363 { echo "$as_me:$LINENO: result: $AR" >&5
4364echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004365else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004366 { echo "$as_me:$LINENO: result: no" >&5
4367echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004368fi
4369
4370
4371 test -n "$AR" && break
4372done
4373test -n "$AR" || AR="ar"
4374
4375
4376# tweak ARFLAGS only if the user didn't set it on the command line
4377
4378if test -z "$ARFLAGS"
4379then
4380 ARFLAGS="rc"
4381fi
4382
4383
4384# Extract the first word of "svnversion", so it can be a program name with args.
4385set dummy svnversion; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004386{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4387echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004388if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004389 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004390else
4391 if test -n "$SVNVERSION"; then
4392 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4393else
4394as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4395for as_dir in $PATH
4396do
4397 IFS=$as_save_IFS
4398 test -z "$as_dir" && as_dir=.
4399 for ac_exec_ext in '' $ac_executable_extensions; do
4400 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4401 ac_cv_prog_SVNVERSION="found"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004402 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004403 break 2
4404 fi
4405done
4406done
4407IFS=$as_save_IFS
4408
4409 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4410fi
4411fi
4412SVNVERSION=$ac_cv_prog_SVNVERSION
4413if test -n "$SVNVERSION"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004414 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4415echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004416else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004417 { echo "$as_me:$LINENO: result: no" >&5
4418echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004419fi
4420
4421
4422if test $SVNVERSION = found
4423then
4424 SVNVERSION="svnversion \$(srcdir)"
4425else
4426 SVNVERSION="echo Unversioned directory"
4427fi
4428
4429case $MACHDEP in
4430bsdos*|hp*|HP*)
4431 # install -d does not work on BSDI or HP-UX
4432 if test -z "$INSTALL"
4433 then
4434 INSTALL="${srcdir}/install-sh -c"
4435 fi
4436esac
4437ac_aux_dir=
4438for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4439 if test -f "$ac_dir/install-sh"; then
4440 ac_aux_dir=$ac_dir
4441 ac_install_sh="$ac_aux_dir/install-sh -c"
4442 break
4443 elif test -f "$ac_dir/install.sh"; then
4444 ac_aux_dir=$ac_dir
4445 ac_install_sh="$ac_aux_dir/install.sh -c"
4446 break
4447 elif test -f "$ac_dir/shtool"; then
4448 ac_aux_dir=$ac_dir
4449 ac_install_sh="$ac_aux_dir/shtool install -c"
4450 break
4451 fi
4452done
4453if test -z "$ac_aux_dir"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004454 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4455echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004456 { (exit 1); exit 1; }; }
4457fi
4458
4459# These three variables are undocumented and unsupported,
4460# and are intended to be withdrawn in a future Autoconf release.
4461# They can cause serious problems if a builder's source tree is in a directory
4462# whose full name contains unusual characters.
4463ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4464ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4465ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4466
4467
4468# Find a good install program. We prefer a C program (faster),
4469# so one script is as good as another. But avoid the broken or
4470# incompatible versions:
4471# SysV /etc/install, /usr/sbin/install
4472# SunOS /usr/etc/install
4473# IRIX /sbin/install
4474# AIX /bin/install
4475# AmigaOS /C/install, which installs bootblocks on floppy discs
4476# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4477# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4478# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4479# OS/2's system install, which has a completely different semantic
4480# ./install, which can be erroneously created by make from ./install.sh.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004481{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4482echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004483if test -z "$INSTALL"; then
4484if test "${ac_cv_path_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004485 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004486else
4487 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4488for as_dir in $PATH
4489do
4490 IFS=$as_save_IFS
4491 test -z "$as_dir" && as_dir=.
4492 # Account for people who put trailing slashes in PATH elements.
4493case $as_dir/ in
4494 ./ | .// | /cC/* | \
4495 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4496 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4497 /usr/ucb/* ) ;;
4498 *)
4499 # OSF1 and SCO ODT 3.0 have their own names for install.
4500 # Don't use installbsd from OSF since it installs stuff as root
4501 # by default.
4502 for ac_prog in ginstall scoinst install; do
4503 for ac_exec_ext in '' $ac_executable_extensions; do
4504 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4505 if test $ac_prog = install &&
4506 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4507 # AIX install. It has an incompatible calling convention.
4508 :
4509 elif test $ac_prog = install &&
4510 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4511 # program-specific install script used by HP pwplus--don't use.
4512 :
4513 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004514 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4515 break 3
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004516 fi
4517 fi
4518 done
4519 done
4520 ;;
4521esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004522done
4523IFS=$as_save_IFS
4524
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004525
4526fi
4527 if test "${ac_cv_path_install+set}" = set; then
4528 INSTALL=$ac_cv_path_install
4529 else
4530 # As a last resort, use the slow shell script. Don't cache a
4531 # value for INSTALL within a source directory, because that will
4532 # break other packages using the cache if that directory is
4533 # removed, or if the value is a relative name.
4534 INSTALL=$ac_install_sh
4535 fi
4536fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004537{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4538echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004539
4540# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4541# It thinks the first close brace ends the variable substitution.
4542test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4543
4544test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4545
4546test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4547
4548
4549# Not every filesystem supports hard links
4550
4551if test -z "$LN" ; then
4552 case $ac_sys_system in
4553 BeOS*) LN="ln -s";;
4554 CYGWIN*) LN="ln -s";;
4555 atheos*) LN="ln -s";;
4556 *) LN=ln;;
4557 esac
4558fi
4559
4560# Check for --with-pydebug
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004561{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4562echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004563
4564# Check whether --with-pydebug was given.
4565if test "${with_pydebug+set}" = set; then
4566 withval=$with_pydebug;
4567if test "$withval" != no
4568then
4569
4570cat >>confdefs.h <<\_ACEOF
4571#define Py_DEBUG 1
4572_ACEOF
4573
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004574 { echo "$as_me:$LINENO: result: yes" >&5
4575echo "${ECHO_T}yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004576 Py_DEBUG='true'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004577else { echo "$as_me:$LINENO: result: no" >&5
4578echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004579fi
4580else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004581 { echo "$as_me:$LINENO: result: no" >&5
4582echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004583fi
4584
4585
4586# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4587# merged with this chunk of code?
4588
4589# Optimizer/debugger flags
4590# ------------------------
4591# (The following bit of code is complicated enough - please keep things
4592# indented properly. Just pretend you're editing Python code. ;-)
4593
4594# There are two parallel sets of case statements below, one that checks to
4595# see if OPT was set and one that does BASECFLAGS setting based upon
4596# compiler and platform. BASECFLAGS tweaks need to be made even if the
4597# user set OPT.
4598
4599# tweak OPT based on compiler and platform, only if the user didn't set
4600# it on the command line
4601
Benjamin Petersond4b721b2010-03-23 20:58:37 +00004602if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004603then
4604 case $GCC in
4605 yes)
4606 if test "$CC" != 'g++' ; then
4607 STRICT_PROTO="-Wstrict-prototypes"
4608 fi
4609 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4610 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4611 WRAP="-fwrapv"
4612 fi
4613 case $ac_cv_prog_cc_g in
4614 yes)
4615 if test "$Py_DEBUG" = 'true' ; then
4616 # Optimization messes up debuggers, so turn it off for
4617 # debug builds.
4618 OPT="-g -Wall $STRICT_PROTO"
4619 else
4620 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4621 fi
4622 ;;
4623 *)
4624 OPT="-O3 -Wall $STRICT_PROTO"
4625 ;;
4626 esac
4627 case $ac_sys_system in
4628 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4629 ;;
4630 esac
4631 ;;
4632
4633 *)
4634 OPT="-O"
4635 ;;
4636 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004637fi
4638
4639
4640
4641# The -arch flags for universal builds on OSX
4642UNIVERSAL_ARCH_FLAGS=
4643
4644
4645# tweak BASECFLAGS based on compiler and platform
4646case $GCC in
4647yes)
4648 # Python violates C99 rules, by casting between incompatible
4649 # pointer types. GCC may generate bad code as a result of that,
4650 # so use -fno-strict-aliasing if supported.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004651 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4652echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004653 ac_save_cc="$CC"
4654 CC="$CC -fno-strict-aliasing"
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004655 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
4656 echo $ECHO_N "(cached) $ECHO_C" >&6
4657else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004658 cat >conftest.$ac_ext <<_ACEOF
4659/* confdefs.h. */
4660_ACEOF
4661cat confdefs.h >>conftest.$ac_ext
4662cat >>conftest.$ac_ext <<_ACEOF
4663/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004664
4665int
4666main ()
4667{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004668int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004669 ;
4670 return 0;
4671}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004672_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004673rm -f conftest.$ac_objext
4674if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004675case "(($ac_try" in
4676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4677 *) ac_try_echo=$ac_try;;
4678esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004680 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004681 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004682 grep -v '^ *+' conftest.er1 >conftest.err
4683 rm -f conftest.er1
4684 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004686 (exit $ac_status); } && {
4687 test -z "$ac_c_werror_flag" ||
4688 test ! -s conftest.err
4689 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004690 ac_cv_no_strict_aliasing_ok=yes
4691else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004692 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004693sed 's/^/| /' conftest.$ac_ext >&5
4694
Gregory P. Smith373469a2009-11-01 21:03:38 +00004695 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004696fi
4697
Gregory P. Smith373469a2009-11-01 21:03:38 +00004698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004699fi
4700
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004701 CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004702 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4703echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004704 if test $ac_cv_no_strict_aliasing_ok = yes
4705 then
4706 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4707 fi
4708
4709 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4710 # support. Without this, treatment of subnormals doesn't follow
4711 # the standard.
4712 case $ac_sys_machine in
4713 alpha*)
4714 BASECFLAGS="$BASECFLAGS -mieee"
4715 ;;
4716 esac
4717
4718 case $ac_sys_system in
4719 SCO_SV*)
4720 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4721 ;;
4722 # is there any other compiler on Darwin besides gcc?
4723 Darwin*)
4724 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4725 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004726 if test "${CC}" = gcc
4727 then
4728 { echo "$as_me:$LINENO: checking which compiler should be used" >&5
4729echo $ECHO_N "checking which compiler should be used... $ECHO_C" >&6; }
4730 case "${UNIVERSALSDK}" in
4731 */MacOSX10.4u.sdk)
4732 # Build using 10.4 SDK, force usage of gcc when the
4733 # compiler is gcc, otherwise the user will get very
4734 # confusing error messages when building on OSX 10.6
4735 CC=gcc-4.0
4736 CPP=cpp-4.0
4737 ;;
4738 esac
4739 { echo "$as_me:$LINENO: result: $CC" >&5
4740echo "${ECHO_T}$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004741 fi
4742
4743 # Calculate the right deployment target for this build.
4744 #
4745 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4746 if test ${cur_target} '>' 10.2; then
4747 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00004748 if test ${enable_universalsdk}; then
4749 if test "${UNIVERSAL_ARCHS}" = "all"; then
4750 # Ensure that the default platform for a
4751 # 4-way universal build is OSX 10.5,
4752 # that's the first OS release where
4753 # 4-way builds make sense.
4754 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00004755
4756 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4757 cur_target='10.5'
4758
4759 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4760 cur_target='10.5'
4761
4762 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4763 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00004764 fi
4765 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00004766 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00004767 # On Intel macs default to a deployment
4768 # target of 10.4, that's the first OSX
4769 # release with Intel support.
4770 cur_target="10.4"
4771 fi
4772 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004773 fi
4774 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4775
4776 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4777 # environment with a value that is the same as what we'll use
4778 # in the Makefile to ensure that we'll get the same compiler
4779 # environment during configure and build time.
4780 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4781 export MACOSX_DEPLOYMENT_TARGET
4782 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4783
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004784 if test "${enable_universalsdk}"; then
4785 UNIVERSAL_ARCH_FLAGS=""
4786 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4787 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4788 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00004789 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004790
4791 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4792 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
4793 LIPO_32BIT_FLAGS=""
4794 ARCH_RUN_32BIT="true"
4795
4796 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4797 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4798 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00004799 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004800
4801 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4802 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
4803 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00004804 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004805
4806 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4807 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
4808 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00004809 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004810
4811 else
4812 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4813echo "$as_me: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&2;}
4814 { (exit 1); exit 1; }; }
4815
4816 fi
4817
4818
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00004819 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
4820 if test "${UNIVERSALSDK}" != "/"
4821 then
4822 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
4823 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
4824 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004825 fi
4826
4827 fi
4828
4829
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004830 ;;
4831 OSF*)
4832 BASECFLAGS="$BASECFLAGS -mieee"
4833 ;;
4834 esac
4835 ;;
4836
4837*)
4838 case $ac_sys_system in
4839 OpenUNIX*|UnixWare*)
4840 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4841 ;;
4842 OSF*)
4843 BASECFLAGS="$BASECFLAGS -ieee -std"
4844 ;;
4845 SCO_SV*)
4846 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4847 ;;
4848 esac
4849 ;;
4850esac
4851
4852if test "$Py_DEBUG" = 'true'; then
4853 :
4854else
4855 OPT="-DNDEBUG $OPT"
4856fi
4857
4858if test "$ac_arch_flags"
4859then
4860 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4861fi
4862
4863# disable check for icc since it seems to pass, but generates a warning
4864if test "$CC" = icc
4865then
4866 ac_cv_opt_olimit_ok=no
4867fi
4868
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004869{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4870echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004871if test "${ac_cv_opt_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004872 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004873else
4874 ac_save_cc="$CC"
4875CC="$CC -OPT:Olimit=0"
Gregory P. Smith373469a2009-11-01 21:03:38 +00004876cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004877/* confdefs.h. */
4878_ACEOF
4879cat confdefs.h >>conftest.$ac_ext
4880cat >>conftest.$ac_ext <<_ACEOF
4881/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004882
4883int
4884main ()
4885{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004886int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004887 ;
4888 return 0;
4889}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004890_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004891rm -f conftest.$ac_objext
4892if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004893case "(($ac_try" in
4894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4895 *) ac_try_echo=$ac_try;;
4896esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004898 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004899 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004900 grep -v '^ *+' conftest.er1 >conftest.err
4901 rm -f conftest.er1
4902 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004904 (exit $ac_status); } && {
4905 test -z "$ac_c_werror_flag" ||
4906 test ! -s conftest.err
4907 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004908 ac_cv_opt_olimit_ok=yes
4909else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004910 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004911sed 's/^/| /' conftest.$ac_ext >&5
4912
Gregory P. Smith373469a2009-11-01 21:03:38 +00004913 ac_cv_opt_olimit_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004914fi
4915
Gregory P. Smith373469a2009-11-01 21:03:38 +00004916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004917CC="$ac_save_cc"
4918fi
4919
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004920{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4921echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004922if test $ac_cv_opt_olimit_ok = yes; then
4923 case $ac_sys_system in
4924 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4925 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4926 # environment?
4927 Darwin*)
4928 ;;
4929 *)
4930 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4931 ;;
4932 esac
4933else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004934 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4935echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004936 if test "${ac_cv_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004937 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004938else
4939 ac_save_cc="$CC"
4940 CC="$CC -Olimit 1500"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004941 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. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004947
4948int
4949main ()
4950{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004951int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004952 ;
4953 return 0;
4954}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004955_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004956rm -f conftest.$ac_objext
4957if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004958case "(($ac_try" in
4959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4960 *) ac_try_echo=$ac_try;;
4961esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004962eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004963 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004964 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004965 grep -v '^ *+' conftest.er1 >conftest.err
4966 rm -f conftest.er1
4967 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004969 (exit $ac_status); } && {
4970 test -z "$ac_c_werror_flag" ||
4971 test ! -s conftest.err
4972 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004973 ac_cv_olimit_ok=yes
4974else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004975 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004976sed 's/^/| /' conftest.$ac_ext >&5
4977
Gregory P. Smith373469a2009-11-01 21:03:38 +00004978 ac_cv_olimit_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004979fi
4980
Gregory P. Smith373469a2009-11-01 21:03:38 +00004981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004982 CC="$ac_save_cc"
4983fi
4984
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004985 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4986echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004987 if test $ac_cv_olimit_ok = yes; then
4988 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4989 fi
4990fi
4991
4992# Check whether GCC supports PyArg_ParseTuple format
4993if test "$GCC" = "yes"
4994then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004995 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4996echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004997 save_CFLAGS=$CFLAGS
4998 CFLAGS="$CFLAGS -Werror"
4999 cat >conftest.$ac_ext <<_ACEOF
5000/* confdefs.h. */
5001_ACEOF
5002cat confdefs.h >>conftest.$ac_ext
5003cat >>conftest.$ac_ext <<_ACEOF
5004/* end confdefs.h. */
5005
5006 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
5007
5008int
5009main ()
5010{
5011
5012 ;
5013 return 0;
5014}
5015_ACEOF
5016rm -f conftest.$ac_objext
5017if { (ac_try="$ac_compile"
5018case "(($ac_try" in
5019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5020 *) ac_try_echo=$ac_try;;
5021esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005023 (eval "$ac_compile") 2>conftest.er1
5024 ac_status=$?
5025 grep -v '^ *+' conftest.er1 >conftest.err
5026 rm -f conftest.er1
5027 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005029 (exit $ac_status); } && {
5030 test -z "$ac_c_werror_flag" ||
5031 test ! -s conftest.err
5032 } && test -s conftest.$ac_objext; then
5033
5034cat >>confdefs.h <<\_ACEOF
5035#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
5036_ACEOF
5037
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005038 { echo "$as_me:$LINENO: result: yes" >&5
5039echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005040else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005041 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005042sed 's/^/| /' conftest.$ac_ext >&5
5043
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005044 { echo "$as_me:$LINENO: result: no" >&5
5045echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005046
5047fi
5048
5049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5050 CFLAGS=$save_CFLAGS
5051fi
5052
5053# On some compilers, pthreads are available without further options
5054# (e.g. MacOS X). On some of these systems, the compiler will not
5055# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5056# So we have to see first whether pthreads are available without
5057# options before we can check whether -Kpthread improves anything.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005058{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
5059echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005060if test "${ac_cv_pthread_is_default+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005061 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005062else
5063 if test "$cross_compiling" = yes; then
5064 ac_cv_pthread_is_default=no
5065else
5066 cat >conftest.$ac_ext <<_ACEOF
5067/* confdefs.h. */
5068_ACEOF
5069cat confdefs.h >>conftest.$ac_ext
5070cat >>conftest.$ac_ext <<_ACEOF
5071/* end confdefs.h. */
5072
5073#include <pthread.h>
5074
5075void* routine(void* p){return NULL;}
5076
5077int main(){
5078 pthread_t p;
5079 if(pthread_create(&p,NULL,routine,NULL)!=0)
5080 return 1;
5081 (void)pthread_detach(p);
5082 return 0;
5083}
5084
5085_ACEOF
5086rm -f conftest$ac_exeext
5087if { (ac_try="$ac_link"
5088case "(($ac_try" in
5089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5090 *) ac_try_echo=$ac_try;;
5091esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005093 (eval "$ac_link") 2>&5
5094 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005096 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5097 { (case "(($ac_try" in
5098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5099 *) ac_try_echo=$ac_try;;
5100esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005102 (eval "$ac_try") 2>&5
5103 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005105 (exit $ac_status); }; }; then
5106
5107 ac_cv_pthread_is_default=yes
5108 ac_cv_kthread=no
5109 ac_cv_pthread=no
5110
5111else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005112 echo "$as_me: program exited with status $ac_status" >&5
5113echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005114sed 's/^/| /' conftest.$ac_ext >&5
5115
5116( exit $ac_status )
5117ac_cv_pthread_is_default=no
5118fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005119rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5120fi
5121
5122
5123
5124fi
5125
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005126{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5127echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005128
5129
5130if test $ac_cv_pthread_is_default = yes
5131then
5132 ac_cv_kpthread=no
5133else
5134# -Kpthread, if available, provides the right #defines
5135# and linker options to make pthread_create available
5136# Some compilers won't report that they do not support -Kpthread,
5137# so we need to run a program to see whether it really made the
5138# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005139{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5140echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005141if test "${ac_cv_kpthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005142 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005143else
5144 ac_save_cc="$CC"
5145CC="$CC -Kpthread"
5146if test "$cross_compiling" = yes; then
5147 ac_cv_kpthread=no
5148else
5149 cat >conftest.$ac_ext <<_ACEOF
5150/* confdefs.h. */
5151_ACEOF
5152cat confdefs.h >>conftest.$ac_ext
5153cat >>conftest.$ac_ext <<_ACEOF
5154/* end confdefs.h. */
5155
5156#include <pthread.h>
5157
5158void* routine(void* p){return NULL;}
5159
5160int main(){
5161 pthread_t p;
5162 if(pthread_create(&p,NULL,routine,NULL)!=0)
5163 return 1;
5164 (void)pthread_detach(p);
5165 return 0;
5166}
5167
5168_ACEOF
5169rm -f conftest$ac_exeext
5170if { (ac_try="$ac_link"
5171case "(($ac_try" in
5172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5173 *) ac_try_echo=$ac_try;;
5174esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005176 (eval "$ac_link") 2>&5
5177 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005179 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5180 { (case "(($ac_try" in
5181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5182 *) ac_try_echo=$ac_try;;
5183esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005185 (eval "$ac_try") 2>&5
5186 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005188 (exit $ac_status); }; }; then
5189 ac_cv_kpthread=yes
5190else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005191 echo "$as_me: program exited with status $ac_status" >&5
5192echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005193sed 's/^/| /' conftest.$ac_ext >&5
5194
5195( exit $ac_status )
5196ac_cv_kpthread=no
5197fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005198rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5199fi
5200
5201
5202CC="$ac_save_cc"
5203fi
5204
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005205{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5206echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005207fi
5208
5209if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5210then
5211# -Kthread, if available, provides the right #defines
5212# and linker options to make pthread_create available
5213# Some compilers won't report that they do not support -Kthread,
5214# so we need to run a program to see whether it really made the
5215# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005216{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5217echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005218if test "${ac_cv_kthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005219 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005220else
5221 ac_save_cc="$CC"
5222CC="$CC -Kthread"
5223if test "$cross_compiling" = yes; then
5224 ac_cv_kthread=no
5225else
5226 cat >conftest.$ac_ext <<_ACEOF
5227/* confdefs.h. */
5228_ACEOF
5229cat confdefs.h >>conftest.$ac_ext
5230cat >>conftest.$ac_ext <<_ACEOF
5231/* end confdefs.h. */
5232
5233#include <pthread.h>
5234
5235void* routine(void* p){return NULL;}
5236
5237int main(){
5238 pthread_t p;
5239 if(pthread_create(&p,NULL,routine,NULL)!=0)
5240 return 1;
5241 (void)pthread_detach(p);
5242 return 0;
5243}
5244
5245_ACEOF
5246rm -f conftest$ac_exeext
5247if { (ac_try="$ac_link"
5248case "(($ac_try" in
5249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5250 *) ac_try_echo=$ac_try;;
5251esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005253 (eval "$ac_link") 2>&5
5254 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005256 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5257 { (case "(($ac_try" in
5258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5259 *) ac_try_echo=$ac_try;;
5260esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005261eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005262 (eval "$ac_try") 2>&5
5263 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005265 (exit $ac_status); }; }; then
5266 ac_cv_kthread=yes
5267else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005268 echo "$as_me: program exited with status $ac_status" >&5
5269echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005270sed 's/^/| /' conftest.$ac_ext >&5
5271
5272( exit $ac_status )
5273ac_cv_kthread=no
5274fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005275rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5276fi
5277
5278
5279CC="$ac_save_cc"
5280fi
5281
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005282{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5283echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005284fi
5285
5286if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5287then
5288# -pthread, if available, provides the right #defines
5289# and linker options to make pthread_create available
5290# Some compilers won't report that they do not support -pthread,
5291# so we need to run a program to see whether it really made the
5292# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005293{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5294echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005295if test "${ac_cv_thread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005296 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005297else
5298 ac_save_cc="$CC"
5299CC="$CC -pthread"
5300if test "$cross_compiling" = yes; then
5301 ac_cv_pthread=no
5302else
5303 cat >conftest.$ac_ext <<_ACEOF
5304/* confdefs.h. */
5305_ACEOF
5306cat confdefs.h >>conftest.$ac_ext
5307cat >>conftest.$ac_ext <<_ACEOF
5308/* end confdefs.h. */
5309
5310#include <pthread.h>
5311
5312void* routine(void* p){return NULL;}
5313
5314int main(){
5315 pthread_t p;
5316 if(pthread_create(&p,NULL,routine,NULL)!=0)
5317 return 1;
5318 (void)pthread_detach(p);
5319 return 0;
5320}
5321
5322_ACEOF
5323rm -f conftest$ac_exeext
5324if { (ac_try="$ac_link"
5325case "(($ac_try" in
5326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5327 *) ac_try_echo=$ac_try;;
5328esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005330 (eval "$ac_link") 2>&5
5331 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005333 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5334 { (case "(($ac_try" in
5335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5336 *) ac_try_echo=$ac_try;;
5337esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005339 (eval "$ac_try") 2>&5
5340 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005342 (exit $ac_status); }; }; then
5343 ac_cv_pthread=yes
5344else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005345 echo "$as_me: program exited with status $ac_status" >&5
5346echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005347sed 's/^/| /' conftest.$ac_ext >&5
5348
5349( exit $ac_status )
5350ac_cv_pthread=no
5351fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005352rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5353fi
5354
5355
5356CC="$ac_save_cc"
5357fi
5358
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005359{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5360echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005361fi
5362
5363# If we have set a CC compiler flag for thread support then
5364# check if it works for CXX, too.
5365ac_cv_cxx_thread=no
5366if test ! -z "$CXX"
5367then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005368{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5369echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005370ac_save_cxx="$CXX"
5371
5372if test "$ac_cv_kpthread" = "yes"
5373then
5374 CXX="$CXX -Kpthread"
5375 ac_cv_cxx_thread=yes
5376elif test "$ac_cv_kthread" = "yes"
5377then
5378 CXX="$CXX -Kthread"
5379 ac_cv_cxx_thread=yes
5380elif test "$ac_cv_pthread" = "yes"
5381then
5382 CXX="$CXX -pthread"
5383 ac_cv_cxx_thread=yes
5384fi
5385
5386if test $ac_cv_cxx_thread = yes
5387then
5388 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5389 $CXX -c conftest.$ac_ext 2>&5
5390 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5391 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5392 then
5393 ac_cv_cxx_thread=yes
5394 else
5395 ac_cv_cxx_thread=no
5396 fi
5397 rm -fr conftest*
5398fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005399{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5400echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005401fi
5402CXX="$ac_save_cxx"
5403
5404
5405# checks for header files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005406{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5407echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005408if test "${ac_cv_header_stdc+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005409 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005410else
5411 cat >conftest.$ac_ext <<_ACEOF
5412/* confdefs.h. */
5413_ACEOF
5414cat confdefs.h >>conftest.$ac_ext
5415cat >>conftest.$ac_ext <<_ACEOF
5416/* end confdefs.h. */
5417#include <stdlib.h>
5418#include <stdarg.h>
5419#include <string.h>
5420#include <float.h>
5421
5422int
5423main ()
5424{
5425
5426 ;
5427 return 0;
5428}
5429_ACEOF
5430rm -f conftest.$ac_objext
5431if { (ac_try="$ac_compile"
5432case "(($ac_try" in
5433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5434 *) ac_try_echo=$ac_try;;
5435esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005437 (eval "$ac_compile") 2>conftest.er1
5438 ac_status=$?
5439 grep -v '^ *+' conftest.er1 >conftest.err
5440 rm -f conftest.er1
5441 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005443 (exit $ac_status); } && {
5444 test -z "$ac_c_werror_flag" ||
5445 test ! -s conftest.err
5446 } && test -s conftest.$ac_objext; then
5447 ac_cv_header_stdc=yes
5448else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005449 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005450sed 's/^/| /' conftest.$ac_ext >&5
5451
5452 ac_cv_header_stdc=no
5453fi
5454
5455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5456
5457if test $ac_cv_header_stdc = yes; then
5458 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5459 cat >conftest.$ac_ext <<_ACEOF
5460/* confdefs.h. */
5461_ACEOF
5462cat confdefs.h >>conftest.$ac_ext
5463cat >>conftest.$ac_ext <<_ACEOF
5464/* end confdefs.h. */
5465#include <string.h>
5466
5467_ACEOF
5468if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5469 $EGREP "memchr" >/dev/null 2>&1; then
5470 :
5471else
5472 ac_cv_header_stdc=no
5473fi
Ronald Oussoren75912852010-04-08 08:13:31 +00005474rm -f -r conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005475
5476fi
5477
5478if test $ac_cv_header_stdc = yes; then
5479 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5480 cat >conftest.$ac_ext <<_ACEOF
5481/* confdefs.h. */
5482_ACEOF
5483cat confdefs.h >>conftest.$ac_ext
5484cat >>conftest.$ac_ext <<_ACEOF
5485/* end confdefs.h. */
5486#include <stdlib.h>
5487
5488_ACEOF
5489if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5490 $EGREP "free" >/dev/null 2>&1; then
5491 :
5492else
5493 ac_cv_header_stdc=no
5494fi
Ronald Oussoren75912852010-04-08 08:13:31 +00005495rm -f -r conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005496
5497fi
5498
5499if test $ac_cv_header_stdc = yes; then
5500 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5501 if test "$cross_compiling" = yes; then
5502 :
5503else
5504 cat >conftest.$ac_ext <<_ACEOF
5505/* confdefs.h. */
5506_ACEOF
5507cat confdefs.h >>conftest.$ac_ext
5508cat >>conftest.$ac_ext <<_ACEOF
5509/* end confdefs.h. */
5510#include <ctype.h>
5511#include <stdlib.h>
5512#if ((' ' & 0x0FF) == 0x020)
5513# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5514# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5515#else
5516# define ISLOWER(c) \
5517 (('a' <= (c) && (c) <= 'i') \
5518 || ('j' <= (c) && (c) <= 'r') \
5519 || ('s' <= (c) && (c) <= 'z'))
5520# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5521#endif
5522
5523#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5524int
5525main ()
5526{
5527 int i;
5528 for (i = 0; i < 256; i++)
5529 if (XOR (islower (i), ISLOWER (i))
5530 || toupper (i) != TOUPPER (i))
5531 return 2;
5532 return 0;
5533}
5534_ACEOF
5535rm -f conftest$ac_exeext
5536if { (ac_try="$ac_link"
5537case "(($ac_try" in
5538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5539 *) ac_try_echo=$ac_try;;
5540esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005542 (eval "$ac_link") 2>&5
5543 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005545 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5546 { (case "(($ac_try" in
5547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5548 *) ac_try_echo=$ac_try;;
5549esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005551 (eval "$ac_try") 2>&5
5552 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005554 (exit $ac_status); }; }; then
5555 :
5556else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005557 echo "$as_me: program exited with status $ac_status" >&5
5558echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005559sed 's/^/| /' conftest.$ac_ext >&5
5560
5561( exit $ac_status )
5562ac_cv_header_stdc=no
5563fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005564rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5565fi
5566
5567
5568fi
5569fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005570{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5571echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005572if test $ac_cv_header_stdc = yes; then
5573
5574cat >>confdefs.h <<\_ACEOF
5575#define STDC_HEADERS 1
5576_ACEOF
5577
5578fi
5579
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005580# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5591 inttypes.h stdint.h unistd.h
5592do
5593as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5594{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5595echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5596if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5597 echo $ECHO_N "(cached) $ECHO_C" >&6
5598else
5599 cat >conftest.$ac_ext <<_ACEOF
5600/* confdefs.h. */
5601_ACEOF
5602cat confdefs.h >>conftest.$ac_ext
5603cat >>conftest.$ac_ext <<_ACEOF
5604/* end confdefs.h. */
5605$ac_includes_default
5606
5607#include <$ac_header>
5608_ACEOF
5609rm -f conftest.$ac_objext
5610if { (ac_try="$ac_compile"
5611case "(($ac_try" in
5612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5613 *) ac_try_echo=$ac_try;;
5614esac
5615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5616 (eval "$ac_compile") 2>conftest.er1
5617 ac_status=$?
5618 grep -v '^ *+' conftest.er1 >conftest.err
5619 rm -f conftest.er1
5620 cat conftest.err >&5
5621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5622 (exit $ac_status); } && {
5623 test -z "$ac_c_werror_flag" ||
5624 test ! -s conftest.err
5625 } && test -s conftest.$ac_objext; then
5626 eval "$as_ac_Header=yes"
5627else
5628 echo "$as_me: failed program was:" >&5
5629sed 's/^/| /' conftest.$ac_ext >&5
5630
5631 eval "$as_ac_Header=no"
5632fi
5633
5634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5635fi
5636ac_res=`eval echo '${'$as_ac_Header'}'`
5637 { echo "$as_me:$LINENO: result: $ac_res" >&5
5638echo "${ECHO_T}$ac_res" >&6; }
5639if test `eval echo '${'$as_ac_Header'}'` = yes; then
5640 cat >>confdefs.h <<_ACEOF
5641#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5642_ACEOF
5643
5644fi
5645
5646done
5647
5648
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005649
Martin v. Löwis11437992002-04-12 09:54:03 +00005650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
Anthony Baxter8a560de2004-10-13 15:30:56 +00005685
Martin v. Löwisc3001752005-01-23 09:27:24 +00005686
Martin v. Löwis11017b12006-01-14 18:12:57 +00005687
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005688
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005689
5690
5691
5692
5693
5694
5695
5696
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005697
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005698
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005699
5700
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005701
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005702
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005703
5704
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005705for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5706fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005707ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005708shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005709unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005710sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5711sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005712sys/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 +00005713sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005714sys/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 +00005715sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005716bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005717do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005718as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005719if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005720 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5721echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005722if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005723 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005724fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005725ac_res=`eval echo '${'$as_ac_Header'}'`
5726 { echo "$as_me:$LINENO: result: $ac_res" >&5
5727echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005728else
Martin v. Löwis11437992002-04-12 09:54:03 +00005729 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005730{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5731echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005732cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005733/* confdefs.h. */
5734_ACEOF
5735cat confdefs.h >>conftest.$ac_ext
5736cat >>conftest.$ac_ext <<_ACEOF
5737/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005738$ac_includes_default
5739#include <$ac_header>
5740_ACEOF
5741rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005742if { (ac_try="$ac_compile"
5743case "(($ac_try" in
5744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5745 *) ac_try_echo=$ac_try;;
5746esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005748 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005749 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005750 grep -v '^ *+' conftest.er1 >conftest.err
5751 rm -f conftest.er1
5752 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005754 (exit $ac_status); } && {
5755 test -z "$ac_c_werror_flag" ||
5756 test ! -s conftest.err
5757 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005758 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005759else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005760 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005761sed 's/^/| /' conftest.$ac_ext >&5
5762
Martin v. Löwiseba40652007-08-30 20:10:57 +00005763 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005764fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005765
5766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005767{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5768echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005769
5770# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005771{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5772echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005773cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005774/* confdefs.h. */
5775_ACEOF
5776cat confdefs.h >>conftest.$ac_ext
5777cat >>conftest.$ac_ext <<_ACEOF
5778/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005779#include <$ac_header>
5780_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005781if { (ac_try="$ac_cpp conftest.$ac_ext"
5782case "(($ac_try" in
5783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5784 *) ac_try_echo=$ac_try;;
5785esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005787 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005788 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005789 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005790 rm -f conftest.er1
5791 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005793 (exit $ac_status); } >/dev/null && {
5794 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5795 test ! -s conftest.err
5796 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005797 ac_header_preproc=yes
5798else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005799 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005800sed 's/^/| /' conftest.$ac_ext >&5
5801
Martin v. Löwis11437992002-04-12 09:54:03 +00005802 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005803fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005804
Martin v. Löwis11437992002-04-12 09:54:03 +00005805rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005806{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5807echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005808
5809# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005810case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5811 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005812 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5813echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5814 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5815echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005816 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005817 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005818 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005819 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5820echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5821 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5822echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5823 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5824echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5825 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5826echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5827 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5828echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5829 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5830echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005831 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00005832## -------------------------------------- ##
5833## Report this to http://bugs.python.org/ ##
5834## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005835_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005836 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005837 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005838esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005839{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5840echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005841if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005842 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005843else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005844 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005845fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005846ac_res=`eval echo '${'$as_ac_Header'}'`
5847 { echo "$as_me:$LINENO: result: $ac_res" >&5
5848echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005849
5850fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005851if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005852 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005853#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005854_ACEOF
5855
5856fi
5857
Guido van Rossum627b2d71993-12-24 10:39:16 +00005858done
5859
Martin v. Löwis11437992002-04-12 09:54:03 +00005860
5861
5862
5863
5864
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005865ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005866for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005867 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5868{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5869echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005870if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005871 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005872else
Martin v. Löwis11437992002-04-12 09:54:03 +00005873 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005874/* confdefs.h. */
5875_ACEOF
5876cat confdefs.h >>conftest.$ac_ext
5877cat >>conftest.$ac_ext <<_ACEOF
5878/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005879#include <sys/types.h>
5880#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005881
Martin v. Löwis11437992002-04-12 09:54:03 +00005882int
5883main ()
5884{
5885if ((DIR *) 0)
5886return 0;
5887 ;
5888 return 0;
5889}
5890_ACEOF
5891rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005892if { (ac_try="$ac_compile"
5893case "(($ac_try" in
5894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5895 *) ac_try_echo=$ac_try;;
5896esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005898 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005899 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005900 grep -v '^ *+' conftest.er1 >conftest.err
5901 rm -f conftest.er1
5902 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005904 (exit $ac_status); } && {
5905 test -z "$ac_c_werror_flag" ||
5906 test ! -s conftest.err
5907 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005908 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005909else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005910 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005911sed 's/^/| /' conftest.$ac_ext >&5
5912
Martin v. Löwiseba40652007-08-30 20:10:57 +00005913 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005914fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005915
5916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005917fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005918ac_res=`eval echo '${'$as_ac_Header'}'`
5919 { echo "$as_me:$LINENO: result: $ac_res" >&5
5920echo "${ECHO_T}$ac_res" >&6; }
5921if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005922 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005923#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005924_ACEOF
5925
5926ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005927fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005928
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005929done
5930# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5931if test $ac_header_dirent = dirent.h; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005932 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5933echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005934if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005935 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005936else
Martin v. Löwis11437992002-04-12 09:54:03 +00005937 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005938cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005939/* confdefs.h. */
5940_ACEOF
5941cat confdefs.h >>conftest.$ac_ext
5942cat >>conftest.$ac_ext <<_ACEOF
5943/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005944
Martin v. Löwiseba40652007-08-30 20:10:57 +00005945/* Override any GCC internal prototype to avoid an error.
5946 Use char because int might match the return type of a GCC
5947 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005948#ifdef __cplusplus
5949extern "C"
5950#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005951char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005952int
5953main ()
5954{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005955return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005956 ;
5957 return 0;
5958}
5959_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005960for ac_lib in '' dir; do
5961 if test -z "$ac_lib"; then
5962 ac_res="none required"
5963 else
5964 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005965 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005966 fi
5967 rm -f conftest.$ac_objext conftest$ac_exeext
5968if { (ac_try="$ac_link"
5969case "(($ac_try" in
5970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5971 *) ac_try_echo=$ac_try;;
5972esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005973eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005974 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005975 ac_status=$?
5976 grep -v '^ *+' conftest.er1 >conftest.err
5977 rm -f conftest.er1
5978 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005980 (exit $ac_status); } && {
5981 test -z "$ac_c_werror_flag" ||
5982 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005983 } && test -s conftest$ac_exeext &&
5984 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005985 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005986else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005987 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00005988sed 's/^/| /' conftest.$ac_ext >&5
5989
Martin v. Löwiseba40652007-08-30 20:10:57 +00005990
Brett Cannon19fab762007-06-02 03:02:29 +00005991fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005992
5993rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5994 conftest$ac_exeext
5995 if test "${ac_cv_search_opendir+set}" = set; then
5996 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005997fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005998done
5999if test "${ac_cv_search_opendir+set}" = set; then
6000 :
6001else
6002 ac_cv_search_opendir=no
6003fi
6004rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006005LIBS=$ac_func_search_save_LIBS
6006fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006007{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6008echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006009ac_res=$ac_cv_search_opendir
6010if test "$ac_res" != no; then
6011 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006012
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006013fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006014
Michael W. Hudson54241132001-12-07 15:38:26 +00006015else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006016 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
6017echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006018if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006019 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006020else
6021 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00006022cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006023/* confdefs.h. */
6024_ACEOF
6025cat confdefs.h >>conftest.$ac_ext
6026cat >>conftest.$ac_ext <<_ACEOF
6027/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006028
Martin v. Löwiseba40652007-08-30 20:10:57 +00006029/* Override any GCC internal prototype to avoid an error.
6030 Use char because int might match the return type of a GCC
6031 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006032#ifdef __cplusplus
6033extern "C"
6034#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006035char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006036int
6037main ()
6038{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006039return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006040 ;
6041 return 0;
6042}
6043_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006044for ac_lib in '' x; do
6045 if test -z "$ac_lib"; then
6046 ac_res="none required"
6047 else
6048 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006049 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006050 fi
6051 rm -f conftest.$ac_objext conftest$ac_exeext
6052if { (ac_try="$ac_link"
6053case "(($ac_try" in
6054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6055 *) ac_try_echo=$ac_try;;
6056esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006058 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00006059 ac_status=$?
6060 grep -v '^ *+' conftest.er1 >conftest.err
6061 rm -f conftest.er1
6062 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006064 (exit $ac_status); } && {
6065 test -z "$ac_c_werror_flag" ||
6066 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006067 } && test -s conftest$ac_exeext &&
6068 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006069 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006070else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006071 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006072sed 's/^/| /' conftest.$ac_ext >&5
6073
Martin v. Löwiseba40652007-08-30 20:10:57 +00006074
Brett Cannon19fab762007-06-02 03:02:29 +00006075fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006076
6077rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6078 conftest$ac_exeext
6079 if test "${ac_cv_search_opendir+set}" = set; then
6080 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006081fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006082done
6083if test "${ac_cv_search_opendir+set}" = set; then
6084 :
6085else
6086 ac_cv_search_opendir=no
6087fi
6088rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006089LIBS=$ac_func_search_save_LIBS
6090fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006091{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6092echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006093ac_res=$ac_cv_search_opendir
6094if test "$ac_res" != no; then
6095 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006096
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006097fi
6098
6099fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006100
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006101{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6102echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006103if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006104 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006105else
6106 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006107/* confdefs.h. */
6108_ACEOF
6109cat confdefs.h >>conftest.$ac_ext
6110cat >>conftest.$ac_ext <<_ACEOF
6111/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006112#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006113int
6114main ()
6115{
6116return makedev(0, 0);
6117 ;
6118 return 0;
6119}
6120_ACEOF
6121rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006122if { (ac_try="$ac_link"
6123case "(($ac_try" in
6124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6125 *) ac_try_echo=$ac_try;;
6126esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006128 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006129 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006130 grep -v '^ *+' conftest.er1 >conftest.err
6131 rm -f conftest.er1
6132 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006134 (exit $ac_status); } && {
6135 test -z "$ac_c_werror_flag" ||
6136 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006137 } && test -s conftest$ac_exeext &&
6138 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006139 ac_cv_header_sys_types_h_makedev=yes
6140else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006141 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006142sed 's/^/| /' conftest.$ac_ext >&5
6143
Martin v. Löwiseba40652007-08-30 20:10:57 +00006144 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006145fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006146
6147rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006148 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006149
6150fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006151{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6152echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006153
6154if test $ac_cv_header_sys_types_h_makedev = no; then
6155if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006156 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6157echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006158if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006159 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006160fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006161{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6162echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006163else
6164 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006165{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6166echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006167cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006168/* confdefs.h. */
6169_ACEOF
6170cat confdefs.h >>conftest.$ac_ext
6171cat >>conftest.$ac_ext <<_ACEOF
6172/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006173$ac_includes_default
6174#include <sys/mkdev.h>
6175_ACEOF
6176rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006177if { (ac_try="$ac_compile"
6178case "(($ac_try" in
6179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6180 *) ac_try_echo=$ac_try;;
6181esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006183 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006184 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006185 grep -v '^ *+' conftest.er1 >conftest.err
6186 rm -f conftest.er1
6187 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006189 (exit $ac_status); } && {
6190 test -z "$ac_c_werror_flag" ||
6191 test ! -s conftest.err
6192 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006193 ac_header_compiler=yes
6194else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006195 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006196sed 's/^/| /' conftest.$ac_ext >&5
6197
Martin v. Löwiseba40652007-08-30 20:10:57 +00006198 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006199fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006200
6201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006202{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6203echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006204
6205# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006206{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6207echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006208cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006209/* confdefs.h. */
6210_ACEOF
6211cat confdefs.h >>conftest.$ac_ext
6212cat >>conftest.$ac_ext <<_ACEOF
6213/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006214#include <sys/mkdev.h>
6215_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006216if { (ac_try="$ac_cpp conftest.$ac_ext"
6217case "(($ac_try" in
6218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6219 *) ac_try_echo=$ac_try;;
6220esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006221eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006222 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006223 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006224 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006225 rm -f conftest.er1
6226 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006228 (exit $ac_status); } >/dev/null && {
6229 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6230 test ! -s conftest.err
6231 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006232 ac_header_preproc=yes
6233else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006234 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006235sed 's/^/| /' conftest.$ac_ext >&5
6236
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006237 ac_header_preproc=no
6238fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006239
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006240rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006241{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6242echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006243
6244# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006245case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6246 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006247 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6248echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6249 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6250echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006251 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006252 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006253 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006254 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6255echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6256 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6257echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6258 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6259echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6260 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6261echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6262 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6263echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6264 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6265echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006266 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006267## -------------------------------------- ##
6268## Report this to http://bugs.python.org/ ##
6269## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006270_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006271 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006272 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006273esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006274{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6275echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006276if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006277 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006278else
6279 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6280fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006281{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6282echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006283
6284fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006285if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006286
6287cat >>confdefs.h <<\_ACEOF
6288#define MAJOR_IN_MKDEV 1
6289_ACEOF
6290
6291fi
6292
6293
6294
6295 if test $ac_cv_header_sys_mkdev_h = no; then
6296 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006297 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6298echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006299if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006300 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006301fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006302{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6303echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006304else
6305 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006306{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6307echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006308cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006309/* confdefs.h. */
6310_ACEOF
6311cat confdefs.h >>conftest.$ac_ext
6312cat >>conftest.$ac_ext <<_ACEOF
6313/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006314$ac_includes_default
6315#include <sys/sysmacros.h>
6316_ACEOF
6317rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006318if { (ac_try="$ac_compile"
6319case "(($ac_try" in
6320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6321 *) ac_try_echo=$ac_try;;
6322esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006324 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006325 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006326 grep -v '^ *+' conftest.er1 >conftest.err
6327 rm -f conftest.er1
6328 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006330 (exit $ac_status); } && {
6331 test -z "$ac_c_werror_flag" ||
6332 test ! -s conftest.err
6333 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006334 ac_header_compiler=yes
6335else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006336 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006337sed 's/^/| /' conftest.$ac_ext >&5
6338
Martin v. Löwiseba40652007-08-30 20:10:57 +00006339 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006340fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006341
6342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006343{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6344echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006345
6346# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006347{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6348echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006349cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006350/* confdefs.h. */
6351_ACEOF
6352cat confdefs.h >>conftest.$ac_ext
6353cat >>conftest.$ac_ext <<_ACEOF
6354/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006355#include <sys/sysmacros.h>
6356_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006357if { (ac_try="$ac_cpp conftest.$ac_ext"
6358case "(($ac_try" in
6359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6360 *) ac_try_echo=$ac_try;;
6361esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006363 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006364 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006365 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006366 rm -f conftest.er1
6367 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006369 (exit $ac_status); } >/dev/null && {
6370 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6371 test ! -s conftest.err
6372 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006373 ac_header_preproc=yes
6374else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006375 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006376sed 's/^/| /' conftest.$ac_ext >&5
6377
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006378 ac_header_preproc=no
6379fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006380
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006381rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006382{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6383echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006384
6385# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006386case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6387 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006388 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6389echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6390 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6391echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006392 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006393 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006394 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006395 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6396echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6397 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6398echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6399 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6400echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6401 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6402echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6403 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6404echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6405 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6406echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006407 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006408## -------------------------------------- ##
6409## Report this to http://bugs.python.org/ ##
6410## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006411_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006412 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006413 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006414esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006415{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6416echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006417if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006418 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006419else
6420 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6421fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006422{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6423echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006424
6425fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006426if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006427
6428cat >>confdefs.h <<\_ACEOF
6429#define MAJOR_IN_SYSMACROS 1
6430_ACEOF
6431
6432fi
6433
6434
6435 fi
6436fi
6437
Michael W. Hudson54241132001-12-07 15:38:26 +00006438
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006439# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006440
6441for ac_header in term.h
6442do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006443as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6444{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6445echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006446if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006447 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006448else
6449 cat >conftest.$ac_ext <<_ACEOF
6450/* confdefs.h. */
6451_ACEOF
6452cat confdefs.h >>conftest.$ac_ext
6453cat >>conftest.$ac_ext <<_ACEOF
6454/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006455
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006456#ifdef HAVE_CURSES_H
6457#include <curses.h>
6458#endif
6459
6460
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006461#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006462_ACEOF
6463rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006464if { (ac_try="$ac_compile"
6465case "(($ac_try" in
6466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6467 *) ac_try_echo=$ac_try;;
6468esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006470 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006471 ac_status=$?
6472 grep -v '^ *+' conftest.er1 >conftest.err
6473 rm -f conftest.er1
6474 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006476 (exit $ac_status); } && {
6477 test -z "$ac_c_werror_flag" ||
6478 test ! -s conftest.err
6479 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006480 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006481else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006482 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006483sed 's/^/| /' conftest.$ac_ext >&5
6484
Martin v. Löwiseba40652007-08-30 20:10:57 +00006485 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006486fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006487
6488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006489fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006490ac_res=`eval echo '${'$as_ac_Header'}'`
6491 { echo "$as_me:$LINENO: result: $ac_res" >&5
6492echo "${ECHO_T}$ac_res" >&6; }
6493if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006494 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006495#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006496_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006497
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006498fi
6499
6500done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006501
6502
Martin v. Löwis11017b12006-01-14 18:12:57 +00006503# On Linux, netlink.h requires asm/types.h
6504
6505for ac_header in linux/netlink.h
6506do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006507as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6508{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6509echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006510if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006511 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006512else
6513 cat >conftest.$ac_ext <<_ACEOF
6514/* confdefs.h. */
6515_ACEOF
6516cat confdefs.h >>conftest.$ac_ext
6517cat >>conftest.$ac_ext <<_ACEOF
6518/* end confdefs.h. */
6519
6520#ifdef HAVE_ASM_TYPES_H
6521#include <asm/types.h>
6522#endif
6523#ifdef HAVE_SYS_SOCKET_H
6524#include <sys/socket.h>
6525#endif
6526
6527
6528#include <$ac_header>
6529_ACEOF
6530rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006531if { (ac_try="$ac_compile"
6532case "(($ac_try" in
6533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6534 *) ac_try_echo=$ac_try;;
6535esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006537 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006538 ac_status=$?
6539 grep -v '^ *+' conftest.er1 >conftest.err
6540 rm -f conftest.er1
6541 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006543 (exit $ac_status); } && {
6544 test -z "$ac_c_werror_flag" ||
6545 test ! -s conftest.err
6546 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006547 eval "$as_ac_Header=yes"
6548else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006549 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006550sed 's/^/| /' conftest.$ac_ext >&5
6551
Martin v. Löwiseba40652007-08-30 20:10:57 +00006552 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006553fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006554
6555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006556fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006557ac_res=`eval echo '${'$as_ac_Header'}'`
6558 { echo "$as_me:$LINENO: result: $ac_res" >&5
6559echo "${ECHO_T}$ac_res" >&6; }
6560if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006561 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006562#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006563_ACEOF
6564
6565fi
6566
6567done
6568
6569
Guido van Rossum627b2d71993-12-24 10:39:16 +00006570# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006571was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006572{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6573echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006574cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006575/* confdefs.h. */
6576_ACEOF
6577cat confdefs.h >>conftest.$ac_ext
6578cat >>conftest.$ac_ext <<_ACEOF
6579/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006580#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006581
6582_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006583if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006584 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006585 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006586else
Martin v. Löwis11437992002-04-12 09:54:03 +00006587
6588
6589cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006590#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006591_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006592
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006593
Guido van Rossum627b2d71993-12-24 10:39:16 +00006594fi
Ronald Oussoren75912852010-04-08 08:13:31 +00006595rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006596
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006597{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6598echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006599
Neal Norwitz11690112002-07-30 01:08:28 +00006600# Check whether using makedev requires defining _OSF_SOURCE
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006601{ echo "$as_me:$LINENO: checking for makedev" >&5
6602echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006603cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006604/* confdefs.h. */
6605_ACEOF
6606cat confdefs.h >>conftest.$ac_ext
6607cat >>conftest.$ac_ext <<_ACEOF
6608/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006609#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006610int
6611main ()
6612{
6613 makedev(0, 0)
6614 ;
6615 return 0;
6616}
6617_ACEOF
6618rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006619if { (ac_try="$ac_link"
6620case "(($ac_try" in
6621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6622 *) ac_try_echo=$ac_try;;
6623esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006625 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006626 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006627 grep -v '^ *+' conftest.er1 >conftest.err
6628 rm -f conftest.er1
6629 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006631 (exit $ac_status); } && {
6632 test -z "$ac_c_werror_flag" ||
6633 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006634 } && test -s conftest$ac_exeext &&
6635 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006636 ac_cv_has_makedev=yes
6637else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006638 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006639sed 's/^/| /' conftest.$ac_ext >&5
6640
Martin v. Löwiseba40652007-08-30 20:10:57 +00006641 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006642fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006643
6644rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006645 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006646if test "$ac_cv_has_makedev" = "no"; then
6647 # we didn't link, try if _OSF_SOURCE will allow us to link
6648 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006649/* confdefs.h. */
6650_ACEOF
6651cat confdefs.h >>conftest.$ac_ext
6652cat >>conftest.$ac_ext <<_ACEOF
6653/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006654
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006655#define _OSF_SOURCE 1
6656#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006657
Neal Norwitz11690112002-07-30 01:08:28 +00006658int
6659main ()
6660{
6661 makedev(0, 0)
6662 ;
6663 return 0;
6664}
6665_ACEOF
6666rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006667if { (ac_try="$ac_link"
6668case "(($ac_try" in
6669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6670 *) ac_try_echo=$ac_try;;
6671esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006673 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006674 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006675 grep -v '^ *+' conftest.er1 >conftest.err
6676 rm -f conftest.er1
6677 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006679 (exit $ac_status); } && {
6680 test -z "$ac_c_werror_flag" ||
6681 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006682 } && test -s conftest$ac_exeext &&
6683 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006684 ac_cv_has_makedev=yes
6685else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006686 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006687sed 's/^/| /' conftest.$ac_ext >&5
6688
Martin v. Löwiseba40652007-08-30 20:10:57 +00006689 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006690fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006691
6692rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006693 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006694 if test "$ac_cv_has_makedev" = "yes"; then
6695
6696cat >>confdefs.h <<\_ACEOF
6697#define _OSF_SOURCE 1
6698_ACEOF
6699
6700 fi
6701fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006702{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6703echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006704if test "$ac_cv_has_makedev" = "yes"; then
6705
6706cat >>confdefs.h <<\_ACEOF
6707#define HAVE_MAKEDEV 1
6708_ACEOF
6709
6710fi
6711
Martin v. Löwis399a6892002-10-04 10:22:02 +00006712# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6713# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6714# defined, but the compiler does not support pragma redefine_extname,
6715# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6716# structures (such as rlimit64) without declaring them. As a
6717# work-around, disable LFS on such configurations
6718
6719use_lfs=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006720{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6721echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006722cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006723/* confdefs.h. */
6724_ACEOF
6725cat confdefs.h >>conftest.$ac_ext
6726cat >>conftest.$ac_ext <<_ACEOF
6727/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006728
6729#define _LARGEFILE_SOURCE 1
6730#define _FILE_OFFSET_BITS 64
6731#include <sys/resource.h>
6732
Martin v. Löwis399a6892002-10-04 10:22:02 +00006733int
6734main ()
6735{
6736struct rlimit foo;
6737 ;
6738 return 0;
6739}
6740_ACEOF
6741rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006742if { (ac_try="$ac_compile"
6743case "(($ac_try" in
6744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6745 *) ac_try_echo=$ac_try;;
6746esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006748 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006749 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006750 grep -v '^ *+' conftest.er1 >conftest.err
6751 rm -f conftest.er1
6752 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006754 (exit $ac_status); } && {
6755 test -z "$ac_c_werror_flag" ||
6756 test ! -s conftest.err
6757 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006758 sol_lfs_bug=no
6759else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006760 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006761sed 's/^/| /' conftest.$ac_ext >&5
6762
Martin v. Löwiseba40652007-08-30 20:10:57 +00006763 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006764fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006765
6766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006767{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6768echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006769if test "$sol_lfs_bug" = "yes"; then
6770 use_lfs=no
6771fi
6772
6773if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006774# Two defines needed to enable largefile support on various platforms
6775# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006776
Martin v. Löwis11437992002-04-12 09:54:03 +00006777cat >>confdefs.h <<\_ACEOF
6778#define _LARGEFILE_SOURCE 1
6779_ACEOF
6780
6781
6782cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006783#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006784_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006785
Martin v. Löwis399a6892002-10-04 10:22:02 +00006786fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006787
Guido van Rossum84e7b241996-08-19 21:59:00 +00006788# Add some code to confdefs.h so that the test for off_t works on SCO
6789cat >> confdefs.h <<\EOF
6790#if defined(SCO_DS)
6791#undef _OFF_T
6792#endif
6793EOF
6794
Guido van Rossumef2255b2000-03-10 22:30:29 +00006795# Type availability checks
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006796{ echo "$as_me:$LINENO: checking for mode_t" >&5
6797echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006798if test "${ac_cv_type_mode_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006799 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006800else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006801 cat >conftest.$ac_ext <<_ACEOF
6802/* confdefs.h. */
6803_ACEOF
6804cat confdefs.h >>conftest.$ac_ext
6805cat >>conftest.$ac_ext <<_ACEOF
6806/* end confdefs.h. */
6807$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006808typedef mode_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006809int
6810main ()
6811{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006812if ((ac__type_new_ *) 0)
6813 return 0;
6814if (sizeof (ac__type_new_))
6815 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006816 ;
6817 return 0;
6818}
6819_ACEOF
6820rm -f conftest.$ac_objext
6821if { (ac_try="$ac_compile"
6822case "(($ac_try" in
6823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6824 *) ac_try_echo=$ac_try;;
6825esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006827 (eval "$ac_compile") 2>conftest.er1
6828 ac_status=$?
6829 grep -v '^ *+' conftest.er1 >conftest.err
6830 rm -f conftest.er1
6831 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006833 (exit $ac_status); } && {
6834 test -z "$ac_c_werror_flag" ||
6835 test ! -s conftest.err
6836 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006837 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006838else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006839 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006840sed 's/^/| /' conftest.$ac_ext >&5
6841
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006842 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006843fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006844
6845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006846fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006847{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6848echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6849if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006850 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006851else
Martin v. Löwis11437992002-04-12 09:54:03 +00006852
6853cat >>confdefs.h <<_ACEOF
6854#define mode_t int
6855_ACEOF
6856
6857fi
6858
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006859{ echo "$as_me:$LINENO: checking for off_t" >&5
6860echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006861if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006862 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006863else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006864 cat >conftest.$ac_ext <<_ACEOF
6865/* confdefs.h. */
6866_ACEOF
6867cat confdefs.h >>conftest.$ac_ext
6868cat >>conftest.$ac_ext <<_ACEOF
6869/* end confdefs.h. */
6870$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006871typedef off_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006872int
6873main ()
6874{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006875if ((ac__type_new_ *) 0)
6876 return 0;
6877if (sizeof (ac__type_new_))
6878 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006879 ;
6880 return 0;
6881}
6882_ACEOF
6883rm -f conftest.$ac_objext
6884if { (ac_try="$ac_compile"
6885case "(($ac_try" in
6886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6887 *) ac_try_echo=$ac_try;;
6888esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006890 (eval "$ac_compile") 2>conftest.er1
6891 ac_status=$?
6892 grep -v '^ *+' conftest.er1 >conftest.err
6893 rm -f conftest.er1
6894 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006896 (exit $ac_status); } && {
6897 test -z "$ac_c_werror_flag" ||
6898 test ! -s conftest.err
6899 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006900 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006901else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006902 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006903sed 's/^/| /' conftest.$ac_ext >&5
6904
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006905 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006906fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006907
6908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006909fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006910{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6911echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6912if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006913 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006914else
Martin v. Löwis11437992002-04-12 09:54:03 +00006915
6916cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006917#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006918_ACEOF
6919
6920fi
6921
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006922{ echo "$as_me:$LINENO: checking for pid_t" >&5
6923echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006924if test "${ac_cv_type_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006925 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006926else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006927 cat >conftest.$ac_ext <<_ACEOF
6928/* confdefs.h. */
6929_ACEOF
6930cat confdefs.h >>conftest.$ac_ext
6931cat >>conftest.$ac_ext <<_ACEOF
6932/* end confdefs.h. */
6933$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006934typedef pid_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006935int
6936main ()
6937{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006938if ((ac__type_new_ *) 0)
6939 return 0;
6940if (sizeof (ac__type_new_))
6941 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006942 ;
6943 return 0;
6944}
6945_ACEOF
6946rm -f conftest.$ac_objext
6947if { (ac_try="$ac_compile"
6948case "(($ac_try" in
6949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6950 *) ac_try_echo=$ac_try;;
6951esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006953 (eval "$ac_compile") 2>conftest.er1
6954 ac_status=$?
6955 grep -v '^ *+' conftest.er1 >conftest.err
6956 rm -f conftest.er1
6957 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006959 (exit $ac_status); } && {
6960 test -z "$ac_c_werror_flag" ||
6961 test ! -s conftest.err
6962 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006963 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006964else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006965 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006966sed 's/^/| /' conftest.$ac_ext >&5
6967
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006968 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006969fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006970
6971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006972fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006973{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6974echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6975if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006976 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006977else
Martin v. Löwis11437992002-04-12 09:54:03 +00006978
6979cat >>confdefs.h <<_ACEOF
6980#define pid_t int
6981_ACEOF
6982
6983fi
6984
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006985{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6986echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006987if test "${ac_cv_type_signal+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006988 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006989else
6990 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006991/* confdefs.h. */
6992_ACEOF
6993cat confdefs.h >>conftest.$ac_ext
6994cat >>conftest.$ac_ext <<_ACEOF
6995/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006996#include <sys/types.h>
6997#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006998
Martin v. Löwis11437992002-04-12 09:54:03 +00006999int
7000main ()
7001{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007002return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007003 ;
7004 return 0;
7005}
7006_ACEOF
7007rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007008if { (ac_try="$ac_compile"
7009case "(($ac_try" in
7010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7011 *) ac_try_echo=$ac_try;;
7012esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007014 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007015 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007016 grep -v '^ *+' conftest.er1 >conftest.err
7017 rm -f conftest.er1
7018 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007020 (exit $ac_status); } && {
7021 test -z "$ac_c_werror_flag" ||
7022 test ! -s conftest.err
7023 } && test -s conftest.$ac_objext; then
7024 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00007025else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007026 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007027sed 's/^/| /' conftest.$ac_ext >&5
7028
Martin v. Löwiseba40652007-08-30 20:10:57 +00007029 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00007030fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007031
7032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007033fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007034{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7035echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007036
Martin v. Löwis11437992002-04-12 09:54:03 +00007037cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007038#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00007039_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007040
Michael W. Hudson54241132001-12-07 15:38:26 +00007041
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007042{ echo "$as_me:$LINENO: checking for size_t" >&5
7043echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007044if test "${ac_cv_type_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007045 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007046else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007047 cat >conftest.$ac_ext <<_ACEOF
7048/* confdefs.h. */
7049_ACEOF
7050cat confdefs.h >>conftest.$ac_ext
7051cat >>conftest.$ac_ext <<_ACEOF
7052/* end confdefs.h. */
7053$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007054typedef size_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007055int
7056main ()
7057{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007058if ((ac__type_new_ *) 0)
7059 return 0;
7060if (sizeof (ac__type_new_))
7061 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007062 ;
7063 return 0;
7064}
7065_ACEOF
7066rm -f conftest.$ac_objext
7067if { (ac_try="$ac_compile"
7068case "(($ac_try" in
7069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7070 *) ac_try_echo=$ac_try;;
7071esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007073 (eval "$ac_compile") 2>conftest.er1
7074 ac_status=$?
7075 grep -v '^ *+' conftest.er1 >conftest.err
7076 rm -f conftest.er1
7077 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007079 (exit $ac_status); } && {
7080 test -z "$ac_c_werror_flag" ||
7081 test ! -s conftest.err
7082 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007083 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007084else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007085 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007086sed 's/^/| /' conftest.$ac_ext >&5
7087
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007088 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007089fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007090
7091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007092fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007093{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7094echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7095if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007096 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007097else
Martin v. Löwis11437992002-04-12 09:54:03 +00007098
7099cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007100#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007101_ACEOF
7102
7103fi
7104
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007105{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7106echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007107if test "${ac_cv_type_uid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007108 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007109else
7110 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007111/* confdefs.h. */
7112_ACEOF
7113cat confdefs.h >>conftest.$ac_ext
7114cat >>conftest.$ac_ext <<_ACEOF
7115/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007116#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007117
7118_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007119if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007120 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007121 ac_cv_type_uid_t=yes
7122else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007123 ac_cv_type_uid_t=no
7124fi
Ronald Oussoren75912852010-04-08 08:13:31 +00007125rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007126
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007127fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007128{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7129echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007130if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007131
Martin v. Löwis11437992002-04-12 09:54:03 +00007132cat >>confdefs.h <<\_ACEOF
7133#define uid_t int
7134_ACEOF
7135
7136
7137cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007138#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007139_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007140
7141fi
7142
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007143
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007144 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7145echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007146if test "${ac_cv_c_uint32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007147 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007148else
7149 ac_cv_c_uint32_t=no
7150 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7151 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7152 cat >conftest.$ac_ext <<_ACEOF
7153/* confdefs.h. */
7154_ACEOF
7155cat confdefs.h >>conftest.$ac_ext
7156cat >>conftest.$ac_ext <<_ACEOF
7157/* end confdefs.h. */
7158$ac_includes_default
7159int
7160main ()
7161{
7162static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7163test_array [0] = 0
7164
7165 ;
7166 return 0;
7167}
7168_ACEOF
7169rm -f conftest.$ac_objext
7170if { (ac_try="$ac_compile"
7171case "(($ac_try" in
7172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7173 *) ac_try_echo=$ac_try;;
7174esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007176 (eval "$ac_compile") 2>conftest.er1
7177 ac_status=$?
7178 grep -v '^ *+' conftest.er1 >conftest.err
7179 rm -f conftest.er1
7180 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007182 (exit $ac_status); } && {
7183 test -z "$ac_c_werror_flag" ||
7184 test ! -s conftest.err
7185 } && test -s conftest.$ac_objext; then
7186 case $ac_type in
7187 uint32_t) ac_cv_c_uint32_t=yes ;;
7188 *) ac_cv_c_uint32_t=$ac_type ;;
7189esac
7190
7191else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007192 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007193sed 's/^/| /' conftest.$ac_ext >&5
7194
7195
7196fi
7197
7198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7199 test "$ac_cv_c_uint32_t" != no && break
7200 done
7201fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007202{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7203echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007204 case $ac_cv_c_uint32_t in #(
7205 no|yes) ;; #(
7206 *)
7207
7208cat >>confdefs.h <<\_ACEOF
7209#define _UINT32_T 1
7210_ACEOF
7211
7212
7213cat >>confdefs.h <<_ACEOF
7214#define uint32_t $ac_cv_c_uint32_t
7215_ACEOF
7216;;
7217 esac
7218
7219
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007220 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7221echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007222if test "${ac_cv_c_uint64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007223 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007224else
7225 ac_cv_c_uint64_t=no
7226 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7227 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7228 cat >conftest.$ac_ext <<_ACEOF
7229/* confdefs.h. */
7230_ACEOF
7231cat confdefs.h >>conftest.$ac_ext
7232cat >>conftest.$ac_ext <<_ACEOF
7233/* end confdefs.h. */
7234$ac_includes_default
7235int
7236main ()
7237{
7238static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7239test_array [0] = 0
7240
7241 ;
7242 return 0;
7243}
7244_ACEOF
7245rm -f conftest.$ac_objext
7246if { (ac_try="$ac_compile"
7247case "(($ac_try" in
7248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7249 *) ac_try_echo=$ac_try;;
7250esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007252 (eval "$ac_compile") 2>conftest.er1
7253 ac_status=$?
7254 grep -v '^ *+' conftest.er1 >conftest.err
7255 rm -f conftest.er1
7256 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007258 (exit $ac_status); } && {
7259 test -z "$ac_c_werror_flag" ||
7260 test ! -s conftest.err
7261 } && test -s conftest.$ac_objext; then
7262 case $ac_type in
7263 uint64_t) ac_cv_c_uint64_t=yes ;;
7264 *) ac_cv_c_uint64_t=$ac_type ;;
7265esac
7266
7267else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007268 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007269sed 's/^/| /' conftest.$ac_ext >&5
7270
7271
7272fi
7273
7274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7275 test "$ac_cv_c_uint64_t" != no && break
7276 done
7277fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007278{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7279echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007280 case $ac_cv_c_uint64_t in #(
7281 no|yes) ;; #(
7282 *)
7283
7284cat >>confdefs.h <<\_ACEOF
7285#define _UINT64_T 1
7286_ACEOF
7287
7288
7289cat >>confdefs.h <<_ACEOF
7290#define uint64_t $ac_cv_c_uint64_t
7291_ACEOF
7292;;
7293 esac
7294
7295
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007296 { echo "$as_me:$LINENO: checking for int32_t" >&5
7297echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007298if test "${ac_cv_c_int32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007299 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007300else
7301 ac_cv_c_int32_t=no
7302 for ac_type in 'int32_t' 'int' 'long int' \
7303 'long long int' 'short int' 'signed char'; do
7304 cat >conftest.$ac_ext <<_ACEOF
7305/* confdefs.h. */
7306_ACEOF
7307cat confdefs.h >>conftest.$ac_ext
7308cat >>conftest.$ac_ext <<_ACEOF
7309/* end confdefs.h. */
7310$ac_includes_default
7311int
7312main ()
7313{
7314static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7315test_array [0] = 0
7316
7317 ;
7318 return 0;
7319}
7320_ACEOF
7321rm -f conftest.$ac_objext
7322if { (ac_try="$ac_compile"
7323case "(($ac_try" in
7324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7325 *) ac_try_echo=$ac_try;;
7326esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007328 (eval "$ac_compile") 2>conftest.er1
7329 ac_status=$?
7330 grep -v '^ *+' conftest.er1 >conftest.err
7331 rm -f conftest.er1
7332 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007334 (exit $ac_status); } && {
7335 test -z "$ac_c_werror_flag" ||
7336 test ! -s conftest.err
7337 } && test -s conftest.$ac_objext; then
7338 cat >conftest.$ac_ext <<_ACEOF
7339/* confdefs.h. */
7340_ACEOF
7341cat confdefs.h >>conftest.$ac_ext
7342cat >>conftest.$ac_ext <<_ACEOF
7343/* end confdefs.h. */
7344$ac_includes_default
7345int
7346main ()
7347{
7348static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007349 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007350test_array [0] = 0
7351
7352 ;
7353 return 0;
7354}
7355_ACEOF
7356rm -f conftest.$ac_objext
7357if { (ac_try="$ac_compile"
7358case "(($ac_try" in
7359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7360 *) ac_try_echo=$ac_try;;
7361esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007363 (eval "$ac_compile") 2>conftest.er1
7364 ac_status=$?
7365 grep -v '^ *+' conftest.er1 >conftest.err
7366 rm -f conftest.er1
7367 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007369 (exit $ac_status); } && {
7370 test -z "$ac_c_werror_flag" ||
7371 test ! -s conftest.err
7372 } && test -s conftest.$ac_objext; then
7373 :
7374else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007375 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007376sed 's/^/| /' conftest.$ac_ext >&5
7377
7378 case $ac_type in
7379 int32_t) ac_cv_c_int32_t=yes ;;
7380 *) ac_cv_c_int32_t=$ac_type ;;
7381esac
7382
7383fi
7384
7385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7386else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007387 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007388sed 's/^/| /' conftest.$ac_ext >&5
7389
7390
7391fi
7392
7393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7394 test "$ac_cv_c_int32_t" != no && break
7395 done
7396fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007397{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7398echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007399 case $ac_cv_c_int32_t in #(
7400 no|yes) ;; #(
7401 *)
7402
7403cat >>confdefs.h <<_ACEOF
7404#define int32_t $ac_cv_c_int32_t
7405_ACEOF
7406;;
7407 esac
7408
7409
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007410 { echo "$as_me:$LINENO: checking for int64_t" >&5
7411echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007412if test "${ac_cv_c_int64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007413 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007414else
7415 ac_cv_c_int64_t=no
7416 for ac_type in 'int64_t' 'int' 'long int' \
7417 'long long int' 'short int' 'signed char'; do
7418 cat >conftest.$ac_ext <<_ACEOF
7419/* confdefs.h. */
7420_ACEOF
7421cat confdefs.h >>conftest.$ac_ext
7422cat >>conftest.$ac_ext <<_ACEOF
7423/* end confdefs.h. */
7424$ac_includes_default
7425int
7426main ()
7427{
7428static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7429test_array [0] = 0
7430
7431 ;
7432 return 0;
7433}
7434_ACEOF
7435rm -f conftest.$ac_objext
7436if { (ac_try="$ac_compile"
7437case "(($ac_try" in
7438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7439 *) ac_try_echo=$ac_try;;
7440esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007442 (eval "$ac_compile") 2>conftest.er1
7443 ac_status=$?
7444 grep -v '^ *+' conftest.er1 >conftest.err
7445 rm -f conftest.er1
7446 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007448 (exit $ac_status); } && {
7449 test -z "$ac_c_werror_flag" ||
7450 test ! -s conftest.err
7451 } && test -s conftest.$ac_objext; then
7452 cat >conftest.$ac_ext <<_ACEOF
7453/* confdefs.h. */
7454_ACEOF
7455cat confdefs.h >>conftest.$ac_ext
7456cat >>conftest.$ac_ext <<_ACEOF
7457/* end confdefs.h. */
7458$ac_includes_default
7459int
7460main ()
7461{
7462static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007463 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007464test_array [0] = 0
7465
7466 ;
7467 return 0;
7468}
7469_ACEOF
7470rm -f conftest.$ac_objext
7471if { (ac_try="$ac_compile"
7472case "(($ac_try" in
7473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7474 *) ac_try_echo=$ac_try;;
7475esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007477 (eval "$ac_compile") 2>conftest.er1
7478 ac_status=$?
7479 grep -v '^ *+' conftest.er1 >conftest.err
7480 rm -f conftest.er1
7481 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007483 (exit $ac_status); } && {
7484 test -z "$ac_c_werror_flag" ||
7485 test ! -s conftest.err
7486 } && test -s conftest.$ac_objext; then
7487 :
7488else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007489 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007490sed 's/^/| /' conftest.$ac_ext >&5
7491
7492 case $ac_type in
7493 int64_t) ac_cv_c_int64_t=yes ;;
7494 *) ac_cv_c_int64_t=$ac_type ;;
7495esac
7496
7497fi
7498
7499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7500else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007501 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007502sed 's/^/| /' conftest.$ac_ext >&5
7503
7504
7505fi
7506
7507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7508 test "$ac_cv_c_int64_t" != no && break
7509 done
7510fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007511{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7512echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007513 case $ac_cv_c_int64_t in #(
7514 no|yes) ;; #(
7515 *)
7516
7517cat >>confdefs.h <<_ACEOF
7518#define int64_t $ac_cv_c_int64_t
7519_ACEOF
7520;;
7521 esac
7522
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007523{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7524echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007525if test "${ac_cv_type_ssize_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007526 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007527else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007528 cat >conftest.$ac_ext <<_ACEOF
7529/* confdefs.h. */
7530_ACEOF
7531cat confdefs.h >>conftest.$ac_ext
7532cat >>conftest.$ac_ext <<_ACEOF
7533/* end confdefs.h. */
7534$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007535typedef ssize_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007536int
7537main ()
7538{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007539if ((ac__type_new_ *) 0)
7540 return 0;
7541if (sizeof (ac__type_new_))
7542 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007543 ;
7544 return 0;
7545}
7546_ACEOF
7547rm -f conftest.$ac_objext
7548if { (ac_try="$ac_compile"
7549case "(($ac_try" in
7550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7551 *) ac_try_echo=$ac_try;;
7552esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007553eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007554 (eval "$ac_compile") 2>conftest.er1
7555 ac_status=$?
7556 grep -v '^ *+' conftest.er1 >conftest.err
7557 rm -f conftest.er1
7558 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007560 (exit $ac_status); } && {
7561 test -z "$ac_c_werror_flag" ||
7562 test ! -s conftest.err
7563 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007564 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007565else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007566 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007567sed 's/^/| /' conftest.$ac_ext >&5
7568
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007569 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007570fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007571
7572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007573fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007574{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7575echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7576if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007577
7578cat >>confdefs.h <<\_ACEOF
7579#define HAVE_SSIZE_T 1
7580_ACEOF
7581
7582fi
7583
Jack Jansendd19cf82001-12-06 22:36:17 +00007584
Michael W. Hudson54241132001-12-07 15:38:26 +00007585# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007586# ANSI C requires sizeof(char) == 1, so no need to check it
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007587{ echo "$as_me:$LINENO: checking for int" >&5
7588echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7589if test "${ac_cv_type_int+set}" = set; then
7590 echo $ECHO_N "(cached) $ECHO_C" >&6
7591else
7592 cat >conftest.$ac_ext <<_ACEOF
7593/* confdefs.h. */
7594_ACEOF
7595cat confdefs.h >>conftest.$ac_ext
7596cat >>conftest.$ac_ext <<_ACEOF
7597/* end confdefs.h. */
7598$ac_includes_default
7599typedef int ac__type_new_;
7600int
7601main ()
7602{
7603if ((ac__type_new_ *) 0)
7604 return 0;
7605if (sizeof (ac__type_new_))
7606 return 0;
7607 ;
7608 return 0;
7609}
7610_ACEOF
7611rm -f conftest.$ac_objext
7612if { (ac_try="$ac_compile"
7613case "(($ac_try" in
7614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7615 *) ac_try_echo=$ac_try;;
7616esac
7617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7618 (eval "$ac_compile") 2>conftest.er1
7619 ac_status=$?
7620 grep -v '^ *+' conftest.er1 >conftest.err
7621 rm -f conftest.er1
7622 cat conftest.err >&5
7623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7624 (exit $ac_status); } && {
7625 test -z "$ac_c_werror_flag" ||
7626 test ! -s conftest.err
7627 } && test -s conftest.$ac_objext; then
7628 ac_cv_type_int=yes
7629else
7630 echo "$as_me: failed program was:" >&5
7631sed 's/^/| /' conftest.$ac_ext >&5
7632
7633 ac_cv_type_int=no
7634fi
7635
7636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7637fi
7638{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7639echo "${ECHO_T}$ac_cv_type_int" >&6; }
7640
Martin v. Löwiseba40652007-08-30 20:10:57 +00007641# The cast to long int works around a bug in the HP C Compiler
7642# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7643# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7644# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007645{ echo "$as_me:$LINENO: checking size of int" >&5
7646echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007647if test "${ac_cv_sizeof_int+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007648 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007649else
Martin v. Löwis11437992002-04-12 09:54:03 +00007650 if test "$cross_compiling" = yes; then
7651 # Depending upon the size, compute the lo and hi bounds.
7652cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007653/* confdefs.h. */
7654_ACEOF
7655cat confdefs.h >>conftest.$ac_ext
7656cat >>conftest.$ac_ext <<_ACEOF
7657/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007658$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007659 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007660int
7661main ()
7662{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007663static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007664test_array [0] = 0
7665
7666 ;
7667 return 0;
7668}
7669_ACEOF
7670rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007671if { (ac_try="$ac_compile"
7672case "(($ac_try" in
7673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7674 *) ac_try_echo=$ac_try;;
7675esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007677 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007678 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007679 grep -v '^ *+' conftest.er1 >conftest.err
7680 rm -f conftest.er1
7681 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007683 (exit $ac_status); } && {
7684 test -z "$ac_c_werror_flag" ||
7685 test ! -s conftest.err
7686 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007687 ac_lo=0 ac_mid=0
7688 while :; do
7689 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007690/* confdefs.h. */
7691_ACEOF
7692cat confdefs.h >>conftest.$ac_ext
7693cat >>conftest.$ac_ext <<_ACEOF
7694/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007695$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007696 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007697int
7698main ()
7699{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007700static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007701test_array [0] = 0
7702
7703 ;
7704 return 0;
7705}
7706_ACEOF
7707rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007708if { (ac_try="$ac_compile"
7709case "(($ac_try" in
7710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7711 *) ac_try_echo=$ac_try;;
7712esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007714 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007715 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007716 grep -v '^ *+' conftest.er1 >conftest.err
7717 rm -f conftest.er1
7718 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007720 (exit $ac_status); } && {
7721 test -z "$ac_c_werror_flag" ||
7722 test ! -s conftest.err
7723 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007724 ac_hi=$ac_mid; break
7725else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007726 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007727sed 's/^/| /' conftest.$ac_ext >&5
7728
Martin v. Löwiseba40652007-08-30 20:10:57 +00007729 ac_lo=`expr $ac_mid + 1`
7730 if test $ac_lo -le $ac_mid; then
7731 ac_lo= ac_hi=
7732 break
7733 fi
7734 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007735fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007736
7737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007738 done
7739else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007740 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007741sed 's/^/| /' conftest.$ac_ext >&5
7742
Martin v. Löwiseba40652007-08-30 20:10:57 +00007743 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007744/* confdefs.h. */
7745_ACEOF
7746cat confdefs.h >>conftest.$ac_ext
7747cat >>conftest.$ac_ext <<_ACEOF
7748/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007749$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007750 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007751int
7752main ()
7753{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007754static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007755test_array [0] = 0
7756
7757 ;
7758 return 0;
7759}
7760_ACEOF
7761rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007762if { (ac_try="$ac_compile"
7763case "(($ac_try" in
7764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7765 *) ac_try_echo=$ac_try;;
7766esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007768 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007769 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007770 grep -v '^ *+' conftest.er1 >conftest.err
7771 rm -f conftest.er1
7772 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007774 (exit $ac_status); } && {
7775 test -z "$ac_c_werror_flag" ||
7776 test ! -s conftest.err
7777 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007778 ac_hi=-1 ac_mid=-1
7779 while :; do
7780 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007781/* confdefs.h. */
7782_ACEOF
7783cat confdefs.h >>conftest.$ac_ext
7784cat >>conftest.$ac_ext <<_ACEOF
7785/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007786$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007787 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007788int
7789main ()
7790{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007791static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007792test_array [0] = 0
7793
7794 ;
7795 return 0;
7796}
7797_ACEOF
7798rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007799if { (ac_try="$ac_compile"
7800case "(($ac_try" in
7801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7802 *) ac_try_echo=$ac_try;;
7803esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007805 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007806 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007807 grep -v '^ *+' conftest.er1 >conftest.err
7808 rm -f conftest.er1
7809 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007811 (exit $ac_status); } && {
7812 test -z "$ac_c_werror_flag" ||
7813 test ! -s conftest.err
7814 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007815 ac_lo=$ac_mid; break
7816else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007817 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007818sed 's/^/| /' conftest.$ac_ext >&5
7819
Martin v. Löwiseba40652007-08-30 20:10:57 +00007820 ac_hi=`expr '(' $ac_mid ')' - 1`
7821 if test $ac_mid -le $ac_hi; then
7822 ac_lo= ac_hi=
7823 break
7824 fi
7825 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007826fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007827
7828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007829 done
7830else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007831 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007832sed 's/^/| /' conftest.$ac_ext >&5
7833
Martin v. Löwiseba40652007-08-30 20:10:57 +00007834 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007835fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007836
7837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007838fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007839
7840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007841# Binary search between lo and hi bounds.
7842while test "x$ac_lo" != "x$ac_hi"; do
7843 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7844 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007845/* confdefs.h. */
7846_ACEOF
7847cat confdefs.h >>conftest.$ac_ext
7848cat >>conftest.$ac_ext <<_ACEOF
7849/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007850$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007851 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007852int
7853main ()
7854{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007855static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007856test_array [0] = 0
7857
7858 ;
7859 return 0;
7860}
7861_ACEOF
7862rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007863if { (ac_try="$ac_compile"
7864case "(($ac_try" in
7865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7866 *) ac_try_echo=$ac_try;;
7867esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007869 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007870 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007871 grep -v '^ *+' conftest.er1 >conftest.err
7872 rm -f conftest.er1
7873 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007875 (exit $ac_status); } && {
7876 test -z "$ac_c_werror_flag" ||
7877 test ! -s conftest.err
7878 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007879 ac_hi=$ac_mid
7880else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007881 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007882sed 's/^/| /' conftest.$ac_ext >&5
7883
Martin v. Löwiseba40652007-08-30 20:10:57 +00007884 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007885fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007886
7887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007888done
7889case $ac_lo in
7890?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007891'') if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007892 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007893See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007894echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007895See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007896 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007897 else
7898 ac_cv_sizeof_int=0
7899 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007900esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007901else
Martin v. Löwis11437992002-04-12 09:54:03 +00007902 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007903/* confdefs.h. */
7904_ACEOF
7905cat confdefs.h >>conftest.$ac_ext
7906cat >>conftest.$ac_ext <<_ACEOF
7907/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007908$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007909 typedef int ac__type_sizeof_;
7910static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7911static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007912#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007913#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007914int
7915main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007916{
Martin v. Löwis11437992002-04-12 09:54:03 +00007917
7918 FILE *f = fopen ("conftest.val", "w");
7919 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007920 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007921 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007922 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007923 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007924 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007925 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007926 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007927 }
7928 else
7929 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007930 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007931 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007932 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007933 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007934 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007935 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007936
7937 ;
7938 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007939}
Martin v. Löwis11437992002-04-12 09:54:03 +00007940_ACEOF
7941rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007942if { (ac_try="$ac_link"
7943case "(($ac_try" in
7944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7945 *) ac_try_echo=$ac_try;;
7946esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007948 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007949 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007951 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007952 { (case "(($ac_try" in
7953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7954 *) ac_try_echo=$ac_try;;
7955esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007957 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007958 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007960 (exit $ac_status); }; }; then
7961 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007962else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007963 echo "$as_me: program exited with status $ac_status" >&5
7964echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007965sed 's/^/| /' conftest.$ac_ext >&5
7966
Martin v. Löwis11437992002-04-12 09:54:03 +00007967( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007968if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007969 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007970See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007971echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007972See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007973 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007974 else
7975 ac_cv_sizeof_int=0
7976 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007977fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007978rm -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 +00007979fi
7980rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007981fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007982{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7983echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007984
7985
7986
Martin v. Löwis11437992002-04-12 09:54:03 +00007987cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007988#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007989_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007990
7991
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007992{ echo "$as_me:$LINENO: checking for long" >&5
7993echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7994if test "${ac_cv_type_long+set}" = set; then
7995 echo $ECHO_N "(cached) $ECHO_C" >&6
7996else
7997 cat >conftest.$ac_ext <<_ACEOF
7998/* confdefs.h. */
7999_ACEOF
8000cat confdefs.h >>conftest.$ac_ext
8001cat >>conftest.$ac_ext <<_ACEOF
8002/* end confdefs.h. */
8003$ac_includes_default
8004typedef long ac__type_new_;
8005int
8006main ()
8007{
8008if ((ac__type_new_ *) 0)
8009 return 0;
8010if (sizeof (ac__type_new_))
8011 return 0;
8012 ;
8013 return 0;
8014}
8015_ACEOF
8016rm -f conftest.$ac_objext
8017if { (ac_try="$ac_compile"
8018case "(($ac_try" in
8019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8020 *) ac_try_echo=$ac_try;;
8021esac
8022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8023 (eval "$ac_compile") 2>conftest.er1
8024 ac_status=$?
8025 grep -v '^ *+' conftest.er1 >conftest.err
8026 rm -f conftest.er1
8027 cat conftest.err >&5
8028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8029 (exit $ac_status); } && {
8030 test -z "$ac_c_werror_flag" ||
8031 test ! -s conftest.err
8032 } && test -s conftest.$ac_objext; then
8033 ac_cv_type_long=yes
8034else
8035 echo "$as_me: failed program was:" >&5
8036sed 's/^/| /' conftest.$ac_ext >&5
8037
8038 ac_cv_type_long=no
8039fi
8040
8041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8042fi
8043{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
8044echo "${ECHO_T}$ac_cv_type_long" >&6; }
8045
Martin v. Löwiseba40652007-08-30 20:10:57 +00008046# The cast to long int works around a bug in the HP C Compiler
8047# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8048# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8049# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008050{ echo "$as_me:$LINENO: checking size of long" >&5
8051echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008052if test "${ac_cv_sizeof_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008053 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008054else
Martin v. Löwis11437992002-04-12 09:54:03 +00008055 if test "$cross_compiling" = yes; then
8056 # Depending upon the size, compute the lo and hi bounds.
8057cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008058/* confdefs.h. */
8059_ACEOF
8060cat confdefs.h >>conftest.$ac_ext
8061cat >>conftest.$ac_ext <<_ACEOF
8062/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008063$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008064 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008065int
8066main ()
8067{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008068static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008069test_array [0] = 0
8070
8071 ;
8072 return 0;
8073}
8074_ACEOF
8075rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008076if { (ac_try="$ac_compile"
8077case "(($ac_try" in
8078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8079 *) ac_try_echo=$ac_try;;
8080esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008081eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008082 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008083 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008084 grep -v '^ *+' conftest.er1 >conftest.err
8085 rm -f conftest.er1
8086 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008088 (exit $ac_status); } && {
8089 test -z "$ac_c_werror_flag" ||
8090 test ! -s conftest.err
8091 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008092 ac_lo=0 ac_mid=0
8093 while :; do
8094 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008095/* confdefs.h. */
8096_ACEOF
8097cat confdefs.h >>conftest.$ac_ext
8098cat >>conftest.$ac_ext <<_ACEOF
8099/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008100$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008101 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008102int
8103main ()
8104{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008105static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008106test_array [0] = 0
8107
8108 ;
8109 return 0;
8110}
8111_ACEOF
8112rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008113if { (ac_try="$ac_compile"
8114case "(($ac_try" in
8115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8116 *) ac_try_echo=$ac_try;;
8117esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008119 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008120 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008121 grep -v '^ *+' conftest.er1 >conftest.err
8122 rm -f conftest.er1
8123 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008125 (exit $ac_status); } && {
8126 test -z "$ac_c_werror_flag" ||
8127 test ! -s conftest.err
8128 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008129 ac_hi=$ac_mid; break
8130else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008131 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008132sed 's/^/| /' conftest.$ac_ext >&5
8133
Martin v. Löwiseba40652007-08-30 20:10:57 +00008134 ac_lo=`expr $ac_mid + 1`
8135 if test $ac_lo -le $ac_mid; then
8136 ac_lo= ac_hi=
8137 break
8138 fi
8139 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008140fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008141
8142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008143 done
8144else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008145 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008146sed 's/^/| /' conftest.$ac_ext >&5
8147
Martin v. Löwiseba40652007-08-30 20:10:57 +00008148 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008149/* confdefs.h. */
8150_ACEOF
8151cat confdefs.h >>conftest.$ac_ext
8152cat >>conftest.$ac_ext <<_ACEOF
8153/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008154$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008155 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008156int
8157main ()
8158{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008159static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008160test_array [0] = 0
8161
8162 ;
8163 return 0;
8164}
8165_ACEOF
8166rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008167if { (ac_try="$ac_compile"
8168case "(($ac_try" in
8169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8170 *) ac_try_echo=$ac_try;;
8171esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008173 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008174 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008175 grep -v '^ *+' conftest.er1 >conftest.err
8176 rm -f conftest.er1
8177 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008179 (exit $ac_status); } && {
8180 test -z "$ac_c_werror_flag" ||
8181 test ! -s conftest.err
8182 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008183 ac_hi=-1 ac_mid=-1
8184 while :; do
8185 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008186/* confdefs.h. */
8187_ACEOF
8188cat confdefs.h >>conftest.$ac_ext
8189cat >>conftest.$ac_ext <<_ACEOF
8190/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008191$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008192 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008193int
8194main ()
8195{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008196static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008197test_array [0] = 0
8198
8199 ;
8200 return 0;
8201}
8202_ACEOF
8203rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008204if { (ac_try="$ac_compile"
8205case "(($ac_try" in
8206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8207 *) ac_try_echo=$ac_try;;
8208esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008210 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008211 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008212 grep -v '^ *+' conftest.er1 >conftest.err
8213 rm -f conftest.er1
8214 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008216 (exit $ac_status); } && {
8217 test -z "$ac_c_werror_flag" ||
8218 test ! -s conftest.err
8219 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008220 ac_lo=$ac_mid; break
8221else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008222 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008223sed 's/^/| /' conftest.$ac_ext >&5
8224
Martin v. Löwiseba40652007-08-30 20:10:57 +00008225 ac_hi=`expr '(' $ac_mid ')' - 1`
8226 if test $ac_mid -le $ac_hi; then
8227 ac_lo= ac_hi=
8228 break
8229 fi
8230 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008231fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008232
8233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008234 done
8235else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008236 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008237sed 's/^/| /' conftest.$ac_ext >&5
8238
Martin v. Löwiseba40652007-08-30 20:10:57 +00008239 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008240fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008241
8242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008243fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008244
8245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008246# Binary search between lo and hi bounds.
8247while test "x$ac_lo" != "x$ac_hi"; do
8248 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8249 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008250/* confdefs.h. */
8251_ACEOF
8252cat confdefs.h >>conftest.$ac_ext
8253cat >>conftest.$ac_ext <<_ACEOF
8254/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008255$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008256 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008257int
8258main ()
8259{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008260static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008261test_array [0] = 0
8262
8263 ;
8264 return 0;
8265}
8266_ACEOF
8267rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008268if { (ac_try="$ac_compile"
8269case "(($ac_try" in
8270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8271 *) ac_try_echo=$ac_try;;
8272esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008274 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008275 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008276 grep -v '^ *+' conftest.er1 >conftest.err
8277 rm -f conftest.er1
8278 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008280 (exit $ac_status); } && {
8281 test -z "$ac_c_werror_flag" ||
8282 test ! -s conftest.err
8283 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008284 ac_hi=$ac_mid
8285else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008286 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008287sed 's/^/| /' conftest.$ac_ext >&5
8288
Martin v. Löwiseba40652007-08-30 20:10:57 +00008289 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008290fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008291
8292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008293done
8294case $ac_lo in
8295?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008296'') if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008297 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008298See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008299echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008300See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008301 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008302 else
8303 ac_cv_sizeof_long=0
8304 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008305esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008306else
Martin v. Löwis11437992002-04-12 09:54:03 +00008307 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008308/* confdefs.h. */
8309_ACEOF
8310cat confdefs.h >>conftest.$ac_ext
8311cat >>conftest.$ac_ext <<_ACEOF
8312/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008313$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008314 typedef long ac__type_sizeof_;
8315static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8316static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008317#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008318#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008319int
8320main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008321{
Martin v. Löwis11437992002-04-12 09:54:03 +00008322
8323 FILE *f = fopen ("conftest.val", "w");
8324 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008325 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008326 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008327 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008328 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008329 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008330 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008331 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008332 }
8333 else
8334 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008335 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008336 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008337 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008338 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008339 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008340 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008341
8342 ;
8343 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008344}
Martin v. Löwis11437992002-04-12 09:54:03 +00008345_ACEOF
8346rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008347if { (ac_try="$ac_link"
8348case "(($ac_try" in
8349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8350 *) ac_try_echo=$ac_try;;
8351esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008353 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008354 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008356 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008357 { (case "(($ac_try" in
8358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8359 *) ac_try_echo=$ac_try;;
8360esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008362 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008363 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008365 (exit $ac_status); }; }; then
8366 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008367else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008368 echo "$as_me: program exited with status $ac_status" >&5
8369echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008370sed 's/^/| /' conftest.$ac_ext >&5
8371
Martin v. Löwis11437992002-04-12 09:54:03 +00008372( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008373if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008374 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008375See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008376echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008377See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008378 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008379 else
8380 ac_cv_sizeof_long=0
8381 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008382fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008383rm -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 +00008384fi
8385rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008386fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008387{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8388echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008389
8390
8391
Martin v. Löwis11437992002-04-12 09:54:03 +00008392cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008393#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008394_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008395
8396
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008397{ echo "$as_me:$LINENO: checking for void *" >&5
8398echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8399if test "${ac_cv_type_void_p+set}" = set; then
8400 echo $ECHO_N "(cached) $ECHO_C" >&6
8401else
8402 cat >conftest.$ac_ext <<_ACEOF
8403/* confdefs.h. */
8404_ACEOF
8405cat confdefs.h >>conftest.$ac_ext
8406cat >>conftest.$ac_ext <<_ACEOF
8407/* end confdefs.h. */
8408$ac_includes_default
8409typedef void * ac__type_new_;
8410int
8411main ()
8412{
8413if ((ac__type_new_ *) 0)
8414 return 0;
8415if (sizeof (ac__type_new_))
8416 return 0;
8417 ;
8418 return 0;
8419}
8420_ACEOF
8421rm -f conftest.$ac_objext
8422if { (ac_try="$ac_compile"
8423case "(($ac_try" in
8424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8425 *) ac_try_echo=$ac_try;;
8426esac
8427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8428 (eval "$ac_compile") 2>conftest.er1
8429 ac_status=$?
8430 grep -v '^ *+' conftest.er1 >conftest.err
8431 rm -f conftest.er1
8432 cat conftest.err >&5
8433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8434 (exit $ac_status); } && {
8435 test -z "$ac_c_werror_flag" ||
8436 test ! -s conftest.err
8437 } && test -s conftest.$ac_objext; then
8438 ac_cv_type_void_p=yes
8439else
8440 echo "$as_me: failed program was:" >&5
8441sed 's/^/| /' conftest.$ac_ext >&5
8442
8443 ac_cv_type_void_p=no
8444fi
8445
8446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8447fi
8448{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8449echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8450
Martin v. Löwiseba40652007-08-30 20:10:57 +00008451# The cast to long int works around a bug in the HP C Compiler
8452# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8453# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8454# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008455{ echo "$as_me:$LINENO: checking size of void *" >&5
8456echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008457if test "${ac_cv_sizeof_void_p+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008458 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008459else
Martin v. Löwis11437992002-04-12 09:54:03 +00008460 if test "$cross_compiling" = yes; then
8461 # Depending upon the size, compute the lo and hi bounds.
8462cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008463/* confdefs.h. */
8464_ACEOF
8465cat confdefs.h >>conftest.$ac_ext
8466cat >>conftest.$ac_ext <<_ACEOF
8467/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008468$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008469 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008470int
8471main ()
8472{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008473static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008474test_array [0] = 0
8475
8476 ;
8477 return 0;
8478}
8479_ACEOF
8480rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008481if { (ac_try="$ac_compile"
8482case "(($ac_try" in
8483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8484 *) ac_try_echo=$ac_try;;
8485esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008486eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008487 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008488 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008489 grep -v '^ *+' conftest.er1 >conftest.err
8490 rm -f conftest.er1
8491 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008493 (exit $ac_status); } && {
8494 test -z "$ac_c_werror_flag" ||
8495 test ! -s conftest.err
8496 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008497 ac_lo=0 ac_mid=0
8498 while :; do
8499 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008500/* confdefs.h. */
8501_ACEOF
8502cat confdefs.h >>conftest.$ac_ext
8503cat >>conftest.$ac_ext <<_ACEOF
8504/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008505$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008506 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008507int
8508main ()
8509{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008510static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008511test_array [0] = 0
8512
8513 ;
8514 return 0;
8515}
8516_ACEOF
8517rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008518if { (ac_try="$ac_compile"
8519case "(($ac_try" in
8520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8521 *) ac_try_echo=$ac_try;;
8522esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008524 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008525 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008526 grep -v '^ *+' conftest.er1 >conftest.err
8527 rm -f conftest.er1
8528 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008530 (exit $ac_status); } && {
8531 test -z "$ac_c_werror_flag" ||
8532 test ! -s conftest.err
8533 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008534 ac_hi=$ac_mid; break
8535else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008536 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008537sed 's/^/| /' conftest.$ac_ext >&5
8538
Martin v. Löwiseba40652007-08-30 20:10:57 +00008539 ac_lo=`expr $ac_mid + 1`
8540 if test $ac_lo -le $ac_mid; then
8541 ac_lo= ac_hi=
8542 break
8543 fi
8544 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008545fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008546
8547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008548 done
8549else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008550 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008551sed 's/^/| /' conftest.$ac_ext >&5
8552
Martin v. Löwiseba40652007-08-30 20:10:57 +00008553 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008554/* confdefs.h. */
8555_ACEOF
8556cat confdefs.h >>conftest.$ac_ext
8557cat >>conftest.$ac_ext <<_ACEOF
8558/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008559$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008560 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008561int
8562main ()
8563{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008564static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008565test_array [0] = 0
8566
8567 ;
8568 return 0;
8569}
8570_ACEOF
8571rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008572if { (ac_try="$ac_compile"
8573case "(($ac_try" in
8574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8575 *) ac_try_echo=$ac_try;;
8576esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008578 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008579 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008580 grep -v '^ *+' conftest.er1 >conftest.err
8581 rm -f conftest.er1
8582 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008584 (exit $ac_status); } && {
8585 test -z "$ac_c_werror_flag" ||
8586 test ! -s conftest.err
8587 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008588 ac_hi=-1 ac_mid=-1
8589 while :; do
8590 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008591/* confdefs.h. */
8592_ACEOF
8593cat confdefs.h >>conftest.$ac_ext
8594cat >>conftest.$ac_ext <<_ACEOF
8595/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008596$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008597 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008598int
8599main ()
8600{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008601static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008602test_array [0] = 0
8603
8604 ;
8605 return 0;
8606}
8607_ACEOF
8608rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008609if { (ac_try="$ac_compile"
8610case "(($ac_try" in
8611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8612 *) ac_try_echo=$ac_try;;
8613esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008615 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008616 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008617 grep -v '^ *+' conftest.er1 >conftest.err
8618 rm -f conftest.er1
8619 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008621 (exit $ac_status); } && {
8622 test -z "$ac_c_werror_flag" ||
8623 test ! -s conftest.err
8624 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008625 ac_lo=$ac_mid; break
8626else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008627 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008628sed 's/^/| /' conftest.$ac_ext >&5
8629
Martin v. Löwiseba40652007-08-30 20:10:57 +00008630 ac_hi=`expr '(' $ac_mid ')' - 1`
8631 if test $ac_mid -le $ac_hi; then
8632 ac_lo= ac_hi=
8633 break
8634 fi
8635 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008636fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008637
8638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008639 done
8640else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008641 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008642sed 's/^/| /' conftest.$ac_ext >&5
8643
Martin v. Löwiseba40652007-08-30 20:10:57 +00008644 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008645fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008646
8647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008648fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008649
8650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008651# Binary search between lo and hi bounds.
8652while test "x$ac_lo" != "x$ac_hi"; do
8653 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8654 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008655/* confdefs.h. */
8656_ACEOF
8657cat confdefs.h >>conftest.$ac_ext
8658cat >>conftest.$ac_ext <<_ACEOF
8659/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008660$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008661 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008662int
8663main ()
8664{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008665static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008666test_array [0] = 0
8667
8668 ;
8669 return 0;
8670}
8671_ACEOF
8672rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008673if { (ac_try="$ac_compile"
8674case "(($ac_try" in
8675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8676 *) ac_try_echo=$ac_try;;
8677esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008679 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008680 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008681 grep -v '^ *+' conftest.er1 >conftest.err
8682 rm -f conftest.er1
8683 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008685 (exit $ac_status); } && {
8686 test -z "$ac_c_werror_flag" ||
8687 test ! -s conftest.err
8688 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008689 ac_hi=$ac_mid
8690else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008691 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008692sed 's/^/| /' conftest.$ac_ext >&5
8693
Martin v. Löwiseba40652007-08-30 20:10:57 +00008694 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008695fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008696
8697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008698done
8699case $ac_lo in
8700?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008701'') if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008702 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008703See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008704echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008705See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008706 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008707 else
8708 ac_cv_sizeof_void_p=0
8709 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008710esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008711else
Martin v. Löwis11437992002-04-12 09:54:03 +00008712 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008713/* confdefs.h. */
8714_ACEOF
8715cat confdefs.h >>conftest.$ac_ext
8716cat >>conftest.$ac_ext <<_ACEOF
8717/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008718$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008719 typedef void * ac__type_sizeof_;
8720static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8721static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008722#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008723#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008724int
8725main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008726{
Martin v. Löwis11437992002-04-12 09:54:03 +00008727
8728 FILE *f = fopen ("conftest.val", "w");
8729 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008730 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008731 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008732 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008733 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008734 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008735 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008736 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008737 }
8738 else
8739 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008740 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008741 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008742 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008743 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008744 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008745 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008746
8747 ;
8748 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008749}
Martin v. Löwis11437992002-04-12 09:54:03 +00008750_ACEOF
8751rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008752if { (ac_try="$ac_link"
8753case "(($ac_try" in
8754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8755 *) ac_try_echo=$ac_try;;
8756esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008758 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008759 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008761 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008762 { (case "(($ac_try" in
8763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8764 *) ac_try_echo=$ac_try;;
8765esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008767 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008768 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008770 (exit $ac_status); }; }; then
8771 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008772else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008773 echo "$as_me: program exited with status $ac_status" >&5
8774echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008775sed 's/^/| /' conftest.$ac_ext >&5
8776
Martin v. Löwis11437992002-04-12 09:54:03 +00008777( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008778if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008779 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008780See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008781echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008782See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008783 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008784 else
8785 ac_cv_sizeof_void_p=0
8786 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008787fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008788rm -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 +00008789fi
8790rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008791fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008792{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8793echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008794
8795
8796
Martin v. Löwis11437992002-04-12 09:54:03 +00008797cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008798#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008799_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008800
8801
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008802{ echo "$as_me:$LINENO: checking for short" >&5
8803echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8804if test "${ac_cv_type_short+set}" = set; then
8805 echo $ECHO_N "(cached) $ECHO_C" >&6
8806else
8807 cat >conftest.$ac_ext <<_ACEOF
8808/* confdefs.h. */
8809_ACEOF
8810cat confdefs.h >>conftest.$ac_ext
8811cat >>conftest.$ac_ext <<_ACEOF
8812/* end confdefs.h. */
8813$ac_includes_default
8814typedef short ac__type_new_;
8815int
8816main ()
8817{
8818if ((ac__type_new_ *) 0)
8819 return 0;
8820if (sizeof (ac__type_new_))
8821 return 0;
8822 ;
8823 return 0;
8824}
8825_ACEOF
8826rm -f conftest.$ac_objext
8827if { (ac_try="$ac_compile"
8828case "(($ac_try" in
8829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8830 *) ac_try_echo=$ac_try;;
8831esac
8832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8833 (eval "$ac_compile") 2>conftest.er1
8834 ac_status=$?
8835 grep -v '^ *+' conftest.er1 >conftest.err
8836 rm -f conftest.er1
8837 cat conftest.err >&5
8838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8839 (exit $ac_status); } && {
8840 test -z "$ac_c_werror_flag" ||
8841 test ! -s conftest.err
8842 } && test -s conftest.$ac_objext; then
8843 ac_cv_type_short=yes
8844else
8845 echo "$as_me: failed program was:" >&5
8846sed 's/^/| /' conftest.$ac_ext >&5
8847
8848 ac_cv_type_short=no
8849fi
8850
8851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8852fi
8853{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8854echo "${ECHO_T}$ac_cv_type_short" >&6; }
8855
Martin v. Löwiseba40652007-08-30 20:10:57 +00008856# The cast to long int works around a bug in the HP C Compiler
8857# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8858# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8859# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008860{ echo "$as_me:$LINENO: checking size of short" >&5
8861echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008862if test "${ac_cv_sizeof_short+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008863 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008864else
Martin v. Löwis11437992002-04-12 09:54:03 +00008865 if test "$cross_compiling" = yes; then
8866 # Depending upon the size, compute the lo and hi bounds.
8867cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008868/* confdefs.h. */
8869_ACEOF
8870cat confdefs.h >>conftest.$ac_ext
8871cat >>conftest.$ac_ext <<_ACEOF
8872/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008873$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008874 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008875int
8876main ()
8877{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008878static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008879test_array [0] = 0
8880
8881 ;
8882 return 0;
8883}
8884_ACEOF
8885rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008886if { (ac_try="$ac_compile"
8887case "(($ac_try" in
8888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8889 *) ac_try_echo=$ac_try;;
8890esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008891eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008892 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008893 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008894 grep -v '^ *+' conftest.er1 >conftest.err
8895 rm -f conftest.er1
8896 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008898 (exit $ac_status); } && {
8899 test -z "$ac_c_werror_flag" ||
8900 test ! -s conftest.err
8901 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008902 ac_lo=0 ac_mid=0
8903 while :; do
8904 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008905/* confdefs.h. */
8906_ACEOF
8907cat confdefs.h >>conftest.$ac_ext
8908cat >>conftest.$ac_ext <<_ACEOF
8909/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008910$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008911 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008912int
8913main ()
8914{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008915static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008916test_array [0] = 0
8917
8918 ;
8919 return 0;
8920}
8921_ACEOF
8922rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008923if { (ac_try="$ac_compile"
8924case "(($ac_try" in
8925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8926 *) ac_try_echo=$ac_try;;
8927esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008928eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008929 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008930 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008931 grep -v '^ *+' conftest.er1 >conftest.err
8932 rm -f conftest.er1
8933 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008935 (exit $ac_status); } && {
8936 test -z "$ac_c_werror_flag" ||
8937 test ! -s conftest.err
8938 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008939 ac_hi=$ac_mid; break
8940else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008941 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008942sed 's/^/| /' conftest.$ac_ext >&5
8943
Martin v. Löwiseba40652007-08-30 20:10:57 +00008944 ac_lo=`expr $ac_mid + 1`
8945 if test $ac_lo -le $ac_mid; then
8946 ac_lo= ac_hi=
8947 break
8948 fi
8949 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008950fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008951
8952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008953 done
8954else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008955 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008956sed 's/^/| /' conftest.$ac_ext >&5
8957
Martin v. Löwiseba40652007-08-30 20:10:57 +00008958 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008959/* confdefs.h. */
8960_ACEOF
8961cat confdefs.h >>conftest.$ac_ext
8962cat >>conftest.$ac_ext <<_ACEOF
8963/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008964$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008965 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008966int
8967main ()
8968{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008969static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008970test_array [0] = 0
8971
8972 ;
8973 return 0;
8974}
8975_ACEOF
8976rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008977if { (ac_try="$ac_compile"
8978case "(($ac_try" in
8979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8980 *) ac_try_echo=$ac_try;;
8981esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008983 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008984 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008985 grep -v '^ *+' conftest.er1 >conftest.err
8986 rm -f conftest.er1
8987 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008989 (exit $ac_status); } && {
8990 test -z "$ac_c_werror_flag" ||
8991 test ! -s conftest.err
8992 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008993 ac_hi=-1 ac_mid=-1
8994 while :; do
8995 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008996/* confdefs.h. */
8997_ACEOF
8998cat confdefs.h >>conftest.$ac_ext
8999cat >>conftest.$ac_ext <<_ACEOF
9000/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009001$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009002 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009003int
9004main ()
9005{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009006static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009007test_array [0] = 0
9008
9009 ;
9010 return 0;
9011}
9012_ACEOF
9013rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009014if { (ac_try="$ac_compile"
9015case "(($ac_try" in
9016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9017 *) ac_try_echo=$ac_try;;
9018esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009020 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009021 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009022 grep -v '^ *+' conftest.er1 >conftest.err
9023 rm -f conftest.er1
9024 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009026 (exit $ac_status); } && {
9027 test -z "$ac_c_werror_flag" ||
9028 test ! -s conftest.err
9029 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009030 ac_lo=$ac_mid; break
9031else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009032 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009033sed 's/^/| /' conftest.$ac_ext >&5
9034
Martin v. Löwiseba40652007-08-30 20:10:57 +00009035 ac_hi=`expr '(' $ac_mid ')' - 1`
9036 if test $ac_mid -le $ac_hi; then
9037 ac_lo= ac_hi=
9038 break
9039 fi
9040 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009041fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009042
9043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009044 done
9045else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009046 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009047sed 's/^/| /' conftest.$ac_ext >&5
9048
Martin v. Löwiseba40652007-08-30 20:10:57 +00009049 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009050fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009051
9052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009053fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009054
9055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009056# Binary search between lo and hi bounds.
9057while test "x$ac_lo" != "x$ac_hi"; do
9058 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9059 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009060/* confdefs.h. */
9061_ACEOF
9062cat confdefs.h >>conftest.$ac_ext
9063cat >>conftest.$ac_ext <<_ACEOF
9064/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009065$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009066 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009067int
9068main ()
9069{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009070static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009071test_array [0] = 0
9072
9073 ;
9074 return 0;
9075}
9076_ACEOF
9077rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009078if { (ac_try="$ac_compile"
9079case "(($ac_try" in
9080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9081 *) ac_try_echo=$ac_try;;
9082esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009084 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009085 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009086 grep -v '^ *+' conftest.er1 >conftest.err
9087 rm -f conftest.er1
9088 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009090 (exit $ac_status); } && {
9091 test -z "$ac_c_werror_flag" ||
9092 test ! -s conftest.err
9093 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009094 ac_hi=$ac_mid
9095else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009096 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009097sed 's/^/| /' conftest.$ac_ext >&5
9098
Martin v. Löwiseba40652007-08-30 20:10:57 +00009099 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009100fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009101
9102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009103done
9104case $ac_lo in
9105?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009106'') if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009107 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009108See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009109echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009110See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009111 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009112 else
9113 ac_cv_sizeof_short=0
9114 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009115esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009116else
Martin v. Löwis11437992002-04-12 09:54:03 +00009117 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009118/* confdefs.h. */
9119_ACEOF
9120cat confdefs.h >>conftest.$ac_ext
9121cat >>conftest.$ac_ext <<_ACEOF
9122/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009123$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009124 typedef short ac__type_sizeof_;
9125static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9126static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009127#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009128#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009129int
9130main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009131{
Martin v. Löwis11437992002-04-12 09:54:03 +00009132
9133 FILE *f = fopen ("conftest.val", "w");
9134 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009135 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009136 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009137 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009138 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009139 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009140 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009141 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009142 }
9143 else
9144 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009145 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009146 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009147 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009148 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009149 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009150 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009151
9152 ;
9153 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009154}
Martin v. Löwis11437992002-04-12 09:54:03 +00009155_ACEOF
9156rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009157if { (ac_try="$ac_link"
9158case "(($ac_try" in
9159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9160 *) ac_try_echo=$ac_try;;
9161esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009163 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009164 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009166 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009167 { (case "(($ac_try" in
9168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9169 *) ac_try_echo=$ac_try;;
9170esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009172 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009173 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009175 (exit $ac_status); }; }; then
9176 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009177else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009178 echo "$as_me: program exited with status $ac_status" >&5
9179echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009180sed 's/^/| /' conftest.$ac_ext >&5
9181
Martin v. Löwis11437992002-04-12 09:54:03 +00009182( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009183if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009184 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009185See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009186echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009187See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009188 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009189 else
9190 ac_cv_sizeof_short=0
9191 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009192fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009193rm -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 +00009194fi
9195rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009196fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009197{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9198echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009199
9200
9201
Martin v. Löwis11437992002-04-12 09:54:03 +00009202cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009203#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009204_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009205
9206
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009207{ echo "$as_me:$LINENO: checking for float" >&5
9208echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9209if test "${ac_cv_type_float+set}" = set; then
9210 echo $ECHO_N "(cached) $ECHO_C" >&6
9211else
9212 cat >conftest.$ac_ext <<_ACEOF
9213/* confdefs.h. */
9214_ACEOF
9215cat confdefs.h >>conftest.$ac_ext
9216cat >>conftest.$ac_ext <<_ACEOF
9217/* end confdefs.h. */
9218$ac_includes_default
9219typedef float ac__type_new_;
9220int
9221main ()
9222{
9223if ((ac__type_new_ *) 0)
9224 return 0;
9225if (sizeof (ac__type_new_))
9226 return 0;
9227 ;
9228 return 0;
9229}
9230_ACEOF
9231rm -f conftest.$ac_objext
9232if { (ac_try="$ac_compile"
9233case "(($ac_try" in
9234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9235 *) ac_try_echo=$ac_try;;
9236esac
9237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9238 (eval "$ac_compile") 2>conftest.er1
9239 ac_status=$?
9240 grep -v '^ *+' conftest.er1 >conftest.err
9241 rm -f conftest.er1
9242 cat conftest.err >&5
9243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9244 (exit $ac_status); } && {
9245 test -z "$ac_c_werror_flag" ||
9246 test ! -s conftest.err
9247 } && test -s conftest.$ac_objext; then
9248 ac_cv_type_float=yes
9249else
9250 echo "$as_me: failed program was:" >&5
9251sed 's/^/| /' conftest.$ac_ext >&5
9252
9253 ac_cv_type_float=no
9254fi
9255
9256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9257fi
9258{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9259echo "${ECHO_T}$ac_cv_type_float" >&6; }
9260
Martin v. Löwiseba40652007-08-30 20:10:57 +00009261# The cast to long int works around a bug in the HP C Compiler
9262# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9263# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9264# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009265{ echo "$as_me:$LINENO: checking size of float" >&5
9266echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009267if test "${ac_cv_sizeof_float+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009268 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009269else
Martin v. Löwis11437992002-04-12 09:54:03 +00009270 if test "$cross_compiling" = yes; then
9271 # Depending upon the size, compute the lo and hi bounds.
9272cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009273/* confdefs.h. */
9274_ACEOF
9275cat confdefs.h >>conftest.$ac_ext
9276cat >>conftest.$ac_ext <<_ACEOF
9277/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009278$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009279 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009280int
9281main ()
9282{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009283static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009284test_array [0] = 0
9285
9286 ;
9287 return 0;
9288}
9289_ACEOF
9290rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009291if { (ac_try="$ac_compile"
9292case "(($ac_try" in
9293 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9294 *) ac_try_echo=$ac_try;;
9295esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009296eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009297 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009298 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009299 grep -v '^ *+' conftest.er1 >conftest.err
9300 rm -f conftest.er1
9301 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009303 (exit $ac_status); } && {
9304 test -z "$ac_c_werror_flag" ||
9305 test ! -s conftest.err
9306 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009307 ac_lo=0 ac_mid=0
9308 while :; do
9309 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009310/* confdefs.h. */
9311_ACEOF
9312cat confdefs.h >>conftest.$ac_ext
9313cat >>conftest.$ac_ext <<_ACEOF
9314/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009315$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009316 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009317int
9318main ()
9319{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009320static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009321test_array [0] = 0
9322
9323 ;
9324 return 0;
9325}
9326_ACEOF
9327rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009328if { (ac_try="$ac_compile"
9329case "(($ac_try" in
9330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9331 *) ac_try_echo=$ac_try;;
9332esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009334 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009335 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009336 grep -v '^ *+' conftest.er1 >conftest.err
9337 rm -f conftest.er1
9338 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009340 (exit $ac_status); } && {
9341 test -z "$ac_c_werror_flag" ||
9342 test ! -s conftest.err
9343 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009344 ac_hi=$ac_mid; break
9345else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009346 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009347sed 's/^/| /' conftest.$ac_ext >&5
9348
Martin v. Löwiseba40652007-08-30 20:10:57 +00009349 ac_lo=`expr $ac_mid + 1`
9350 if test $ac_lo -le $ac_mid; then
9351 ac_lo= ac_hi=
9352 break
9353 fi
9354 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009355fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009356
9357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009358 done
9359else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009360 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009361sed 's/^/| /' conftest.$ac_ext >&5
9362
Martin v. Löwiseba40652007-08-30 20:10:57 +00009363 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009364/* confdefs.h. */
9365_ACEOF
9366cat confdefs.h >>conftest.$ac_ext
9367cat >>conftest.$ac_ext <<_ACEOF
9368/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009369$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009370 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009371int
9372main ()
9373{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009374static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009375test_array [0] = 0
9376
9377 ;
9378 return 0;
9379}
9380_ACEOF
9381rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009382if { (ac_try="$ac_compile"
9383case "(($ac_try" in
9384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9385 *) ac_try_echo=$ac_try;;
9386esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009388 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009389 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009390 grep -v '^ *+' conftest.er1 >conftest.err
9391 rm -f conftest.er1
9392 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009394 (exit $ac_status); } && {
9395 test -z "$ac_c_werror_flag" ||
9396 test ! -s conftest.err
9397 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009398 ac_hi=-1 ac_mid=-1
9399 while :; do
9400 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009401/* confdefs.h. */
9402_ACEOF
9403cat confdefs.h >>conftest.$ac_ext
9404cat >>conftest.$ac_ext <<_ACEOF
9405/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009406$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009407 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009408int
9409main ()
9410{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009411static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009412test_array [0] = 0
9413
9414 ;
9415 return 0;
9416}
9417_ACEOF
9418rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009419if { (ac_try="$ac_compile"
9420case "(($ac_try" in
9421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9422 *) ac_try_echo=$ac_try;;
9423esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009424eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009425 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009426 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009427 grep -v '^ *+' conftest.er1 >conftest.err
9428 rm -f conftest.er1
9429 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009431 (exit $ac_status); } && {
9432 test -z "$ac_c_werror_flag" ||
9433 test ! -s conftest.err
9434 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009435 ac_lo=$ac_mid; break
9436else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009437 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009438sed 's/^/| /' conftest.$ac_ext >&5
9439
Martin v. Löwiseba40652007-08-30 20:10:57 +00009440 ac_hi=`expr '(' $ac_mid ')' - 1`
9441 if test $ac_mid -le $ac_hi; then
9442 ac_lo= ac_hi=
9443 break
9444 fi
9445 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009446fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009447
9448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009449 done
9450else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009451 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009452sed 's/^/| /' conftest.$ac_ext >&5
9453
Martin v. Löwiseba40652007-08-30 20:10:57 +00009454 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009455fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009456
9457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009458fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009459
9460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009461# Binary search between lo and hi bounds.
9462while test "x$ac_lo" != "x$ac_hi"; do
9463 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9464 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009465/* confdefs.h. */
9466_ACEOF
9467cat confdefs.h >>conftest.$ac_ext
9468cat >>conftest.$ac_ext <<_ACEOF
9469/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009470$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009471 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009472int
9473main ()
9474{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009475static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009476test_array [0] = 0
9477
9478 ;
9479 return 0;
9480}
9481_ACEOF
9482rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009483if { (ac_try="$ac_compile"
9484case "(($ac_try" in
9485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9486 *) ac_try_echo=$ac_try;;
9487esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009489 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009490 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009491 grep -v '^ *+' conftest.er1 >conftest.err
9492 rm -f conftest.er1
9493 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009495 (exit $ac_status); } && {
9496 test -z "$ac_c_werror_flag" ||
9497 test ! -s conftest.err
9498 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009499 ac_hi=$ac_mid
9500else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009501 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009502sed 's/^/| /' conftest.$ac_ext >&5
9503
Martin v. Löwiseba40652007-08-30 20:10:57 +00009504 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009505fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009506
9507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009508done
9509case $ac_lo in
9510?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009511'') if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009512 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009513See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009514echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009515See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009516 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009517 else
9518 ac_cv_sizeof_float=0
9519 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009520esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009521else
Martin v. Löwis11437992002-04-12 09:54:03 +00009522 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009523/* confdefs.h. */
9524_ACEOF
9525cat confdefs.h >>conftest.$ac_ext
9526cat >>conftest.$ac_ext <<_ACEOF
9527/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009528$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009529 typedef float ac__type_sizeof_;
9530static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9531static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009532#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009533#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009534int
9535main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009536{
Martin v. Löwis11437992002-04-12 09:54:03 +00009537
9538 FILE *f = fopen ("conftest.val", "w");
9539 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009540 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009541 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009542 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009543 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009544 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009545 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009546 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009547 }
9548 else
9549 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009550 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009551 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009552 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009553 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009554 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009555 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009556
9557 ;
9558 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009559}
Martin v. Löwis11437992002-04-12 09:54:03 +00009560_ACEOF
9561rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009562if { (ac_try="$ac_link"
9563case "(($ac_try" in
9564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9565 *) ac_try_echo=$ac_try;;
9566esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009568 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009569 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009571 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009572 { (case "(($ac_try" in
9573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9574 *) ac_try_echo=$ac_try;;
9575esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009577 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009578 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009580 (exit $ac_status); }; }; then
9581 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009582else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009583 echo "$as_me: program exited with status $ac_status" >&5
9584echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009585sed 's/^/| /' conftest.$ac_ext >&5
9586
Martin v. Löwis11437992002-04-12 09:54:03 +00009587( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009588if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009589 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009590See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009591echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009592See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009593 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009594 else
9595 ac_cv_sizeof_float=0
9596 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009597fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009598rm -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 +00009599fi
9600rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009601fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009602{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9603echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009604
9605
9606
Martin v. Löwis11437992002-04-12 09:54:03 +00009607cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009608#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009609_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009610
9611
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009612{ echo "$as_me:$LINENO: checking for double" >&5
9613echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9614if test "${ac_cv_type_double+set}" = set; then
9615 echo $ECHO_N "(cached) $ECHO_C" >&6
9616else
9617 cat >conftest.$ac_ext <<_ACEOF
9618/* confdefs.h. */
9619_ACEOF
9620cat confdefs.h >>conftest.$ac_ext
9621cat >>conftest.$ac_ext <<_ACEOF
9622/* end confdefs.h. */
9623$ac_includes_default
9624typedef double ac__type_new_;
9625int
9626main ()
9627{
9628if ((ac__type_new_ *) 0)
9629 return 0;
9630if (sizeof (ac__type_new_))
9631 return 0;
9632 ;
9633 return 0;
9634}
9635_ACEOF
9636rm -f conftest.$ac_objext
9637if { (ac_try="$ac_compile"
9638case "(($ac_try" in
9639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9640 *) ac_try_echo=$ac_try;;
9641esac
9642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9643 (eval "$ac_compile") 2>conftest.er1
9644 ac_status=$?
9645 grep -v '^ *+' conftest.er1 >conftest.err
9646 rm -f conftest.er1
9647 cat conftest.err >&5
9648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9649 (exit $ac_status); } && {
9650 test -z "$ac_c_werror_flag" ||
9651 test ! -s conftest.err
9652 } && test -s conftest.$ac_objext; then
9653 ac_cv_type_double=yes
9654else
9655 echo "$as_me: failed program was:" >&5
9656sed 's/^/| /' conftest.$ac_ext >&5
9657
9658 ac_cv_type_double=no
9659fi
9660
9661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9662fi
9663{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9664echo "${ECHO_T}$ac_cv_type_double" >&6; }
9665
Martin v. Löwiseba40652007-08-30 20:10:57 +00009666# The cast to long int works around a bug in the HP C Compiler
9667# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9668# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9669# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009670{ echo "$as_me:$LINENO: checking size of double" >&5
9671echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009672if test "${ac_cv_sizeof_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009673 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009674else
Martin v. Löwis11437992002-04-12 09:54:03 +00009675 if test "$cross_compiling" = yes; then
9676 # Depending upon the size, compute the lo and hi bounds.
9677cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009678/* confdefs.h. */
9679_ACEOF
9680cat confdefs.h >>conftest.$ac_ext
9681cat >>conftest.$ac_ext <<_ACEOF
9682/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009683$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009684 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009685int
9686main ()
9687{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009688static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009689test_array [0] = 0
9690
9691 ;
9692 return 0;
9693}
9694_ACEOF
9695rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009696if { (ac_try="$ac_compile"
9697case "(($ac_try" in
9698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9699 *) ac_try_echo=$ac_try;;
9700esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009701eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009702 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009703 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009704 grep -v '^ *+' conftest.er1 >conftest.err
9705 rm -f conftest.er1
9706 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009708 (exit $ac_status); } && {
9709 test -z "$ac_c_werror_flag" ||
9710 test ! -s conftest.err
9711 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009712 ac_lo=0 ac_mid=0
9713 while :; do
9714 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009715/* confdefs.h. */
9716_ACEOF
9717cat confdefs.h >>conftest.$ac_ext
9718cat >>conftest.$ac_ext <<_ACEOF
9719/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009720$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009721 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009722int
9723main ()
9724{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009725static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009726test_array [0] = 0
9727
9728 ;
9729 return 0;
9730}
9731_ACEOF
9732rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009733if { (ac_try="$ac_compile"
9734case "(($ac_try" in
9735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9736 *) ac_try_echo=$ac_try;;
9737esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009739 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009740 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009741 grep -v '^ *+' conftest.er1 >conftest.err
9742 rm -f conftest.er1
9743 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009745 (exit $ac_status); } && {
9746 test -z "$ac_c_werror_flag" ||
9747 test ! -s conftest.err
9748 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009749 ac_hi=$ac_mid; break
9750else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009751 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009752sed 's/^/| /' conftest.$ac_ext >&5
9753
Martin v. Löwiseba40652007-08-30 20:10:57 +00009754 ac_lo=`expr $ac_mid + 1`
9755 if test $ac_lo -le $ac_mid; then
9756 ac_lo= ac_hi=
9757 break
9758 fi
9759 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009760fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009761
9762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009763 done
9764else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009765 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009766sed 's/^/| /' conftest.$ac_ext >&5
9767
Martin v. Löwiseba40652007-08-30 20:10:57 +00009768 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009769/* confdefs.h. */
9770_ACEOF
9771cat confdefs.h >>conftest.$ac_ext
9772cat >>conftest.$ac_ext <<_ACEOF
9773/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009774$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009775 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009776int
9777main ()
9778{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009779static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009780test_array [0] = 0
9781
9782 ;
9783 return 0;
9784}
9785_ACEOF
9786rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009787if { (ac_try="$ac_compile"
9788case "(($ac_try" in
9789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9790 *) ac_try_echo=$ac_try;;
9791esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009793 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009794 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009795 grep -v '^ *+' conftest.er1 >conftest.err
9796 rm -f conftest.er1
9797 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009799 (exit $ac_status); } && {
9800 test -z "$ac_c_werror_flag" ||
9801 test ! -s conftest.err
9802 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009803 ac_hi=-1 ac_mid=-1
9804 while :; do
9805 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009806/* confdefs.h. */
9807_ACEOF
9808cat confdefs.h >>conftest.$ac_ext
9809cat >>conftest.$ac_ext <<_ACEOF
9810/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009811$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009812 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009813int
9814main ()
9815{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009816static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009817test_array [0] = 0
9818
9819 ;
9820 return 0;
9821}
9822_ACEOF
9823rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009824if { (ac_try="$ac_compile"
9825case "(($ac_try" in
9826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9827 *) ac_try_echo=$ac_try;;
9828esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009830 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009831 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009832 grep -v '^ *+' conftest.er1 >conftest.err
9833 rm -f conftest.er1
9834 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009836 (exit $ac_status); } && {
9837 test -z "$ac_c_werror_flag" ||
9838 test ! -s conftest.err
9839 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009840 ac_lo=$ac_mid; break
9841else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009842 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009843sed 's/^/| /' conftest.$ac_ext >&5
9844
Martin v. Löwiseba40652007-08-30 20:10:57 +00009845 ac_hi=`expr '(' $ac_mid ')' - 1`
9846 if test $ac_mid -le $ac_hi; then
9847 ac_lo= ac_hi=
9848 break
9849 fi
9850 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009851fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009852
9853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009854 done
9855else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009856 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009857sed 's/^/| /' conftest.$ac_ext >&5
9858
Martin v. Löwiseba40652007-08-30 20:10:57 +00009859 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009860fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009861
9862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009863fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009864
9865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009866# Binary search between lo and hi bounds.
9867while test "x$ac_lo" != "x$ac_hi"; do
9868 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9869 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009870/* confdefs.h. */
9871_ACEOF
9872cat confdefs.h >>conftest.$ac_ext
9873cat >>conftest.$ac_ext <<_ACEOF
9874/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009875$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009876 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009877int
9878main ()
9879{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009880static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009881test_array [0] = 0
9882
9883 ;
9884 return 0;
9885}
9886_ACEOF
9887rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009888if { (ac_try="$ac_compile"
9889case "(($ac_try" in
9890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9891 *) ac_try_echo=$ac_try;;
9892esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009894 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009895 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009896 grep -v '^ *+' conftest.er1 >conftest.err
9897 rm -f conftest.er1
9898 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009900 (exit $ac_status); } && {
9901 test -z "$ac_c_werror_flag" ||
9902 test ! -s conftest.err
9903 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009904 ac_hi=$ac_mid
9905else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009906 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009907sed 's/^/| /' conftest.$ac_ext >&5
9908
Martin v. Löwiseba40652007-08-30 20:10:57 +00009909 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009910fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009911
9912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009913done
9914case $ac_lo in
9915?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009916'') if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009917 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009918See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009919echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009920See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009921 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009922 else
9923 ac_cv_sizeof_double=0
9924 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009925esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009926else
Martin v. Löwis11437992002-04-12 09:54:03 +00009927 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009928/* confdefs.h. */
9929_ACEOF
9930cat confdefs.h >>conftest.$ac_ext
9931cat >>conftest.$ac_ext <<_ACEOF
9932/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009933$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009934 typedef double ac__type_sizeof_;
9935static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9936static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009937#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009938#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009939int
9940main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009941{
Martin v. Löwis11437992002-04-12 09:54:03 +00009942
9943 FILE *f = fopen ("conftest.val", "w");
9944 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009945 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009946 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009947 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009948 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009949 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009950 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009951 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009952 }
9953 else
9954 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009955 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009956 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009957 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009958 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009959 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009960 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009961
9962 ;
9963 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009964}
Martin v. Löwis11437992002-04-12 09:54:03 +00009965_ACEOF
9966rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009967if { (ac_try="$ac_link"
9968case "(($ac_try" in
9969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9970 *) ac_try_echo=$ac_try;;
9971esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009973 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009974 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009976 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009977 { (case "(($ac_try" in
9978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9979 *) ac_try_echo=$ac_try;;
9980esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009982 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009983 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009985 (exit $ac_status); }; }; then
9986 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009987else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009988 echo "$as_me: program exited with status $ac_status" >&5
9989echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009990sed 's/^/| /' conftest.$ac_ext >&5
9991
Martin v. Löwis11437992002-04-12 09:54:03 +00009992( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009993if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009994 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009995See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009996echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009997See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009998 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009999 else
10000 ac_cv_sizeof_double=0
10001 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010002fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010003rm -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 +000010004fi
10005rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000010006fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010007{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
10008echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010009
10010
10011
Martin v. Löwis11437992002-04-12 09:54:03 +000010012cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010013#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +000010014_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010015
10016
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010017{ echo "$as_me:$LINENO: checking for fpos_t" >&5
10018echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
10019if test "${ac_cv_type_fpos_t+set}" = set; then
10020 echo $ECHO_N "(cached) $ECHO_C" >&6
10021else
10022 cat >conftest.$ac_ext <<_ACEOF
10023/* confdefs.h. */
10024_ACEOF
10025cat confdefs.h >>conftest.$ac_ext
10026cat >>conftest.$ac_ext <<_ACEOF
10027/* end confdefs.h. */
10028$ac_includes_default
10029typedef fpos_t ac__type_new_;
10030int
10031main ()
10032{
10033if ((ac__type_new_ *) 0)
10034 return 0;
10035if (sizeof (ac__type_new_))
10036 return 0;
10037 ;
10038 return 0;
10039}
10040_ACEOF
10041rm -f conftest.$ac_objext
10042if { (ac_try="$ac_compile"
10043case "(($ac_try" in
10044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10045 *) ac_try_echo=$ac_try;;
10046esac
10047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10048 (eval "$ac_compile") 2>conftest.er1
10049 ac_status=$?
10050 grep -v '^ *+' conftest.er1 >conftest.err
10051 rm -f conftest.er1
10052 cat conftest.err >&5
10053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10054 (exit $ac_status); } && {
10055 test -z "$ac_c_werror_flag" ||
10056 test ! -s conftest.err
10057 } && test -s conftest.$ac_objext; then
10058 ac_cv_type_fpos_t=yes
10059else
10060 echo "$as_me: failed program was:" >&5
10061sed 's/^/| /' conftest.$ac_ext >&5
10062
10063 ac_cv_type_fpos_t=no
10064fi
10065
10066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10067fi
10068{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
10069echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
10070
Martin v. Löwiseba40652007-08-30 20:10:57 +000010071# The cast to long int works around a bug in the HP C Compiler
10072# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10073# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10074# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010075{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
10076echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010077if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010078 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010079else
Martin v. Löwis11437992002-04-12 09:54:03 +000010080 if test "$cross_compiling" = yes; then
10081 # Depending upon the size, compute the lo and hi bounds.
10082cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010083/* confdefs.h. */
10084_ACEOF
10085cat confdefs.h >>conftest.$ac_ext
10086cat >>conftest.$ac_ext <<_ACEOF
10087/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010088$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010089 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010090int
10091main ()
10092{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010093static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010094test_array [0] = 0
10095
10096 ;
10097 return 0;
10098}
10099_ACEOF
10100rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010101if { (ac_try="$ac_compile"
10102case "(($ac_try" in
10103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10104 *) ac_try_echo=$ac_try;;
10105esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010107 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010108 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010109 grep -v '^ *+' conftest.er1 >conftest.err
10110 rm -f conftest.er1
10111 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010113 (exit $ac_status); } && {
10114 test -z "$ac_c_werror_flag" ||
10115 test ! -s conftest.err
10116 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010117 ac_lo=0 ac_mid=0
10118 while :; do
10119 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010120/* confdefs.h. */
10121_ACEOF
10122cat confdefs.h >>conftest.$ac_ext
10123cat >>conftest.$ac_ext <<_ACEOF
10124/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010125$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010126 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010127int
10128main ()
10129{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010130static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010131test_array [0] = 0
10132
10133 ;
10134 return 0;
10135}
10136_ACEOF
10137rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010138if { (ac_try="$ac_compile"
10139case "(($ac_try" in
10140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10141 *) ac_try_echo=$ac_try;;
10142esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010144 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010145 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010146 grep -v '^ *+' conftest.er1 >conftest.err
10147 rm -f conftest.er1
10148 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010150 (exit $ac_status); } && {
10151 test -z "$ac_c_werror_flag" ||
10152 test ! -s conftest.err
10153 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010154 ac_hi=$ac_mid; break
10155else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010156 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010157sed 's/^/| /' conftest.$ac_ext >&5
10158
Martin v. Löwiseba40652007-08-30 20:10:57 +000010159 ac_lo=`expr $ac_mid + 1`
10160 if test $ac_lo -le $ac_mid; then
10161 ac_lo= ac_hi=
10162 break
10163 fi
10164 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010165fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010166
10167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010168 done
10169else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010170 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010171sed 's/^/| /' conftest.$ac_ext >&5
10172
Martin v. Löwiseba40652007-08-30 20:10:57 +000010173 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010174/* confdefs.h. */
10175_ACEOF
10176cat confdefs.h >>conftest.$ac_ext
10177cat >>conftest.$ac_ext <<_ACEOF
10178/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010179$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010180 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010181int
10182main ()
10183{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010184static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010185test_array [0] = 0
10186
10187 ;
10188 return 0;
10189}
10190_ACEOF
10191rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010192if { (ac_try="$ac_compile"
10193case "(($ac_try" in
10194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10195 *) ac_try_echo=$ac_try;;
10196esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010198 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010199 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010200 grep -v '^ *+' conftest.er1 >conftest.err
10201 rm -f conftest.er1
10202 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010204 (exit $ac_status); } && {
10205 test -z "$ac_c_werror_flag" ||
10206 test ! -s conftest.err
10207 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010208 ac_hi=-1 ac_mid=-1
10209 while :; do
10210 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010211/* confdefs.h. */
10212_ACEOF
10213cat confdefs.h >>conftest.$ac_ext
10214cat >>conftest.$ac_ext <<_ACEOF
10215/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010216$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010217 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010218int
10219main ()
10220{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010221static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010222test_array [0] = 0
10223
10224 ;
10225 return 0;
10226}
10227_ACEOF
10228rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010229if { (ac_try="$ac_compile"
10230case "(($ac_try" in
10231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10232 *) ac_try_echo=$ac_try;;
10233esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010235 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010236 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010237 grep -v '^ *+' conftest.er1 >conftest.err
10238 rm -f conftest.er1
10239 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010241 (exit $ac_status); } && {
10242 test -z "$ac_c_werror_flag" ||
10243 test ! -s conftest.err
10244 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010245 ac_lo=$ac_mid; break
10246else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010247 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010248sed 's/^/| /' conftest.$ac_ext >&5
10249
Martin v. Löwiseba40652007-08-30 20:10:57 +000010250 ac_hi=`expr '(' $ac_mid ')' - 1`
10251 if test $ac_mid -le $ac_hi; then
10252 ac_lo= ac_hi=
10253 break
10254 fi
10255 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010256fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010257
10258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010259 done
10260else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010261 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010262sed 's/^/| /' conftest.$ac_ext >&5
10263
Martin v. Löwiseba40652007-08-30 20:10:57 +000010264 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010265fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010266
10267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010268fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010269
10270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010271# Binary search between lo and hi bounds.
10272while test "x$ac_lo" != "x$ac_hi"; do
10273 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10274 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010275/* confdefs.h. */
10276_ACEOF
10277cat confdefs.h >>conftest.$ac_ext
10278cat >>conftest.$ac_ext <<_ACEOF
10279/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010280$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010281 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010282int
10283main ()
10284{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010285static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010286test_array [0] = 0
10287
10288 ;
10289 return 0;
10290}
10291_ACEOF
10292rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010293if { (ac_try="$ac_compile"
10294case "(($ac_try" in
10295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10296 *) ac_try_echo=$ac_try;;
10297esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010299 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010300 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010301 grep -v '^ *+' conftest.er1 >conftest.err
10302 rm -f conftest.er1
10303 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010305 (exit $ac_status); } && {
10306 test -z "$ac_c_werror_flag" ||
10307 test ! -s conftest.err
10308 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010309 ac_hi=$ac_mid
10310else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010311 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010312sed 's/^/| /' conftest.$ac_ext >&5
10313
Martin v. Löwiseba40652007-08-30 20:10:57 +000010314 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010315fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010316
10317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010318done
10319case $ac_lo in
10320?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010321'') if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010322 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010323See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010324echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010325See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010326 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010327 else
10328 ac_cv_sizeof_fpos_t=0
10329 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010330esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010331else
Martin v. Löwis11437992002-04-12 09:54:03 +000010332 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010333/* confdefs.h. */
10334_ACEOF
10335cat confdefs.h >>conftest.$ac_ext
10336cat >>conftest.$ac_ext <<_ACEOF
10337/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010338$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010339 typedef fpos_t ac__type_sizeof_;
10340static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10341static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010342#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010343#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010344int
10345main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010346{
Martin v. Löwis11437992002-04-12 09:54:03 +000010347
10348 FILE *f = fopen ("conftest.val", "w");
10349 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010350 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010351 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010352 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010353 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010354 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010355 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010356 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010357 }
10358 else
10359 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010360 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010361 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010362 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010363 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010364 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010365 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010366
10367 ;
10368 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010369}
Martin v. Löwis11437992002-04-12 09:54:03 +000010370_ACEOF
10371rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010372if { (ac_try="$ac_link"
10373case "(($ac_try" in
10374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10375 *) ac_try_echo=$ac_try;;
10376esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010378 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010379 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010381 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010382 { (case "(($ac_try" in
10383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10384 *) ac_try_echo=$ac_try;;
10385esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010387 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010388 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010390 (exit $ac_status); }; }; then
10391 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010392else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010393 echo "$as_me: program exited with status $ac_status" >&5
10394echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010395sed 's/^/| /' conftest.$ac_ext >&5
10396
Martin v. Löwis11437992002-04-12 09:54:03 +000010397( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010398if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010399 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010400See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010401echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010402See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010403 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010404 else
10405 ac_cv_sizeof_fpos_t=0
10406 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010407fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010408rm -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 +000010409fi
10410rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010411fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010412{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10413echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010414
10415
10416
Martin v. Löwis11437992002-04-12 09:54:03 +000010417cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010418#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010419_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010420
Michael W. Hudson54241132001-12-07 15:38:26 +000010421
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010422{ echo "$as_me:$LINENO: checking for size_t" >&5
10423echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10424if test "${ac_cv_type_size_t+set}" = set; then
10425 echo $ECHO_N "(cached) $ECHO_C" >&6
10426else
10427 cat >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
10434typedef size_t ac__type_new_;
10435int
10436main ()
10437{
10438if ((ac__type_new_ *) 0)
10439 return 0;
10440if (sizeof (ac__type_new_))
10441 return 0;
10442 ;
10443 return 0;
10444}
10445_ACEOF
10446rm -f conftest.$ac_objext
10447if { (ac_try="$ac_compile"
10448case "(($ac_try" in
10449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10450 *) ac_try_echo=$ac_try;;
10451esac
10452eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10453 (eval "$ac_compile") 2>conftest.er1
10454 ac_status=$?
10455 grep -v '^ *+' conftest.er1 >conftest.err
10456 rm -f conftest.er1
10457 cat conftest.err >&5
10458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10459 (exit $ac_status); } && {
10460 test -z "$ac_c_werror_flag" ||
10461 test ! -s conftest.err
10462 } && test -s conftest.$ac_objext; then
10463 ac_cv_type_size_t=yes
10464else
10465 echo "$as_me: failed program was:" >&5
10466sed 's/^/| /' conftest.$ac_ext >&5
10467
10468 ac_cv_type_size_t=no
10469fi
10470
10471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10472fi
10473{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10474echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10475
Martin v. Löwiseba40652007-08-30 20:10:57 +000010476# The cast to long int works around a bug in the HP C Compiler
10477# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10478# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10479# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010480{ echo "$as_me:$LINENO: checking size of size_t" >&5
10481echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010482if test "${ac_cv_sizeof_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010483 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010484else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010485 if test "$cross_compiling" = yes; then
10486 # Depending upon the size, compute the lo and hi bounds.
10487cat >conftest.$ac_ext <<_ACEOF
10488/* confdefs.h. */
10489_ACEOF
10490cat confdefs.h >>conftest.$ac_ext
10491cat >>conftest.$ac_ext <<_ACEOF
10492/* end confdefs.h. */
10493$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010494 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010495int
10496main ()
10497{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010498static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010499test_array [0] = 0
10500
10501 ;
10502 return 0;
10503}
10504_ACEOF
10505rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010506if { (ac_try="$ac_compile"
10507case "(($ac_try" in
10508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10509 *) ac_try_echo=$ac_try;;
10510esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010512 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010513 ac_status=$?
10514 grep -v '^ *+' conftest.er1 >conftest.err
10515 rm -f conftest.er1
10516 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010518 (exit $ac_status); } && {
10519 test -z "$ac_c_werror_flag" ||
10520 test ! -s conftest.err
10521 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010522 ac_lo=0 ac_mid=0
10523 while :; do
10524 cat >conftest.$ac_ext <<_ACEOF
10525/* confdefs.h. */
10526_ACEOF
10527cat confdefs.h >>conftest.$ac_ext
10528cat >>conftest.$ac_ext <<_ACEOF
10529/* end confdefs.h. */
10530$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010531 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010532int
10533main ()
10534{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010535static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010536test_array [0] = 0
10537
10538 ;
10539 return 0;
10540}
10541_ACEOF
10542rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010543if { (ac_try="$ac_compile"
10544case "(($ac_try" in
10545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10546 *) ac_try_echo=$ac_try;;
10547esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010549 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010550 ac_status=$?
10551 grep -v '^ *+' conftest.er1 >conftest.err
10552 rm -f conftest.er1
10553 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010555 (exit $ac_status); } && {
10556 test -z "$ac_c_werror_flag" ||
10557 test ! -s conftest.err
10558 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010559 ac_hi=$ac_mid; break
10560else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010561 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010562sed 's/^/| /' conftest.$ac_ext >&5
10563
Martin v. Löwiseba40652007-08-30 20:10:57 +000010564 ac_lo=`expr $ac_mid + 1`
10565 if test $ac_lo -le $ac_mid; then
10566 ac_lo= ac_hi=
10567 break
10568 fi
10569 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010570fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010571
10572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010573 done
10574else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010575 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010576sed 's/^/| /' conftest.$ac_ext >&5
10577
Martin v. Löwiseba40652007-08-30 20:10:57 +000010578 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010579/* confdefs.h. */
10580_ACEOF
10581cat confdefs.h >>conftest.$ac_ext
10582cat >>conftest.$ac_ext <<_ACEOF
10583/* end confdefs.h. */
10584$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010585 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010586int
10587main ()
10588{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010589static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010590test_array [0] = 0
10591
10592 ;
10593 return 0;
10594}
10595_ACEOF
10596rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010597if { (ac_try="$ac_compile"
10598case "(($ac_try" in
10599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10600 *) ac_try_echo=$ac_try;;
10601esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010603 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010604 ac_status=$?
10605 grep -v '^ *+' conftest.er1 >conftest.err
10606 rm -f conftest.er1
10607 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010609 (exit $ac_status); } && {
10610 test -z "$ac_c_werror_flag" ||
10611 test ! -s conftest.err
10612 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010613 ac_hi=-1 ac_mid=-1
10614 while :; do
10615 cat >conftest.$ac_ext <<_ACEOF
10616/* confdefs.h. */
10617_ACEOF
10618cat confdefs.h >>conftest.$ac_ext
10619cat >>conftest.$ac_ext <<_ACEOF
10620/* end confdefs.h. */
10621$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010622 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010623int
10624main ()
10625{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010626static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010627test_array [0] = 0
10628
10629 ;
10630 return 0;
10631}
10632_ACEOF
10633rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010634if { (ac_try="$ac_compile"
10635case "(($ac_try" in
10636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10637 *) ac_try_echo=$ac_try;;
10638esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010640 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010641 ac_status=$?
10642 grep -v '^ *+' conftest.er1 >conftest.err
10643 rm -f conftest.er1
10644 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010646 (exit $ac_status); } && {
10647 test -z "$ac_c_werror_flag" ||
10648 test ! -s conftest.err
10649 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010650 ac_lo=$ac_mid; break
10651else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010652 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010653sed 's/^/| /' conftest.$ac_ext >&5
10654
Martin v. Löwiseba40652007-08-30 20:10:57 +000010655 ac_hi=`expr '(' $ac_mid ')' - 1`
10656 if test $ac_mid -le $ac_hi; then
10657 ac_lo= ac_hi=
10658 break
10659 fi
10660 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010661fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010662
10663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010664 done
10665else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010666 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010667sed 's/^/| /' conftest.$ac_ext >&5
10668
Martin v. Löwiseba40652007-08-30 20:10:57 +000010669 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010670fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010671
10672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010673fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010674
10675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010676# Binary search between lo and hi bounds.
10677while test "x$ac_lo" != "x$ac_hi"; do
10678 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10679 cat >conftest.$ac_ext <<_ACEOF
10680/* confdefs.h. */
10681_ACEOF
10682cat confdefs.h >>conftest.$ac_ext
10683cat >>conftest.$ac_ext <<_ACEOF
10684/* end confdefs.h. */
10685$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010686 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010687int
10688main ()
10689{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010690static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010691test_array [0] = 0
10692
10693 ;
10694 return 0;
10695}
10696_ACEOF
10697rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010698if { (ac_try="$ac_compile"
10699case "(($ac_try" in
10700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10701 *) ac_try_echo=$ac_try;;
10702esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010704 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010705 ac_status=$?
10706 grep -v '^ *+' conftest.er1 >conftest.err
10707 rm -f conftest.er1
10708 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010710 (exit $ac_status); } && {
10711 test -z "$ac_c_werror_flag" ||
10712 test ! -s conftest.err
10713 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010714 ac_hi=$ac_mid
10715else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010716 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010717sed 's/^/| /' conftest.$ac_ext >&5
10718
Martin v. Löwiseba40652007-08-30 20:10:57 +000010719 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010720fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010721
10722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010723done
10724case $ac_lo in
10725?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010726'') if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010727 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010728See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010729echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010730See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010731 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010732 else
10733 ac_cv_sizeof_size_t=0
10734 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010735esac
10736else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010737 cat >conftest.$ac_ext <<_ACEOF
10738/* confdefs.h. */
10739_ACEOF
10740cat confdefs.h >>conftest.$ac_ext
10741cat >>conftest.$ac_ext <<_ACEOF
10742/* end confdefs.h. */
10743$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010744 typedef size_t ac__type_sizeof_;
10745static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10746static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010747#include <stdio.h>
10748#include <stdlib.h>
10749int
10750main ()
10751{
10752
10753 FILE *f = fopen ("conftest.val", "w");
10754 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010755 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010756 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010757 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010758 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010759 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010760 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010761 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010762 }
10763 else
10764 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010765 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010766 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010767 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010768 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010769 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010770 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010771
10772 ;
10773 return 0;
10774}
10775_ACEOF
10776rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010777if { (ac_try="$ac_link"
10778case "(($ac_try" in
10779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10780 *) ac_try_echo=$ac_try;;
10781esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010783 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010784 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010786 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010787 { (case "(($ac_try" in
10788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10789 *) ac_try_echo=$ac_try;;
10790esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010792 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010793 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010795 (exit $ac_status); }; }; then
10796 ac_cv_sizeof_size_t=`cat conftest.val`
10797else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010798 echo "$as_me: program exited with status $ac_status" >&5
10799echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010800sed 's/^/| /' conftest.$ac_ext >&5
10801
10802( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010803if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010804 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010805See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010806echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010807See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010808 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010809 else
10810 ac_cv_sizeof_size_t=0
10811 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010812fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010813rm -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 +000010814fi
10815rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010816fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010817{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10818echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010819
10820
10821
Martin v. Löwis18e16552006-02-15 17:27:45 +000010822cat >>confdefs.h <<_ACEOF
10823#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10824_ACEOF
10825
10826
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010827{ echo "$as_me:$LINENO: checking for pid_t" >&5
10828echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10829if test "${ac_cv_type_pid_t+set}" = set; then
10830 echo $ECHO_N "(cached) $ECHO_C" >&6
10831else
10832 cat >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
10839typedef pid_t ac__type_new_;
10840int
10841main ()
10842{
10843if ((ac__type_new_ *) 0)
10844 return 0;
10845if (sizeof (ac__type_new_))
10846 return 0;
10847 ;
10848 return 0;
10849}
10850_ACEOF
10851rm -f conftest.$ac_objext
10852if { (ac_try="$ac_compile"
10853case "(($ac_try" in
10854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10855 *) ac_try_echo=$ac_try;;
10856esac
10857eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10858 (eval "$ac_compile") 2>conftest.er1
10859 ac_status=$?
10860 grep -v '^ *+' conftest.er1 >conftest.err
10861 rm -f conftest.er1
10862 cat conftest.err >&5
10863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10864 (exit $ac_status); } && {
10865 test -z "$ac_c_werror_flag" ||
10866 test ! -s conftest.err
10867 } && test -s conftest.$ac_objext; then
10868 ac_cv_type_pid_t=yes
10869else
10870 echo "$as_me: failed program was:" >&5
10871sed 's/^/| /' conftest.$ac_ext >&5
10872
10873 ac_cv_type_pid_t=no
10874fi
10875
10876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10877fi
10878{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10879echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10880
Christian Heimes951cc0f2008-01-31 23:08:23 +000010881# The cast to long int works around a bug in the HP C Compiler
10882# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10883# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10884# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010885{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10886echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000010887if test "${ac_cv_sizeof_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010888 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +000010889else
10890 if test "$cross_compiling" = yes; then
10891 # Depending upon the size, compute the lo and hi bounds.
10892cat >conftest.$ac_ext <<_ACEOF
10893/* confdefs.h. */
10894_ACEOF
10895cat confdefs.h >>conftest.$ac_ext
10896cat >>conftest.$ac_ext <<_ACEOF
10897/* end confdefs.h. */
10898$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010899 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010900int
10901main ()
10902{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010903static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010904test_array [0] = 0
10905
10906 ;
10907 return 0;
10908}
10909_ACEOF
10910rm -f conftest.$ac_objext
10911if { (ac_try="$ac_compile"
10912case "(($ac_try" in
10913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10914 *) ac_try_echo=$ac_try;;
10915esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010917 (eval "$ac_compile") 2>conftest.er1
10918 ac_status=$?
10919 grep -v '^ *+' conftest.er1 >conftest.err
10920 rm -f conftest.er1
10921 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010923 (exit $ac_status); } && {
10924 test -z "$ac_c_werror_flag" ||
10925 test ! -s conftest.err
10926 } && test -s conftest.$ac_objext; then
10927 ac_lo=0 ac_mid=0
10928 while :; do
10929 cat >conftest.$ac_ext <<_ACEOF
10930/* confdefs.h. */
10931_ACEOF
10932cat confdefs.h >>conftest.$ac_ext
10933cat >>conftest.$ac_ext <<_ACEOF
10934/* end confdefs.h. */
10935$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010936 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010937int
10938main ()
10939{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010940static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010941test_array [0] = 0
10942
10943 ;
10944 return 0;
10945}
10946_ACEOF
10947rm -f conftest.$ac_objext
10948if { (ac_try="$ac_compile"
10949case "(($ac_try" in
10950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10951 *) ac_try_echo=$ac_try;;
10952esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010954 (eval "$ac_compile") 2>conftest.er1
10955 ac_status=$?
10956 grep -v '^ *+' conftest.er1 >conftest.err
10957 rm -f conftest.er1
10958 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010960 (exit $ac_status); } && {
10961 test -z "$ac_c_werror_flag" ||
10962 test ! -s conftest.err
10963 } && test -s conftest.$ac_objext; then
10964 ac_hi=$ac_mid; break
10965else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010966 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010967sed 's/^/| /' conftest.$ac_ext >&5
10968
10969 ac_lo=`expr $ac_mid + 1`
10970 if test $ac_lo -le $ac_mid; then
10971 ac_lo= ac_hi=
10972 break
10973 fi
10974 ac_mid=`expr 2 '*' $ac_mid + 1`
10975fi
10976
10977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10978 done
10979else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010980 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010981sed 's/^/| /' conftest.$ac_ext >&5
10982
10983 cat >conftest.$ac_ext <<_ACEOF
10984/* confdefs.h. */
10985_ACEOF
10986cat confdefs.h >>conftest.$ac_ext
10987cat >>conftest.$ac_ext <<_ACEOF
10988/* end confdefs.h. */
10989$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010990 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010991int
10992main ()
10993{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010994static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010995test_array [0] = 0
10996
10997 ;
10998 return 0;
10999}
11000_ACEOF
11001rm -f conftest.$ac_objext
11002if { (ac_try="$ac_compile"
11003case "(($ac_try" in
11004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11005 *) ac_try_echo=$ac_try;;
11006esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011008 (eval "$ac_compile") 2>conftest.er1
11009 ac_status=$?
11010 grep -v '^ *+' conftest.er1 >conftest.err
11011 rm -f conftest.er1
11012 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011014 (exit $ac_status); } && {
11015 test -z "$ac_c_werror_flag" ||
11016 test ! -s conftest.err
11017 } && test -s conftest.$ac_objext; then
11018 ac_hi=-1 ac_mid=-1
11019 while :; do
11020 cat >conftest.$ac_ext <<_ACEOF
11021/* confdefs.h. */
11022_ACEOF
11023cat confdefs.h >>conftest.$ac_ext
11024cat >>conftest.$ac_ext <<_ACEOF
11025/* end confdefs.h. */
11026$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011027 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011028int
11029main ()
11030{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011031static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011032test_array [0] = 0
11033
11034 ;
11035 return 0;
11036}
11037_ACEOF
11038rm -f conftest.$ac_objext
11039if { (ac_try="$ac_compile"
11040case "(($ac_try" in
11041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11042 *) ac_try_echo=$ac_try;;
11043esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011045 (eval "$ac_compile") 2>conftest.er1
11046 ac_status=$?
11047 grep -v '^ *+' conftest.er1 >conftest.err
11048 rm -f conftest.er1
11049 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011051 (exit $ac_status); } && {
11052 test -z "$ac_c_werror_flag" ||
11053 test ! -s conftest.err
11054 } && test -s conftest.$ac_objext; then
11055 ac_lo=$ac_mid; break
11056else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011057 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011058sed 's/^/| /' conftest.$ac_ext >&5
11059
11060 ac_hi=`expr '(' $ac_mid ')' - 1`
11061 if test $ac_mid -le $ac_hi; then
11062 ac_lo= ac_hi=
11063 break
11064 fi
11065 ac_mid=`expr 2 '*' $ac_mid`
11066fi
11067
11068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11069 done
11070else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011071 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011072sed 's/^/| /' conftest.$ac_ext >&5
11073
11074 ac_lo= ac_hi=
11075fi
11076
11077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11078fi
11079
11080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11081# Binary search between lo and hi bounds.
11082while test "x$ac_lo" != "x$ac_hi"; do
11083 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11084 cat >conftest.$ac_ext <<_ACEOF
11085/* confdefs.h. */
11086_ACEOF
11087cat confdefs.h >>conftest.$ac_ext
11088cat >>conftest.$ac_ext <<_ACEOF
11089/* end confdefs.h. */
11090$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011091 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011092int
11093main ()
11094{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011095static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011096test_array [0] = 0
11097
11098 ;
11099 return 0;
11100}
11101_ACEOF
11102rm -f conftest.$ac_objext
11103if { (ac_try="$ac_compile"
11104case "(($ac_try" in
11105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11106 *) ac_try_echo=$ac_try;;
11107esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011109 (eval "$ac_compile") 2>conftest.er1
11110 ac_status=$?
11111 grep -v '^ *+' conftest.er1 >conftest.err
11112 rm -f conftest.er1
11113 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011115 (exit $ac_status); } && {
11116 test -z "$ac_c_werror_flag" ||
11117 test ! -s conftest.err
11118 } && test -s conftest.$ac_objext; then
11119 ac_hi=$ac_mid
11120else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011121 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011122sed 's/^/| /' conftest.$ac_ext >&5
11123
11124 ac_lo=`expr '(' $ac_mid ')' + 1`
11125fi
11126
11127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11128done
11129case $ac_lo in
11130?*) ac_cv_sizeof_pid_t=$ac_lo;;
11131'') if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011132 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011133See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011134echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011135See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011136 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011137 else
11138 ac_cv_sizeof_pid_t=0
11139 fi ;;
11140esac
11141else
11142 cat >conftest.$ac_ext <<_ACEOF
11143/* confdefs.h. */
11144_ACEOF
11145cat confdefs.h >>conftest.$ac_ext
11146cat >>conftest.$ac_ext <<_ACEOF
11147/* end confdefs.h. */
11148$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011149 typedef pid_t ac__type_sizeof_;
11150static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11151static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011152#include <stdio.h>
11153#include <stdlib.h>
11154int
11155main ()
11156{
11157
11158 FILE *f = fopen ("conftest.val", "w");
11159 if (! f)
11160 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011161 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011162 {
11163 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011164 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011165 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011166 fprintf (f, "%ld\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011167 }
11168 else
11169 {
11170 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011171 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011172 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011173 fprintf (f, "%lu\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011174 }
11175 return ferror (f) || fclose (f) != 0;
11176
11177 ;
11178 return 0;
11179}
11180_ACEOF
11181rm -f conftest$ac_exeext
11182if { (ac_try="$ac_link"
11183case "(($ac_try" in
11184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11185 *) ac_try_echo=$ac_try;;
11186esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011187eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011188 (eval "$ac_link") 2>&5
11189 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011191 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11192 { (case "(($ac_try" in
11193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11194 *) ac_try_echo=$ac_try;;
11195esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011197 (eval "$ac_try") 2>&5
11198 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011200 (exit $ac_status); }; }; then
11201 ac_cv_sizeof_pid_t=`cat conftest.val`
11202else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011203 echo "$as_me: program exited with status $ac_status" >&5
11204echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011205sed 's/^/| /' conftest.$ac_ext >&5
11206
11207( exit $ac_status )
11208if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011209 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011210See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011211echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011212See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011213 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011214 else
11215 ac_cv_sizeof_pid_t=0
11216 fi
11217fi
11218rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11219fi
11220rm -f conftest.val
11221fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011222{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11223echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011224
11225
11226
11227cat >>confdefs.h <<_ACEOF
11228#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11229_ACEOF
11230
11231
Michael W. Hudson54241132001-12-07 15:38:26 +000011232
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011233{ echo "$as_me:$LINENO: checking for long long support" >&5
11234echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011235have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011236cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011237/* confdefs.h. */
11238_ACEOF
11239cat confdefs.h >>conftest.$ac_ext
11240cat >>conftest.$ac_ext <<_ACEOF
11241/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011242
Martin v. Löwis11437992002-04-12 09:54:03 +000011243int
11244main ()
11245{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011246long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011247 ;
11248 return 0;
11249}
11250_ACEOF
11251rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011252if { (ac_try="$ac_compile"
11253case "(($ac_try" in
11254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11255 *) ac_try_echo=$ac_try;;
11256esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011257eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011258 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011259 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011260 grep -v '^ *+' conftest.er1 >conftest.err
11261 rm -f conftest.er1
11262 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011264 (exit $ac_status); } && {
11265 test -z "$ac_c_werror_flag" ||
11266 test ! -s conftest.err
11267 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011268
11269
11270cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011271#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011272_ACEOF
11273
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011274 have_long_long=yes
11275
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011276else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011277 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011278sed 's/^/| /' conftest.$ac_ext >&5
11279
Martin v. Löwiseba40652007-08-30 20:10:57 +000011280
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011281fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011282
11283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011284{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11285echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011286if test "$have_long_long" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011287{ echo "$as_me:$LINENO: checking for long long" >&5
11288echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11289if test "${ac_cv_type_long_long+set}" = set; then
11290 echo $ECHO_N "(cached) $ECHO_C" >&6
11291else
11292 cat >conftest.$ac_ext <<_ACEOF
11293/* confdefs.h. */
11294_ACEOF
11295cat confdefs.h >>conftest.$ac_ext
11296cat >>conftest.$ac_ext <<_ACEOF
11297/* end confdefs.h. */
11298$ac_includes_default
11299typedef long long ac__type_new_;
11300int
11301main ()
11302{
11303if ((ac__type_new_ *) 0)
11304 return 0;
11305if (sizeof (ac__type_new_))
11306 return 0;
11307 ;
11308 return 0;
11309}
11310_ACEOF
11311rm -f conftest.$ac_objext
11312if { (ac_try="$ac_compile"
11313case "(($ac_try" in
11314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11315 *) ac_try_echo=$ac_try;;
11316esac
11317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11318 (eval "$ac_compile") 2>conftest.er1
11319 ac_status=$?
11320 grep -v '^ *+' conftest.er1 >conftest.err
11321 rm -f conftest.er1
11322 cat conftest.err >&5
11323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11324 (exit $ac_status); } && {
11325 test -z "$ac_c_werror_flag" ||
11326 test ! -s conftest.err
11327 } && test -s conftest.$ac_objext; then
11328 ac_cv_type_long_long=yes
11329else
11330 echo "$as_me: failed program was:" >&5
11331sed 's/^/| /' conftest.$ac_ext >&5
11332
11333 ac_cv_type_long_long=no
11334fi
11335
11336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11337fi
11338{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11339echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11340
Martin v. Löwiseba40652007-08-30 20:10:57 +000011341# The cast to long int works around a bug in the HP C Compiler
11342# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11343# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11344# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011345{ echo "$as_me:$LINENO: checking size of long long" >&5
11346echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011347if test "${ac_cv_sizeof_long_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011348 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011349else
Martin v. Löwis11437992002-04-12 09:54:03 +000011350 if test "$cross_compiling" = yes; then
11351 # Depending upon the size, compute the lo and hi bounds.
11352cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011353/* confdefs.h. */
11354_ACEOF
11355cat confdefs.h >>conftest.$ac_ext
11356cat >>conftest.$ac_ext <<_ACEOF
11357/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011358$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011359 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011360int
11361main ()
11362{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011363static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011364test_array [0] = 0
11365
11366 ;
11367 return 0;
11368}
11369_ACEOF
11370rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011371if { (ac_try="$ac_compile"
11372case "(($ac_try" in
11373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11374 *) ac_try_echo=$ac_try;;
11375esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011377 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011378 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011379 grep -v '^ *+' conftest.er1 >conftest.err
11380 rm -f conftest.er1
11381 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011383 (exit $ac_status); } && {
11384 test -z "$ac_c_werror_flag" ||
11385 test ! -s conftest.err
11386 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011387 ac_lo=0 ac_mid=0
11388 while :; do
11389 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011390/* confdefs.h. */
11391_ACEOF
11392cat confdefs.h >>conftest.$ac_ext
11393cat >>conftest.$ac_ext <<_ACEOF
11394/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011395$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011396 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011397int
11398main ()
11399{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011400static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011401test_array [0] = 0
11402
11403 ;
11404 return 0;
11405}
11406_ACEOF
11407rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011408if { (ac_try="$ac_compile"
11409case "(($ac_try" in
11410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11411 *) ac_try_echo=$ac_try;;
11412esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011414 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011415 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011416 grep -v '^ *+' conftest.er1 >conftest.err
11417 rm -f conftest.er1
11418 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011420 (exit $ac_status); } && {
11421 test -z "$ac_c_werror_flag" ||
11422 test ! -s conftest.err
11423 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011424 ac_hi=$ac_mid; break
11425else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011426 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011427sed 's/^/| /' conftest.$ac_ext >&5
11428
Martin v. Löwiseba40652007-08-30 20:10:57 +000011429 ac_lo=`expr $ac_mid + 1`
11430 if test $ac_lo -le $ac_mid; then
11431 ac_lo= ac_hi=
11432 break
11433 fi
11434 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011435fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011436
11437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011438 done
11439else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011440 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011441sed 's/^/| /' conftest.$ac_ext >&5
11442
Martin v. Löwiseba40652007-08-30 20:10:57 +000011443 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011444/* confdefs.h. */
11445_ACEOF
11446cat confdefs.h >>conftest.$ac_ext
11447cat >>conftest.$ac_ext <<_ACEOF
11448/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011449$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011450 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011451int
11452main ()
11453{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011454static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011455test_array [0] = 0
11456
11457 ;
11458 return 0;
11459}
11460_ACEOF
11461rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011462if { (ac_try="$ac_compile"
11463case "(($ac_try" in
11464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11465 *) ac_try_echo=$ac_try;;
11466esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011468 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011469 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011470 grep -v '^ *+' conftest.er1 >conftest.err
11471 rm -f conftest.er1
11472 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011474 (exit $ac_status); } && {
11475 test -z "$ac_c_werror_flag" ||
11476 test ! -s conftest.err
11477 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011478 ac_hi=-1 ac_mid=-1
11479 while :; do
11480 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011481/* confdefs.h. */
11482_ACEOF
11483cat confdefs.h >>conftest.$ac_ext
11484cat >>conftest.$ac_ext <<_ACEOF
11485/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011486$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011487 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011488int
11489main ()
11490{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011491static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011492test_array [0] = 0
11493
11494 ;
11495 return 0;
11496}
11497_ACEOF
11498rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011499if { (ac_try="$ac_compile"
11500case "(($ac_try" in
11501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11502 *) ac_try_echo=$ac_try;;
11503esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011505 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011506 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011507 grep -v '^ *+' conftest.er1 >conftest.err
11508 rm -f conftest.er1
11509 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011511 (exit $ac_status); } && {
11512 test -z "$ac_c_werror_flag" ||
11513 test ! -s conftest.err
11514 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011515 ac_lo=$ac_mid; break
11516else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011517 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011518sed 's/^/| /' conftest.$ac_ext >&5
11519
Martin v. Löwiseba40652007-08-30 20:10:57 +000011520 ac_hi=`expr '(' $ac_mid ')' - 1`
11521 if test $ac_mid -le $ac_hi; then
11522 ac_lo= ac_hi=
11523 break
11524 fi
11525 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011526fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011527
11528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011529 done
11530else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011531 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011532sed 's/^/| /' conftest.$ac_ext >&5
11533
Martin v. Löwiseba40652007-08-30 20:10:57 +000011534 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011535fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011536
11537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011539
11540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011541# Binary search between lo and hi bounds.
11542while test "x$ac_lo" != "x$ac_hi"; do
11543 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11544 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011545/* confdefs.h. */
11546_ACEOF
11547cat confdefs.h >>conftest.$ac_ext
11548cat >>conftest.$ac_ext <<_ACEOF
11549/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011550$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011551 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011552int
11553main ()
11554{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011555static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011556test_array [0] = 0
11557
11558 ;
11559 return 0;
11560}
11561_ACEOF
11562rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011563if { (ac_try="$ac_compile"
11564case "(($ac_try" in
11565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11566 *) ac_try_echo=$ac_try;;
11567esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011569 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011570 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011571 grep -v '^ *+' conftest.er1 >conftest.err
11572 rm -f conftest.er1
11573 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011575 (exit $ac_status); } && {
11576 test -z "$ac_c_werror_flag" ||
11577 test ! -s conftest.err
11578 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011579 ac_hi=$ac_mid
11580else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011581 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011582sed 's/^/| /' conftest.$ac_ext >&5
11583
Martin v. Löwiseba40652007-08-30 20:10:57 +000011584 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011585fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011586
11587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011588done
11589case $ac_lo in
11590?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011591'') if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011592 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011593See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011594echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011595See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011596 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011597 else
11598 ac_cv_sizeof_long_long=0
11599 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011600esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011601else
Martin v. Löwis11437992002-04-12 09:54:03 +000011602 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011603/* confdefs.h. */
11604_ACEOF
11605cat confdefs.h >>conftest.$ac_ext
11606cat >>conftest.$ac_ext <<_ACEOF
11607/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011608$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011609 typedef long long ac__type_sizeof_;
11610static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11611static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011612#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011613#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011614int
11615main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011616{
Martin v. Löwis11437992002-04-12 09:54:03 +000011617
11618 FILE *f = fopen ("conftest.val", "w");
11619 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011620 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011621 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011622 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011623 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011624 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011625 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011626 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011627 }
11628 else
11629 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011630 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011631 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011632 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011633 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011634 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011635 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011636
11637 ;
11638 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011639}
Martin v. Löwis11437992002-04-12 09:54:03 +000011640_ACEOF
11641rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011642if { (ac_try="$ac_link"
11643case "(($ac_try" in
11644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11645 *) ac_try_echo=$ac_try;;
11646esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011648 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011649 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011651 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011652 { (case "(($ac_try" in
11653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11654 *) ac_try_echo=$ac_try;;
11655esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011657 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011658 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011660 (exit $ac_status); }; }; then
11661 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011662else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011663 echo "$as_me: program exited with status $ac_status" >&5
11664echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011665sed 's/^/| /' conftest.$ac_ext >&5
11666
Martin v. Löwis11437992002-04-12 09:54:03 +000011667( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011668if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011669 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011670See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011671echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011672See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011673 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011674 else
11675 ac_cv_sizeof_long_long=0
11676 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011677fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011678rm -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 +000011679fi
11680rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011681fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011682{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11683echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011684
11685
11686
Martin v. Löwis11437992002-04-12 09:54:03 +000011687cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011688#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011689_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011690
Michael W. Hudson54241132001-12-07 15:38:26 +000011691
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011692fi
11693
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011694{ echo "$as_me:$LINENO: checking for long double support" >&5
11695echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011696have_long_double=no
11697cat >conftest.$ac_ext <<_ACEOF
11698/* confdefs.h. */
11699_ACEOF
11700cat confdefs.h >>conftest.$ac_ext
11701cat >>conftest.$ac_ext <<_ACEOF
11702/* end confdefs.h. */
11703
11704int
11705main ()
11706{
11707long double x; x = (long double)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
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011719 (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
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011725 (exit $ac_status); } && {
11726 test -z "$ac_c_werror_flag" ||
11727 test ! -s conftest.err
11728 } && test -s conftest.$ac_objext; then
11729
11730
11731cat >>confdefs.h <<\_ACEOF
11732#define HAVE_LONG_DOUBLE 1
11733_ACEOF
11734
11735 have_long_double=yes
11736
11737else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011738 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011739sed 's/^/| /' conftest.$ac_ext >&5
11740
11741
11742fi
11743
11744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011745{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11746echo "${ECHO_T}$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011747if test "$have_long_double" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011748{ echo "$as_me:$LINENO: checking for long double" >&5
11749echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11750if test "${ac_cv_type_long_double+set}" = set; then
11751 echo $ECHO_N "(cached) $ECHO_C" >&6
11752else
11753 cat >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
11760typedef long double ac__type_new_;
11761int
11762main ()
11763{
11764if ((ac__type_new_ *) 0)
11765 return 0;
11766if (sizeof (ac__type_new_))
11767 return 0;
11768 ;
11769 return 0;
11770}
11771_ACEOF
11772rm -f conftest.$ac_objext
11773if { (ac_try="$ac_compile"
11774case "(($ac_try" in
11775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11776 *) ac_try_echo=$ac_try;;
11777esac
11778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11779 (eval "$ac_compile") 2>conftest.er1
11780 ac_status=$?
11781 grep -v '^ *+' conftest.er1 >conftest.err
11782 rm -f conftest.er1
11783 cat conftest.err >&5
11784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11785 (exit $ac_status); } && {
11786 test -z "$ac_c_werror_flag" ||
11787 test ! -s conftest.err
11788 } && test -s conftest.$ac_objext; then
11789 ac_cv_type_long_double=yes
11790else
11791 echo "$as_me: failed program was:" >&5
11792sed 's/^/| /' conftest.$ac_ext >&5
11793
11794 ac_cv_type_long_double=no
11795fi
11796
11797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11798fi
11799{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11800echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11801
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011802# The cast to long int works around a bug in the HP C Compiler
11803# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11804# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11805# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011806{ echo "$as_me:$LINENO: checking size of long double" >&5
11807echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011808if test "${ac_cv_sizeof_long_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011809 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011810else
11811 if test "$cross_compiling" = yes; then
11812 # Depending upon the size, compute the lo and hi bounds.
11813cat >conftest.$ac_ext <<_ACEOF
11814/* confdefs.h. */
11815_ACEOF
11816cat confdefs.h >>conftest.$ac_ext
11817cat >>conftest.$ac_ext <<_ACEOF
11818/* end confdefs.h. */
11819$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011820 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011821int
11822main ()
11823{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011824static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011825test_array [0] = 0
11826
11827 ;
11828 return 0;
11829}
11830_ACEOF
11831rm -f conftest.$ac_objext
11832if { (ac_try="$ac_compile"
11833case "(($ac_try" in
11834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11835 *) ac_try_echo=$ac_try;;
11836esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011838 (eval "$ac_compile") 2>conftest.er1
11839 ac_status=$?
11840 grep -v '^ *+' conftest.er1 >conftest.err
11841 rm -f conftest.er1
11842 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011844 (exit $ac_status); } && {
11845 test -z "$ac_c_werror_flag" ||
11846 test ! -s conftest.err
11847 } && test -s conftest.$ac_objext; then
11848 ac_lo=0 ac_mid=0
11849 while :; do
11850 cat >conftest.$ac_ext <<_ACEOF
11851/* confdefs.h. */
11852_ACEOF
11853cat confdefs.h >>conftest.$ac_ext
11854cat >>conftest.$ac_ext <<_ACEOF
11855/* end confdefs.h. */
11856$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011857 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011858int
11859main ()
11860{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011861static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011862test_array [0] = 0
11863
11864 ;
11865 return 0;
11866}
11867_ACEOF
11868rm -f conftest.$ac_objext
11869if { (ac_try="$ac_compile"
11870case "(($ac_try" in
11871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11872 *) ac_try_echo=$ac_try;;
11873esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011875 (eval "$ac_compile") 2>conftest.er1
11876 ac_status=$?
11877 grep -v '^ *+' conftest.er1 >conftest.err
11878 rm -f conftest.er1
11879 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011881 (exit $ac_status); } && {
11882 test -z "$ac_c_werror_flag" ||
11883 test ! -s conftest.err
11884 } && test -s conftest.$ac_objext; then
11885 ac_hi=$ac_mid; break
11886else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011887 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011888sed 's/^/| /' conftest.$ac_ext >&5
11889
11890 ac_lo=`expr $ac_mid + 1`
11891 if test $ac_lo -le $ac_mid; then
11892 ac_lo= ac_hi=
11893 break
11894 fi
11895 ac_mid=`expr 2 '*' $ac_mid + 1`
11896fi
11897
11898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11899 done
11900else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011901 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011902sed 's/^/| /' conftest.$ac_ext >&5
11903
11904 cat >conftest.$ac_ext <<_ACEOF
11905/* confdefs.h. */
11906_ACEOF
11907cat confdefs.h >>conftest.$ac_ext
11908cat >>conftest.$ac_ext <<_ACEOF
11909/* end confdefs.h. */
11910$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011911 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011912int
11913main ()
11914{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011915static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011916test_array [0] = 0
11917
11918 ;
11919 return 0;
11920}
11921_ACEOF
11922rm -f conftest.$ac_objext
11923if { (ac_try="$ac_compile"
11924case "(($ac_try" in
11925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11926 *) ac_try_echo=$ac_try;;
11927esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011928eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011929 (eval "$ac_compile") 2>conftest.er1
11930 ac_status=$?
11931 grep -v '^ *+' conftest.er1 >conftest.err
11932 rm -f conftest.er1
11933 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011935 (exit $ac_status); } && {
11936 test -z "$ac_c_werror_flag" ||
11937 test ! -s conftest.err
11938 } && test -s conftest.$ac_objext; then
11939 ac_hi=-1 ac_mid=-1
11940 while :; do
11941 cat >conftest.$ac_ext <<_ACEOF
11942/* confdefs.h. */
11943_ACEOF
11944cat confdefs.h >>conftest.$ac_ext
11945cat >>conftest.$ac_ext <<_ACEOF
11946/* end confdefs.h. */
11947$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011948 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011949int
11950main ()
11951{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011952static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011953test_array [0] = 0
11954
11955 ;
11956 return 0;
11957}
11958_ACEOF
11959rm -f conftest.$ac_objext
11960if { (ac_try="$ac_compile"
11961case "(($ac_try" in
11962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11963 *) ac_try_echo=$ac_try;;
11964esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011966 (eval "$ac_compile") 2>conftest.er1
11967 ac_status=$?
11968 grep -v '^ *+' conftest.er1 >conftest.err
11969 rm -f conftest.er1
11970 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011972 (exit $ac_status); } && {
11973 test -z "$ac_c_werror_flag" ||
11974 test ! -s conftest.err
11975 } && test -s conftest.$ac_objext; then
11976 ac_lo=$ac_mid; break
11977else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011978 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011979sed 's/^/| /' conftest.$ac_ext >&5
11980
11981 ac_hi=`expr '(' $ac_mid ')' - 1`
11982 if test $ac_mid -le $ac_hi; then
11983 ac_lo= ac_hi=
11984 break
11985 fi
11986 ac_mid=`expr 2 '*' $ac_mid`
11987fi
11988
11989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11990 done
11991else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011992 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011993sed 's/^/| /' conftest.$ac_ext >&5
11994
11995 ac_lo= ac_hi=
11996fi
11997
11998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11999fi
12000
12001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12002# Binary search between lo and hi bounds.
12003while test "x$ac_lo" != "x$ac_hi"; do
12004 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12005 cat >conftest.$ac_ext <<_ACEOF
12006/* confdefs.h. */
12007_ACEOF
12008cat confdefs.h >>conftest.$ac_ext
12009cat >>conftest.$ac_ext <<_ACEOF
12010/* end confdefs.h. */
12011$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012012 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012013int
12014main ()
12015{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012016static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012017test_array [0] = 0
12018
12019 ;
12020 return 0;
12021}
12022_ACEOF
12023rm -f conftest.$ac_objext
12024if { (ac_try="$ac_compile"
12025case "(($ac_try" in
12026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12027 *) ac_try_echo=$ac_try;;
12028esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012030 (eval "$ac_compile") 2>conftest.er1
12031 ac_status=$?
12032 grep -v '^ *+' conftest.er1 >conftest.err
12033 rm -f conftest.er1
12034 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012036 (exit $ac_status); } && {
12037 test -z "$ac_c_werror_flag" ||
12038 test ! -s conftest.err
12039 } && test -s conftest.$ac_objext; then
12040 ac_hi=$ac_mid
12041else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012042 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012043sed 's/^/| /' conftest.$ac_ext >&5
12044
12045 ac_lo=`expr '(' $ac_mid ')' + 1`
12046fi
12047
12048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12049done
12050case $ac_lo in
12051?*) ac_cv_sizeof_long_double=$ac_lo;;
12052'') if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012053 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012054See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012055echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012056See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012057 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012058 else
12059 ac_cv_sizeof_long_double=0
12060 fi ;;
12061esac
12062else
12063 cat >conftest.$ac_ext <<_ACEOF
12064/* confdefs.h. */
12065_ACEOF
12066cat confdefs.h >>conftest.$ac_ext
12067cat >>conftest.$ac_ext <<_ACEOF
12068/* end confdefs.h. */
12069$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012070 typedef long double ac__type_sizeof_;
12071static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12072static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012073#include <stdio.h>
12074#include <stdlib.h>
12075int
12076main ()
12077{
12078
12079 FILE *f = fopen ("conftest.val", "w");
12080 if (! f)
12081 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012082 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012083 {
12084 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012085 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012086 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012087 fprintf (f, "%ld\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012088 }
12089 else
12090 {
12091 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012092 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012093 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012094 fprintf (f, "%lu\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012095 }
12096 return ferror (f) || fclose (f) != 0;
12097
12098 ;
12099 return 0;
12100}
12101_ACEOF
12102rm -f conftest$ac_exeext
12103if { (ac_try="$ac_link"
12104case "(($ac_try" in
12105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12106 *) ac_try_echo=$ac_try;;
12107esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012109 (eval "$ac_link") 2>&5
12110 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012112 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12113 { (case "(($ac_try" in
12114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12115 *) ac_try_echo=$ac_try;;
12116esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012118 (eval "$ac_try") 2>&5
12119 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012121 (exit $ac_status); }; }; then
12122 ac_cv_sizeof_long_double=`cat conftest.val`
12123else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012124 echo "$as_me: program exited with status $ac_status" >&5
12125echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012126sed 's/^/| /' conftest.$ac_ext >&5
12127
12128( exit $ac_status )
12129if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012130 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012131See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012132echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012133See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012134 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012135 else
12136 ac_cv_sizeof_long_double=0
12137 fi
12138fi
12139rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12140fi
12141rm -f conftest.val
12142fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012143{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12144echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012145
12146
12147
12148cat >>confdefs.h <<_ACEOF
12149#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12150_ACEOF
12151
12152
12153fi
12154
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012155{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12156echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012157have_c99_bool=no
12158cat >conftest.$ac_ext <<_ACEOF
12159/* confdefs.h. */
12160_ACEOF
12161cat confdefs.h >>conftest.$ac_ext
12162cat >>conftest.$ac_ext <<_ACEOF
12163/* end confdefs.h. */
12164
12165int
12166main ()
12167{
12168_Bool x; x = (_Bool)0;
12169 ;
12170 return 0;
12171}
12172_ACEOF
12173rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012174if { (ac_try="$ac_compile"
12175case "(($ac_try" in
12176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12177 *) ac_try_echo=$ac_try;;
12178esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012180 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012181 ac_status=$?
12182 grep -v '^ *+' conftest.er1 >conftest.err
12183 rm -f conftest.er1
12184 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012186 (exit $ac_status); } && {
12187 test -z "$ac_c_werror_flag" ||
12188 test ! -s conftest.err
12189 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012190
12191
12192cat >>confdefs.h <<\_ACEOF
12193#define HAVE_C99_BOOL 1
12194_ACEOF
12195
12196 have_c99_bool=yes
12197
12198else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012199 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012200sed 's/^/| /' conftest.$ac_ext >&5
12201
Martin v. Löwiseba40652007-08-30 20:10:57 +000012202
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012203fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012204
12205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012206{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12207echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012208if test "$have_c99_bool" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012209{ echo "$as_me:$LINENO: checking for _Bool" >&5
12210echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12211if test "${ac_cv_type__Bool+set}" = set; then
12212 echo $ECHO_N "(cached) $ECHO_C" >&6
12213else
12214 cat >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
12221typedef _Bool ac__type_new_;
12222int
12223main ()
12224{
12225if ((ac__type_new_ *) 0)
12226 return 0;
12227if (sizeof (ac__type_new_))
12228 return 0;
12229 ;
12230 return 0;
12231}
12232_ACEOF
12233rm -f conftest.$ac_objext
12234if { (ac_try="$ac_compile"
12235case "(($ac_try" in
12236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12237 *) ac_try_echo=$ac_try;;
12238esac
12239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12240 (eval "$ac_compile") 2>conftest.er1
12241 ac_status=$?
12242 grep -v '^ *+' conftest.er1 >conftest.err
12243 rm -f conftest.er1
12244 cat conftest.err >&5
12245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12246 (exit $ac_status); } && {
12247 test -z "$ac_c_werror_flag" ||
12248 test ! -s conftest.err
12249 } && test -s conftest.$ac_objext; then
12250 ac_cv_type__Bool=yes
12251else
12252 echo "$as_me: failed program was:" >&5
12253sed 's/^/| /' conftest.$ac_ext >&5
12254
12255 ac_cv_type__Bool=no
12256fi
12257
12258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12259fi
12260{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12261echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12262
Martin v. Löwiseba40652007-08-30 20:10:57 +000012263# The cast to long int works around a bug in the HP C Compiler
12264# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12265# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12266# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012267{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12268echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012269if test "${ac_cv_sizeof__Bool+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012270 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012271else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012272 if test "$cross_compiling" = yes; then
12273 # Depending upon the size, compute the lo and hi bounds.
12274cat >conftest.$ac_ext <<_ACEOF
12275/* confdefs.h. */
12276_ACEOF
12277cat confdefs.h >>conftest.$ac_ext
12278cat >>conftest.$ac_ext <<_ACEOF
12279/* end confdefs.h. */
12280$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012281 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012282int
12283main ()
12284{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012285static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012286test_array [0] = 0
12287
12288 ;
12289 return 0;
12290}
12291_ACEOF
12292rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012293if { (ac_try="$ac_compile"
12294case "(($ac_try" in
12295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12296 *) ac_try_echo=$ac_try;;
12297esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012299 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012300 ac_status=$?
12301 grep -v '^ *+' conftest.er1 >conftest.err
12302 rm -f conftest.er1
12303 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012305 (exit $ac_status); } && {
12306 test -z "$ac_c_werror_flag" ||
12307 test ! -s conftest.err
12308 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012309 ac_lo=0 ac_mid=0
12310 while :; do
12311 cat >conftest.$ac_ext <<_ACEOF
12312/* confdefs.h. */
12313_ACEOF
12314cat confdefs.h >>conftest.$ac_ext
12315cat >>conftest.$ac_ext <<_ACEOF
12316/* end confdefs.h. */
12317$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012318 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012319int
12320main ()
12321{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012322static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012323test_array [0] = 0
12324
12325 ;
12326 return 0;
12327}
12328_ACEOF
12329rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012330if { (ac_try="$ac_compile"
12331case "(($ac_try" in
12332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12333 *) ac_try_echo=$ac_try;;
12334esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012336 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012337 ac_status=$?
12338 grep -v '^ *+' conftest.er1 >conftest.err
12339 rm -f conftest.er1
12340 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012342 (exit $ac_status); } && {
12343 test -z "$ac_c_werror_flag" ||
12344 test ! -s conftest.err
12345 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012346 ac_hi=$ac_mid; break
12347else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012348 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012349sed 's/^/| /' conftest.$ac_ext >&5
12350
Martin v. Löwiseba40652007-08-30 20:10:57 +000012351 ac_lo=`expr $ac_mid + 1`
12352 if test $ac_lo -le $ac_mid; then
12353 ac_lo= ac_hi=
12354 break
12355 fi
12356 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012357fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012358
12359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012360 done
12361else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012362 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012363sed 's/^/| /' conftest.$ac_ext >&5
12364
Martin v. Löwiseba40652007-08-30 20:10:57 +000012365 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012366/* confdefs.h. */
12367_ACEOF
12368cat confdefs.h >>conftest.$ac_ext
12369cat >>conftest.$ac_ext <<_ACEOF
12370/* end confdefs.h. */
12371$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012372 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012373int
12374main ()
12375{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012376static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012377test_array [0] = 0
12378
12379 ;
12380 return 0;
12381}
12382_ACEOF
12383rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012384if { (ac_try="$ac_compile"
12385case "(($ac_try" in
12386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12387 *) ac_try_echo=$ac_try;;
12388esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012390 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012391 ac_status=$?
12392 grep -v '^ *+' conftest.er1 >conftest.err
12393 rm -f conftest.er1
12394 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012396 (exit $ac_status); } && {
12397 test -z "$ac_c_werror_flag" ||
12398 test ! -s conftest.err
12399 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012400 ac_hi=-1 ac_mid=-1
12401 while :; do
12402 cat >conftest.$ac_ext <<_ACEOF
12403/* confdefs.h. */
12404_ACEOF
12405cat confdefs.h >>conftest.$ac_ext
12406cat >>conftest.$ac_ext <<_ACEOF
12407/* end confdefs.h. */
12408$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012409 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012410int
12411main ()
12412{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012413static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012414test_array [0] = 0
12415
12416 ;
12417 return 0;
12418}
12419_ACEOF
12420rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012421if { (ac_try="$ac_compile"
12422case "(($ac_try" in
12423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12424 *) ac_try_echo=$ac_try;;
12425esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012427 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012428 ac_status=$?
12429 grep -v '^ *+' conftest.er1 >conftest.err
12430 rm -f conftest.er1
12431 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012433 (exit $ac_status); } && {
12434 test -z "$ac_c_werror_flag" ||
12435 test ! -s conftest.err
12436 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012437 ac_lo=$ac_mid; break
12438else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012439 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012440sed 's/^/| /' conftest.$ac_ext >&5
12441
Martin v. Löwiseba40652007-08-30 20:10:57 +000012442 ac_hi=`expr '(' $ac_mid ')' - 1`
12443 if test $ac_mid -le $ac_hi; then
12444 ac_lo= ac_hi=
12445 break
12446 fi
12447 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012448fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012449
12450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012451 done
12452else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012453 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012454sed 's/^/| /' conftest.$ac_ext >&5
12455
Martin v. Löwiseba40652007-08-30 20:10:57 +000012456 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012457fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012458
12459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012461
12462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012463# Binary search between lo and hi bounds.
12464while test "x$ac_lo" != "x$ac_hi"; do
12465 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12466 cat >conftest.$ac_ext <<_ACEOF
12467/* confdefs.h. */
12468_ACEOF
12469cat confdefs.h >>conftest.$ac_ext
12470cat >>conftest.$ac_ext <<_ACEOF
12471/* end confdefs.h. */
12472$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012473 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012474int
12475main ()
12476{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012477static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012478test_array [0] = 0
12479
12480 ;
12481 return 0;
12482}
12483_ACEOF
12484rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012485if { (ac_try="$ac_compile"
12486case "(($ac_try" in
12487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12488 *) ac_try_echo=$ac_try;;
12489esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012491 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012492 ac_status=$?
12493 grep -v '^ *+' conftest.er1 >conftest.err
12494 rm -f conftest.er1
12495 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012497 (exit $ac_status); } && {
12498 test -z "$ac_c_werror_flag" ||
12499 test ! -s conftest.err
12500 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012501 ac_hi=$ac_mid
12502else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012503 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012504sed 's/^/| /' conftest.$ac_ext >&5
12505
Martin v. Löwiseba40652007-08-30 20:10:57 +000012506 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012507fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012508
12509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012510done
12511case $ac_lo in
12512?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012513'') if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012514 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012515See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012516echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012517See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012518 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012519 else
12520 ac_cv_sizeof__Bool=0
12521 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012522esac
12523else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012524 cat >conftest.$ac_ext <<_ACEOF
12525/* confdefs.h. */
12526_ACEOF
12527cat confdefs.h >>conftest.$ac_ext
12528cat >>conftest.$ac_ext <<_ACEOF
12529/* end confdefs.h. */
12530$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012531 typedef _Bool ac__type_sizeof_;
12532static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12533static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012534#include <stdio.h>
12535#include <stdlib.h>
12536int
12537main ()
12538{
12539
12540 FILE *f = fopen ("conftest.val", "w");
12541 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012542 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012543 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012544 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012545 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012546 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012547 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012548 fprintf (f, "%ld\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012549 }
12550 else
12551 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012552 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012553 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012554 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012555 fprintf (f, "%lu\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012556 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012557 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012558
12559 ;
12560 return 0;
12561}
12562_ACEOF
12563rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012564if { (ac_try="$ac_link"
12565case "(($ac_try" in
12566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12567 *) ac_try_echo=$ac_try;;
12568esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012570 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012571 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012573 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012574 { (case "(($ac_try" in
12575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12576 *) ac_try_echo=$ac_try;;
12577esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012579 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012580 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012582 (exit $ac_status); }; }; then
12583 ac_cv_sizeof__Bool=`cat conftest.val`
12584else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012585 echo "$as_me: program exited with status $ac_status" >&5
12586echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012587sed 's/^/| /' conftest.$ac_ext >&5
12588
12589( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012590if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012591 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012592See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012593echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012594See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012595 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012596 else
12597 ac_cv_sizeof__Bool=0
12598 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012599fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012600rm -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 +000012601fi
12602rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012603fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012604{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12605echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012606
12607
12608
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012609cat >>confdefs.h <<_ACEOF
12610#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12611_ACEOF
12612
12613
12614fi
12615
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012616{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12617echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012618if test "${ac_cv_type_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012619 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebe26702006-10-02 14:55:51 +000012620else
12621 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012622/* confdefs.h. */
12623_ACEOF
12624cat confdefs.h >>conftest.$ac_ext
12625cat >>conftest.$ac_ext <<_ACEOF
12626/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012627#ifdef HAVE_STDINT_H
12628 #include <stdint.h>
12629 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012630
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012631typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012632int
12633main ()
12634{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012635if ((ac__type_new_ *) 0)
12636 return 0;
12637if (sizeof (ac__type_new_))
12638 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012639 ;
12640 return 0;
12641}
12642_ACEOF
12643rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012644if { (ac_try="$ac_compile"
12645case "(($ac_try" in
12646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12647 *) ac_try_echo=$ac_try;;
12648esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012650 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012651 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012652 grep -v '^ *+' conftest.er1 >conftest.err
12653 rm -f conftest.er1
12654 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012656 (exit $ac_status); } && {
12657 test -z "$ac_c_werror_flag" ||
12658 test ! -s conftest.err
12659 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012660 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012661else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012662 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012663sed 's/^/| /' conftest.$ac_ext >&5
12664
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012665 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012666fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012667
12668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012669fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012670{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12671echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12672if test $ac_cv_type_uintptr_t = yes; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012673
12674cat >>confdefs.h <<_ACEOF
12675#define HAVE_UINTPTR_T 1
12676_ACEOF
12677
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012678{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12679echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12680if test "${ac_cv_type_uintptr_t+set}" = set; then
12681 echo $ECHO_N "(cached) $ECHO_C" >&6
12682else
12683 cat >conftest.$ac_ext <<_ACEOF
12684/* confdefs.h. */
12685_ACEOF
12686cat confdefs.h >>conftest.$ac_ext
12687cat >>conftest.$ac_ext <<_ACEOF
12688/* end confdefs.h. */
12689$ac_includes_default
12690typedef uintptr_t ac__type_new_;
12691int
12692main ()
12693{
12694if ((ac__type_new_ *) 0)
12695 return 0;
12696if (sizeof (ac__type_new_))
12697 return 0;
12698 ;
12699 return 0;
12700}
12701_ACEOF
12702rm -f conftest.$ac_objext
12703if { (ac_try="$ac_compile"
12704case "(($ac_try" in
12705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12706 *) ac_try_echo=$ac_try;;
12707esac
12708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12709 (eval "$ac_compile") 2>conftest.er1
12710 ac_status=$?
12711 grep -v '^ *+' conftest.er1 >conftest.err
12712 rm -f conftest.er1
12713 cat conftest.err >&5
12714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12715 (exit $ac_status); } && {
12716 test -z "$ac_c_werror_flag" ||
12717 test ! -s conftest.err
12718 } && test -s conftest.$ac_objext; then
12719 ac_cv_type_uintptr_t=yes
12720else
12721 echo "$as_me: failed program was:" >&5
12722sed 's/^/| /' conftest.$ac_ext >&5
12723
12724 ac_cv_type_uintptr_t=no
12725fi
12726
12727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12728fi
12729{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12730echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12731
Martin v. Löwiseba40652007-08-30 20:10:57 +000012732# The cast to long int works around a bug in the HP C Compiler
12733# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12734# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12735# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012736{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12737echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012738if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012739 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012740else
Martin v. Löwis11437992002-04-12 09:54:03 +000012741 if test "$cross_compiling" = yes; then
12742 # Depending upon the size, compute the lo and hi bounds.
12743cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012744/* confdefs.h. */
12745_ACEOF
12746cat confdefs.h >>conftest.$ac_ext
12747cat >>conftest.$ac_ext <<_ACEOF
12748/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012749$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012750 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012751int
12752main ()
12753{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012754static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012755test_array [0] = 0
12756
12757 ;
12758 return 0;
12759}
12760_ACEOF
12761rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012762if { (ac_try="$ac_compile"
12763case "(($ac_try" in
12764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12765 *) ac_try_echo=$ac_try;;
12766esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012768 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012769 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012770 grep -v '^ *+' conftest.er1 >conftest.err
12771 rm -f conftest.er1
12772 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012774 (exit $ac_status); } && {
12775 test -z "$ac_c_werror_flag" ||
12776 test ! -s conftest.err
12777 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012778 ac_lo=0 ac_mid=0
12779 while :; do
12780 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012781/* confdefs.h. */
12782_ACEOF
12783cat confdefs.h >>conftest.$ac_ext
12784cat >>conftest.$ac_ext <<_ACEOF
12785/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012786$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012787 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012788int
12789main ()
12790{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012791static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012792test_array [0] = 0
12793
12794 ;
12795 return 0;
12796}
12797_ACEOF
12798rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012799if { (ac_try="$ac_compile"
12800case "(($ac_try" in
12801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12802 *) ac_try_echo=$ac_try;;
12803esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012805 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012806 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012807 grep -v '^ *+' conftest.er1 >conftest.err
12808 rm -f conftest.er1
12809 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012811 (exit $ac_status); } && {
12812 test -z "$ac_c_werror_flag" ||
12813 test ! -s conftest.err
12814 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012815 ac_hi=$ac_mid; break
12816else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012817 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012818sed 's/^/| /' conftest.$ac_ext >&5
12819
Martin v. Löwiseba40652007-08-30 20:10:57 +000012820 ac_lo=`expr $ac_mid + 1`
12821 if test $ac_lo -le $ac_mid; then
12822 ac_lo= ac_hi=
12823 break
12824 fi
12825 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012826fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012827
12828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012829 done
12830else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012831 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012832sed 's/^/| /' conftest.$ac_ext >&5
12833
Martin v. Löwiseba40652007-08-30 20:10:57 +000012834 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012835/* confdefs.h. */
12836_ACEOF
12837cat confdefs.h >>conftest.$ac_ext
12838cat >>conftest.$ac_ext <<_ACEOF
12839/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012840$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012841 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012842int
12843main ()
12844{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012845static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012846test_array [0] = 0
12847
12848 ;
12849 return 0;
12850}
12851_ACEOF
12852rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012853if { (ac_try="$ac_compile"
12854case "(($ac_try" in
12855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12856 *) ac_try_echo=$ac_try;;
12857esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012858eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012859 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012860 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012861 grep -v '^ *+' conftest.er1 >conftest.err
12862 rm -f conftest.er1
12863 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012865 (exit $ac_status); } && {
12866 test -z "$ac_c_werror_flag" ||
12867 test ! -s conftest.err
12868 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012869 ac_hi=-1 ac_mid=-1
12870 while :; do
12871 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012872/* confdefs.h. */
12873_ACEOF
12874cat confdefs.h >>conftest.$ac_ext
12875cat >>conftest.$ac_ext <<_ACEOF
12876/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012877$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012878 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012879int
12880main ()
12881{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012882static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012883test_array [0] = 0
12884
12885 ;
12886 return 0;
12887}
12888_ACEOF
12889rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012890if { (ac_try="$ac_compile"
12891case "(($ac_try" in
12892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12893 *) ac_try_echo=$ac_try;;
12894esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012896 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012897 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012898 grep -v '^ *+' conftest.er1 >conftest.err
12899 rm -f conftest.er1
12900 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012902 (exit $ac_status); } && {
12903 test -z "$ac_c_werror_flag" ||
12904 test ! -s conftest.err
12905 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012906 ac_lo=$ac_mid; break
12907else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012908 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012909sed 's/^/| /' conftest.$ac_ext >&5
12910
Martin v. Löwiseba40652007-08-30 20:10:57 +000012911 ac_hi=`expr '(' $ac_mid ')' - 1`
12912 if test $ac_mid -le $ac_hi; then
12913 ac_lo= ac_hi=
12914 break
12915 fi
12916 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012917fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012918
12919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012920 done
12921else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012922 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012923sed 's/^/| /' conftest.$ac_ext >&5
12924
Martin v. Löwiseba40652007-08-30 20:10:57 +000012925 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012926fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012927
12928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012929fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012930
12931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012932# Binary search between lo and hi bounds.
12933while test "x$ac_lo" != "x$ac_hi"; do
12934 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12935 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012936/* confdefs.h. */
12937_ACEOF
12938cat confdefs.h >>conftest.$ac_ext
12939cat >>conftest.$ac_ext <<_ACEOF
12940/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012941$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012942 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012943int
12944main ()
12945{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012946static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012947test_array [0] = 0
12948
12949 ;
12950 return 0;
12951}
12952_ACEOF
12953rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012954if { (ac_try="$ac_compile"
12955case "(($ac_try" in
12956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12957 *) ac_try_echo=$ac_try;;
12958esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012960 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012961 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012962 grep -v '^ *+' conftest.er1 >conftest.err
12963 rm -f conftest.er1
12964 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012966 (exit $ac_status); } && {
12967 test -z "$ac_c_werror_flag" ||
12968 test ! -s conftest.err
12969 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012970 ac_hi=$ac_mid
12971else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012972 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012973sed 's/^/| /' conftest.$ac_ext >&5
12974
Martin v. Löwiseba40652007-08-30 20:10:57 +000012975 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012976fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012977
12978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012979done
12980case $ac_lo in
12981?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012982'') if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012983 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012984See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012985echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012986See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012987 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012988 else
12989 ac_cv_sizeof_uintptr_t=0
12990 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012991esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012992else
Martin v. Löwis11437992002-04-12 09:54:03 +000012993 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012994/* confdefs.h. */
12995_ACEOF
12996cat confdefs.h >>conftest.$ac_ext
12997cat >>conftest.$ac_ext <<_ACEOF
12998/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012999$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013000 typedef uintptr_t ac__type_sizeof_;
13001static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13002static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000013003#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013004#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013005int
13006main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013007{
Martin v. Löwis11437992002-04-12 09:54:03 +000013008
13009 FILE *f = fopen ("conftest.val", "w");
13010 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013011 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013012 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000013013 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000013014 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013015 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000013016 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013017 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000013018 }
13019 else
13020 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000013021 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013022 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000013023 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013024 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000013025 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013026 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013027
13028 ;
13029 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013030}
Martin v. Löwis11437992002-04-12 09:54:03 +000013031_ACEOF
13032rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013033if { (ac_try="$ac_link"
13034case "(($ac_try" in
13035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13036 *) ac_try_echo=$ac_try;;
13037esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013039 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013040 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013042 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013043 { (case "(($ac_try" in
13044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13045 *) ac_try_echo=$ac_try;;
13046esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013048 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013049 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013051 (exit $ac_status); }; }; then
13052 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013053else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013054 echo "$as_me: program exited with status $ac_status" >&5
13055echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013056sed 's/^/| /' conftest.$ac_ext >&5
13057
Martin v. Löwis11437992002-04-12 09:54:03 +000013058( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000013059if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013060 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013061See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013062echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013063See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013064 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013065 else
13066 ac_cv_sizeof_uintptr_t=0
13067 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013068fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013069rm -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 +000013070fi
13071rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013072fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013073{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13074echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013075
13076
13077
Martin v. Löwis11437992002-04-12 09:54:03 +000013078cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013079#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013080_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013081
Michael W. Hudson54241132001-12-07 15:38:26 +000013082
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013083fi
13084
Martin v. Löwisebe26702006-10-02 14:55:51 +000013085
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013086{ echo "$as_me:$LINENO: checking for off_t" >&5
13087echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
13088if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013089 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013090else
Martin v. Löwis11437992002-04-12 09:54:03 +000013091 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013092/* confdefs.h. */
13093_ACEOF
13094cat confdefs.h >>conftest.$ac_ext
13095cat >>conftest.$ac_ext <<_ACEOF
13096/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013097
13098#ifdef HAVE_SYS_TYPES_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013099#include <sys/types.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013100#endif
13101
13102
13103typedef off_t ac__type_new_;
13104int
13105main ()
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013106{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013107if ((ac__type_new_ *) 0)
13108 return 0;
13109if (sizeof (ac__type_new_))
13110 return 0;
13111 ;
13112 return 0;
13113}
13114_ACEOF
13115rm -f conftest.$ac_objext
13116if { (ac_try="$ac_compile"
13117case "(($ac_try" in
13118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13119 *) ac_try_echo=$ac_try;;
13120esac
13121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13122 (eval "$ac_compile") 2>conftest.er1
13123 ac_status=$?
13124 grep -v '^ *+' conftest.er1 >conftest.err
13125 rm -f conftest.er1
13126 cat conftest.err >&5
13127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13128 (exit $ac_status); } && {
13129 test -z "$ac_c_werror_flag" ||
13130 test ! -s conftest.err
13131 } && test -s conftest.$ac_objext; then
13132 ac_cv_type_off_t=yes
13133else
13134 echo "$as_me: failed program was:" >&5
13135sed 's/^/| /' conftest.$ac_ext >&5
13136
13137 ac_cv_type_off_t=no
13138fi
13139
13140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13141fi
13142{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13143echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13144
13145# The cast to long int works around a bug in the HP C Compiler
13146# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13147# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13148# This bug is HP SR number 8606223364.
13149{ echo "$as_me:$LINENO: checking size of off_t" >&5
13150echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
13151if test "${ac_cv_sizeof_off_t+set}" = set; then
13152 echo $ECHO_N "(cached) $ECHO_C" >&6
13153else
13154 if test "$cross_compiling" = yes; then
13155 # Depending upon the size, compute the lo and hi bounds.
13156cat >conftest.$ac_ext <<_ACEOF
13157/* confdefs.h. */
13158_ACEOF
13159cat confdefs.h >>conftest.$ac_ext
13160cat >>conftest.$ac_ext <<_ACEOF
13161/* end confdefs.h. */
13162
13163#ifdef HAVE_SYS_TYPES_H
13164#include <sys/types.h>
13165#endif
13166
13167
13168 typedef off_t ac__type_sizeof_;
13169int
13170main ()
13171{
13172static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13173test_array [0] = 0
13174
13175 ;
13176 return 0;
13177}
13178_ACEOF
13179rm -f conftest.$ac_objext
13180if { (ac_try="$ac_compile"
13181case "(($ac_try" in
13182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13183 *) ac_try_echo=$ac_try;;
13184esac
13185eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13186 (eval "$ac_compile") 2>conftest.er1
13187 ac_status=$?
13188 grep -v '^ *+' conftest.er1 >conftest.err
13189 rm -f conftest.er1
13190 cat conftest.err >&5
13191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13192 (exit $ac_status); } && {
13193 test -z "$ac_c_werror_flag" ||
13194 test ! -s conftest.err
13195 } && test -s conftest.$ac_objext; then
13196 ac_lo=0 ac_mid=0
13197 while :; do
13198 cat >conftest.$ac_ext <<_ACEOF
13199/* confdefs.h. */
13200_ACEOF
13201cat confdefs.h >>conftest.$ac_ext
13202cat >>conftest.$ac_ext <<_ACEOF
13203/* end confdefs.h. */
13204
13205#ifdef HAVE_SYS_TYPES_H
13206#include <sys/types.h>
13207#endif
13208
13209
13210 typedef off_t ac__type_sizeof_;
13211int
13212main ()
13213{
13214static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13215test_array [0] = 0
13216
13217 ;
13218 return 0;
13219}
13220_ACEOF
13221rm -f conftest.$ac_objext
13222if { (ac_try="$ac_compile"
13223case "(($ac_try" in
13224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13225 *) ac_try_echo=$ac_try;;
13226esac
13227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13228 (eval "$ac_compile") 2>conftest.er1
13229 ac_status=$?
13230 grep -v '^ *+' conftest.er1 >conftest.err
13231 rm -f conftest.er1
13232 cat conftest.err >&5
13233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13234 (exit $ac_status); } && {
13235 test -z "$ac_c_werror_flag" ||
13236 test ! -s conftest.err
13237 } && test -s conftest.$ac_objext; then
13238 ac_hi=$ac_mid; break
13239else
13240 echo "$as_me: failed program was:" >&5
13241sed 's/^/| /' conftest.$ac_ext >&5
13242
13243 ac_lo=`expr $ac_mid + 1`
13244 if test $ac_lo -le $ac_mid; then
13245 ac_lo= ac_hi=
13246 break
13247 fi
13248 ac_mid=`expr 2 '*' $ac_mid + 1`
13249fi
13250
13251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13252 done
13253else
13254 echo "$as_me: failed program was:" >&5
13255sed 's/^/| /' conftest.$ac_ext >&5
13256
13257 cat >conftest.$ac_ext <<_ACEOF
13258/* confdefs.h. */
13259_ACEOF
13260cat confdefs.h >>conftest.$ac_ext
13261cat >>conftest.$ac_ext <<_ACEOF
13262/* end confdefs.h. */
13263
13264#ifdef HAVE_SYS_TYPES_H
13265#include <sys/types.h>
13266#endif
13267
13268
13269 typedef off_t ac__type_sizeof_;
13270int
13271main ()
13272{
13273static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13274test_array [0] = 0
13275
13276 ;
13277 return 0;
13278}
13279_ACEOF
13280rm -f conftest.$ac_objext
13281if { (ac_try="$ac_compile"
13282case "(($ac_try" in
13283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13284 *) ac_try_echo=$ac_try;;
13285esac
13286eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13287 (eval "$ac_compile") 2>conftest.er1
13288 ac_status=$?
13289 grep -v '^ *+' conftest.er1 >conftest.err
13290 rm -f conftest.er1
13291 cat conftest.err >&5
13292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13293 (exit $ac_status); } && {
13294 test -z "$ac_c_werror_flag" ||
13295 test ! -s conftest.err
13296 } && test -s conftest.$ac_objext; then
13297 ac_hi=-1 ac_mid=-1
13298 while :; do
13299 cat >conftest.$ac_ext <<_ACEOF
13300/* confdefs.h. */
13301_ACEOF
13302cat confdefs.h >>conftest.$ac_ext
13303cat >>conftest.$ac_ext <<_ACEOF
13304/* end confdefs.h. */
13305
13306#ifdef HAVE_SYS_TYPES_H
13307#include <sys/types.h>
13308#endif
13309
13310
13311 typedef off_t ac__type_sizeof_;
13312int
13313main ()
13314{
13315static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13316test_array [0] = 0
13317
13318 ;
13319 return 0;
13320}
13321_ACEOF
13322rm -f conftest.$ac_objext
13323if { (ac_try="$ac_compile"
13324case "(($ac_try" in
13325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13326 *) ac_try_echo=$ac_try;;
13327esac
13328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13329 (eval "$ac_compile") 2>conftest.er1
13330 ac_status=$?
13331 grep -v '^ *+' conftest.er1 >conftest.err
13332 rm -f conftest.er1
13333 cat conftest.err >&5
13334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13335 (exit $ac_status); } && {
13336 test -z "$ac_c_werror_flag" ||
13337 test ! -s conftest.err
13338 } && test -s conftest.$ac_objext; then
13339 ac_lo=$ac_mid; break
13340else
13341 echo "$as_me: failed program was:" >&5
13342sed 's/^/| /' conftest.$ac_ext >&5
13343
13344 ac_hi=`expr '(' $ac_mid ')' - 1`
13345 if test $ac_mid -le $ac_hi; then
13346 ac_lo= ac_hi=
13347 break
13348 fi
13349 ac_mid=`expr 2 '*' $ac_mid`
13350fi
13351
13352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13353 done
13354else
13355 echo "$as_me: failed program was:" >&5
13356sed 's/^/| /' conftest.$ac_ext >&5
13357
13358 ac_lo= ac_hi=
13359fi
13360
13361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13362fi
13363
13364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13365# Binary search between lo and hi bounds.
13366while test "x$ac_lo" != "x$ac_hi"; do
13367 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13368 cat >conftest.$ac_ext <<_ACEOF
13369/* confdefs.h. */
13370_ACEOF
13371cat confdefs.h >>conftest.$ac_ext
13372cat >>conftest.$ac_ext <<_ACEOF
13373/* end confdefs.h. */
13374
13375#ifdef HAVE_SYS_TYPES_H
13376#include <sys/types.h>
13377#endif
13378
13379
13380 typedef off_t ac__type_sizeof_;
13381int
13382main ()
13383{
13384static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13385test_array [0] = 0
13386
13387 ;
13388 return 0;
13389}
13390_ACEOF
13391rm -f conftest.$ac_objext
13392if { (ac_try="$ac_compile"
13393case "(($ac_try" in
13394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13395 *) ac_try_echo=$ac_try;;
13396esac
13397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13398 (eval "$ac_compile") 2>conftest.er1
13399 ac_status=$?
13400 grep -v '^ *+' conftest.er1 >conftest.err
13401 rm -f conftest.er1
13402 cat conftest.err >&5
13403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13404 (exit $ac_status); } && {
13405 test -z "$ac_c_werror_flag" ||
13406 test ! -s conftest.err
13407 } && test -s conftest.$ac_objext; then
13408 ac_hi=$ac_mid
13409else
13410 echo "$as_me: failed program was:" >&5
13411sed 's/^/| /' conftest.$ac_ext >&5
13412
13413 ac_lo=`expr '(' $ac_mid ')' + 1`
13414fi
13415
13416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13417done
13418case $ac_lo in
13419?*) ac_cv_sizeof_off_t=$ac_lo;;
13420'') if test "$ac_cv_type_off_t" = yes; then
13421 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13422See \`config.log' for more details." >&5
13423echo "$as_me: error: cannot compute sizeof (off_t)
13424See \`config.log' for more details." >&2;}
13425 { (exit 77); exit 77; }; }
13426 else
13427 ac_cv_sizeof_off_t=0
13428 fi ;;
13429esac
13430else
13431 cat >conftest.$ac_ext <<_ACEOF
13432/* confdefs.h. */
13433_ACEOF
13434cat confdefs.h >>conftest.$ac_ext
13435cat >>conftest.$ac_ext <<_ACEOF
13436/* end confdefs.h. */
13437
13438#ifdef HAVE_SYS_TYPES_H
13439#include <sys/types.h>
13440#endif
13441
13442
13443 typedef off_t ac__type_sizeof_;
13444static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13445static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13446#include <stdio.h>
13447#include <stdlib.h>
13448int
13449main ()
13450{
13451
13452 FILE *f = fopen ("conftest.val", "w");
13453 if (! f)
13454 return 1;
13455 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13456 {
13457 long int i = longval ();
13458 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13459 return 1;
13460 fprintf (f, "%ld\n", i);
13461 }
13462 else
13463 {
13464 unsigned long int i = ulongval ();
13465 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13466 return 1;
13467 fprintf (f, "%lu\n", i);
13468 }
13469 return ferror (f) || fclose (f) != 0;
13470
13471 ;
13472 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013473}
Martin v. Löwis11437992002-04-12 09:54:03 +000013474_ACEOF
13475rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013476if { (ac_try="$ac_link"
13477case "(($ac_try" in
13478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13479 *) ac_try_echo=$ac_try;;
13480esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013482 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013483 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013485 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013486 { (case "(($ac_try" in
13487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13488 *) ac_try_echo=$ac_try;;
13489esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013491 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013492 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013494 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013495 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013496else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013497 echo "$as_me: program exited with status $ac_status" >&5
13498echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013499sed 's/^/| /' conftest.$ac_ext >&5
13500
Martin v. Löwis11437992002-04-12 09:54:03 +000013501( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013502if test "$ac_cv_type_off_t" = yes; then
13503 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13504See \`config.log' for more details." >&5
13505echo "$as_me: error: cannot compute sizeof (off_t)
13506See \`config.log' for more details." >&2;}
13507 { (exit 77); exit 77; }; }
13508 else
13509 ac_cv_sizeof_off_t=0
13510 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013511fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013512rm -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 +000013513fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013514rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013515fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013516{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13517echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013518
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013519
13520
Martin v. Löwis11437992002-04-12 09:54:03 +000013521cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013522#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013523_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013524
Michael W. Hudson54241132001-12-07 15:38:26 +000013525
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013526
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013527{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13528echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +000013529if test "$have_long_long" = yes
13530then
13531if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013532 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013533
Martin v. Löwis11437992002-04-12 09:54:03 +000013534cat >>confdefs.h <<\_ACEOF
13535#define HAVE_LARGEFILE_SUPPORT 1
13536_ACEOF
13537
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013538 { echo "$as_me:$LINENO: result: yes" >&5
13539echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013540else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013541 { echo "$as_me:$LINENO: result: no" >&5
13542echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013543fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +000013544else
13545 { echo "$as_me:$LINENO: result: no" >&5
13546echo "${ECHO_T}no" >&6; }
13547fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013548
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013549{ echo "$as_me:$LINENO: checking for time_t" >&5
13550echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13551if test "${ac_cv_type_time_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013552 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013553else
Martin v. Löwis11437992002-04-12 09:54:03 +000013554 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013555/* confdefs.h. */
13556_ACEOF
13557cat confdefs.h >>conftest.$ac_ext
13558cat >>conftest.$ac_ext <<_ACEOF
13559/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013560
13561#ifdef HAVE_SYS_TYPES_H
13562#include <sys/types.h>
13563#endif
13564#ifdef HAVE_TIME_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013565#include <time.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013566#endif
13567
13568
13569typedef time_t ac__type_new_;
13570int
13571main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013572{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013573if ((ac__type_new_ *) 0)
13574 return 0;
13575if (sizeof (ac__type_new_))
13576 return 0;
13577 ;
13578 return 0;
13579}
13580_ACEOF
13581rm -f conftest.$ac_objext
13582if { (ac_try="$ac_compile"
13583case "(($ac_try" in
13584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13585 *) ac_try_echo=$ac_try;;
13586esac
13587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13588 (eval "$ac_compile") 2>conftest.er1
13589 ac_status=$?
13590 grep -v '^ *+' conftest.er1 >conftest.err
13591 rm -f conftest.er1
13592 cat conftest.err >&5
13593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13594 (exit $ac_status); } && {
13595 test -z "$ac_c_werror_flag" ||
13596 test ! -s conftest.err
13597 } && test -s conftest.$ac_objext; then
13598 ac_cv_type_time_t=yes
13599else
13600 echo "$as_me: failed program was:" >&5
13601sed 's/^/| /' conftest.$ac_ext >&5
13602
13603 ac_cv_type_time_t=no
13604fi
13605
13606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13607fi
13608{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13609echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13610
13611# The cast to long int works around a bug in the HP C Compiler
13612# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13613# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13614# This bug is HP SR number 8606223364.
13615{ echo "$as_me:$LINENO: checking size of time_t" >&5
13616echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
13617if test "${ac_cv_sizeof_time_t+set}" = set; then
13618 echo $ECHO_N "(cached) $ECHO_C" >&6
13619else
13620 if test "$cross_compiling" = yes; then
13621 # Depending upon the size, compute the lo and hi bounds.
13622cat >conftest.$ac_ext <<_ACEOF
13623/* confdefs.h. */
13624_ACEOF
13625cat confdefs.h >>conftest.$ac_ext
13626cat >>conftest.$ac_ext <<_ACEOF
13627/* end confdefs.h. */
13628
13629#ifdef HAVE_SYS_TYPES_H
13630#include <sys/types.h>
13631#endif
13632#ifdef HAVE_TIME_H
13633#include <time.h>
13634#endif
13635
13636
13637 typedef time_t ac__type_sizeof_;
13638int
13639main ()
13640{
13641static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13642test_array [0] = 0
13643
13644 ;
13645 return 0;
13646}
13647_ACEOF
13648rm -f conftest.$ac_objext
13649if { (ac_try="$ac_compile"
13650case "(($ac_try" in
13651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13652 *) ac_try_echo=$ac_try;;
13653esac
13654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13655 (eval "$ac_compile") 2>conftest.er1
13656 ac_status=$?
13657 grep -v '^ *+' conftest.er1 >conftest.err
13658 rm -f conftest.er1
13659 cat conftest.err >&5
13660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13661 (exit $ac_status); } && {
13662 test -z "$ac_c_werror_flag" ||
13663 test ! -s conftest.err
13664 } && test -s conftest.$ac_objext; then
13665 ac_lo=0 ac_mid=0
13666 while :; do
13667 cat >conftest.$ac_ext <<_ACEOF
13668/* confdefs.h. */
13669_ACEOF
13670cat confdefs.h >>conftest.$ac_ext
13671cat >>conftest.$ac_ext <<_ACEOF
13672/* end confdefs.h. */
13673
13674#ifdef HAVE_SYS_TYPES_H
13675#include <sys/types.h>
13676#endif
13677#ifdef HAVE_TIME_H
13678#include <time.h>
13679#endif
13680
13681
13682 typedef time_t ac__type_sizeof_;
13683int
13684main ()
13685{
13686static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13687test_array [0] = 0
13688
13689 ;
13690 return 0;
13691}
13692_ACEOF
13693rm -f conftest.$ac_objext
13694if { (ac_try="$ac_compile"
13695case "(($ac_try" in
13696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13697 *) ac_try_echo=$ac_try;;
13698esac
13699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13700 (eval "$ac_compile") 2>conftest.er1
13701 ac_status=$?
13702 grep -v '^ *+' conftest.er1 >conftest.err
13703 rm -f conftest.er1
13704 cat conftest.err >&5
13705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13706 (exit $ac_status); } && {
13707 test -z "$ac_c_werror_flag" ||
13708 test ! -s conftest.err
13709 } && test -s conftest.$ac_objext; then
13710 ac_hi=$ac_mid; break
13711else
13712 echo "$as_me: failed program was:" >&5
13713sed 's/^/| /' conftest.$ac_ext >&5
13714
13715 ac_lo=`expr $ac_mid + 1`
13716 if test $ac_lo -le $ac_mid; then
13717 ac_lo= ac_hi=
13718 break
13719 fi
13720 ac_mid=`expr 2 '*' $ac_mid + 1`
13721fi
13722
13723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13724 done
13725else
13726 echo "$as_me: failed program was:" >&5
13727sed 's/^/| /' conftest.$ac_ext >&5
13728
13729 cat >conftest.$ac_ext <<_ACEOF
13730/* confdefs.h. */
13731_ACEOF
13732cat confdefs.h >>conftest.$ac_ext
13733cat >>conftest.$ac_ext <<_ACEOF
13734/* end confdefs.h. */
13735
13736#ifdef HAVE_SYS_TYPES_H
13737#include <sys/types.h>
13738#endif
13739#ifdef HAVE_TIME_H
13740#include <time.h>
13741#endif
13742
13743
13744 typedef time_t ac__type_sizeof_;
13745int
13746main ()
13747{
13748static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13749test_array [0] = 0
13750
13751 ;
13752 return 0;
13753}
13754_ACEOF
13755rm -f conftest.$ac_objext
13756if { (ac_try="$ac_compile"
13757case "(($ac_try" in
13758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13759 *) ac_try_echo=$ac_try;;
13760esac
13761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13762 (eval "$ac_compile") 2>conftest.er1
13763 ac_status=$?
13764 grep -v '^ *+' conftest.er1 >conftest.err
13765 rm -f conftest.er1
13766 cat conftest.err >&5
13767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13768 (exit $ac_status); } && {
13769 test -z "$ac_c_werror_flag" ||
13770 test ! -s conftest.err
13771 } && test -s conftest.$ac_objext; then
13772 ac_hi=-1 ac_mid=-1
13773 while :; do
13774 cat >conftest.$ac_ext <<_ACEOF
13775/* confdefs.h. */
13776_ACEOF
13777cat confdefs.h >>conftest.$ac_ext
13778cat >>conftest.$ac_ext <<_ACEOF
13779/* end confdefs.h. */
13780
13781#ifdef HAVE_SYS_TYPES_H
13782#include <sys/types.h>
13783#endif
13784#ifdef HAVE_TIME_H
13785#include <time.h>
13786#endif
13787
13788
13789 typedef time_t ac__type_sizeof_;
13790int
13791main ()
13792{
13793static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13794test_array [0] = 0
13795
13796 ;
13797 return 0;
13798}
13799_ACEOF
13800rm -f conftest.$ac_objext
13801if { (ac_try="$ac_compile"
13802case "(($ac_try" in
13803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13804 *) ac_try_echo=$ac_try;;
13805esac
13806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13807 (eval "$ac_compile") 2>conftest.er1
13808 ac_status=$?
13809 grep -v '^ *+' conftest.er1 >conftest.err
13810 rm -f conftest.er1
13811 cat conftest.err >&5
13812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13813 (exit $ac_status); } && {
13814 test -z "$ac_c_werror_flag" ||
13815 test ! -s conftest.err
13816 } && test -s conftest.$ac_objext; then
13817 ac_lo=$ac_mid; break
13818else
13819 echo "$as_me: failed program was:" >&5
13820sed 's/^/| /' conftest.$ac_ext >&5
13821
13822 ac_hi=`expr '(' $ac_mid ')' - 1`
13823 if test $ac_mid -le $ac_hi; then
13824 ac_lo= ac_hi=
13825 break
13826 fi
13827 ac_mid=`expr 2 '*' $ac_mid`
13828fi
13829
13830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13831 done
13832else
13833 echo "$as_me: failed program was:" >&5
13834sed 's/^/| /' conftest.$ac_ext >&5
13835
13836 ac_lo= ac_hi=
13837fi
13838
13839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13840fi
13841
13842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13843# Binary search between lo and hi bounds.
13844while test "x$ac_lo" != "x$ac_hi"; do
13845 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13846 cat >conftest.$ac_ext <<_ACEOF
13847/* confdefs.h. */
13848_ACEOF
13849cat confdefs.h >>conftest.$ac_ext
13850cat >>conftest.$ac_ext <<_ACEOF
13851/* end confdefs.h. */
13852
13853#ifdef HAVE_SYS_TYPES_H
13854#include <sys/types.h>
13855#endif
13856#ifdef HAVE_TIME_H
13857#include <time.h>
13858#endif
13859
13860
13861 typedef time_t ac__type_sizeof_;
13862int
13863main ()
13864{
13865static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13866test_array [0] = 0
13867
13868 ;
13869 return 0;
13870}
13871_ACEOF
13872rm -f conftest.$ac_objext
13873if { (ac_try="$ac_compile"
13874case "(($ac_try" in
13875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13876 *) ac_try_echo=$ac_try;;
13877esac
13878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13879 (eval "$ac_compile") 2>conftest.er1
13880 ac_status=$?
13881 grep -v '^ *+' conftest.er1 >conftest.err
13882 rm -f conftest.er1
13883 cat conftest.err >&5
13884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13885 (exit $ac_status); } && {
13886 test -z "$ac_c_werror_flag" ||
13887 test ! -s conftest.err
13888 } && test -s conftest.$ac_objext; then
13889 ac_hi=$ac_mid
13890else
13891 echo "$as_me: failed program was:" >&5
13892sed 's/^/| /' conftest.$ac_ext >&5
13893
13894 ac_lo=`expr '(' $ac_mid ')' + 1`
13895fi
13896
13897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13898done
13899case $ac_lo in
13900?*) ac_cv_sizeof_time_t=$ac_lo;;
13901'') if test "$ac_cv_type_time_t" = yes; then
13902 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13903See \`config.log' for more details." >&5
13904echo "$as_me: error: cannot compute sizeof (time_t)
13905See \`config.log' for more details." >&2;}
13906 { (exit 77); exit 77; }; }
13907 else
13908 ac_cv_sizeof_time_t=0
13909 fi ;;
13910esac
13911else
13912 cat >conftest.$ac_ext <<_ACEOF
13913/* confdefs.h. */
13914_ACEOF
13915cat confdefs.h >>conftest.$ac_ext
13916cat >>conftest.$ac_ext <<_ACEOF
13917/* end confdefs.h. */
13918
13919#ifdef HAVE_SYS_TYPES_H
13920#include <sys/types.h>
13921#endif
13922#ifdef HAVE_TIME_H
13923#include <time.h>
13924#endif
13925
13926
13927 typedef time_t ac__type_sizeof_;
13928static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13929static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13930#include <stdio.h>
13931#include <stdlib.h>
13932int
13933main ()
13934{
13935
13936 FILE *f = fopen ("conftest.val", "w");
13937 if (! f)
13938 return 1;
13939 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13940 {
13941 long int i = longval ();
13942 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13943 return 1;
13944 fprintf (f, "%ld\n", i);
13945 }
13946 else
13947 {
13948 unsigned long int i = ulongval ();
13949 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13950 return 1;
13951 fprintf (f, "%lu\n", i);
13952 }
13953 return ferror (f) || fclose (f) != 0;
13954
13955 ;
13956 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013957}
Martin v. Löwis11437992002-04-12 09:54:03 +000013958_ACEOF
13959rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013960if { (ac_try="$ac_link"
13961case "(($ac_try" in
13962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13963 *) ac_try_echo=$ac_try;;
13964esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013966 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013967 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013969 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013970 { (case "(($ac_try" in
13971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13972 *) ac_try_echo=$ac_try;;
13973esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013975 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013976 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013978 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013979 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013980else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013981 echo "$as_me: program exited with status $ac_status" >&5
13982echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013983sed 's/^/| /' conftest.$ac_ext >&5
13984
Martin v. Löwis11437992002-04-12 09:54:03 +000013985( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013986if test "$ac_cv_type_time_t" = yes; then
13987 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13988See \`config.log' for more details." >&5
13989echo "$as_me: error: cannot compute sizeof (time_t)
13990See \`config.log' for more details." >&2;}
13991 { (exit 77); exit 77; }; }
13992 else
13993 ac_cv_sizeof_time_t=0
13994 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013995fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013996rm -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 +000013997fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013998rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013999fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014000{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
14001echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014002
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014003
14004
Martin v. Löwis11437992002-04-12 09:54:03 +000014005cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014006#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014007_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014008
Michael W. Hudson54241132001-12-07 15:38:26 +000014009
14010
Trent Mick635f6fb2000-08-23 21:33:05 +000014011# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014012ac_save_cc="$CC"
14013if test "$ac_cv_kpthread" = "yes"
14014then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014015elif test "$ac_cv_kthread" = "yes"
14016then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014017elif test "$ac_cv_pthread" = "yes"
14018then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014019fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014020{ echo "$as_me:$LINENO: checking for pthread_t" >&5
14021echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014022have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014023cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014024/* confdefs.h. */
14025_ACEOF
14026cat confdefs.h >>conftest.$ac_ext
14027cat >>conftest.$ac_ext <<_ACEOF
14028/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000014029#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014030int
14031main ()
14032{
Guido van Rossum12580492000-09-24 16:47:19 +000014033pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014034 ;
14035 return 0;
14036}
14037_ACEOF
14038rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014039if { (ac_try="$ac_compile"
14040case "(($ac_try" in
14041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14042 *) ac_try_echo=$ac_try;;
14043esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014045 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014046 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014047 grep -v '^ *+' conftest.er1 >conftest.err
14048 rm -f conftest.er1
14049 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014051 (exit $ac_status); } && {
14052 test -z "$ac_c_werror_flag" ||
14053 test ! -s conftest.err
14054 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000014055 have_pthread_t=yes
14056else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014057 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014058sed 's/^/| /' conftest.$ac_ext >&5
14059
Martin v. Löwiseba40652007-08-30 20:10:57 +000014060
Trent Mick635f6fb2000-08-23 21:33:05 +000014061fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014062
14063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014064{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
14065echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014066if test "$have_pthread_t" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014067 { echo "$as_me:$LINENO: checking for pthread_t" >&5
14068echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
14069if test "${ac_cv_type_pthread_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014070 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000014071else
Martin v. Löwis11437992002-04-12 09:54:03 +000014072 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014073/* confdefs.h. */
14074_ACEOF
14075cat confdefs.h >>conftest.$ac_ext
14076cat >>conftest.$ac_ext <<_ACEOF
14077/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014078
14079#ifdef HAVE_PTHREAD_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014080#include <pthread.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014081#endif
14082
14083
14084typedef pthread_t ac__type_new_;
14085int
14086main ()
14087{
14088if ((ac__type_new_ *) 0)
14089 return 0;
14090if (sizeof (ac__type_new_))
14091 return 0;
14092 ;
14093 return 0;
14094}
14095_ACEOF
14096rm -f conftest.$ac_objext
14097if { (ac_try="$ac_compile"
14098case "(($ac_try" in
14099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14100 *) ac_try_echo=$ac_try;;
14101esac
14102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14103 (eval "$ac_compile") 2>conftest.er1
14104 ac_status=$?
14105 grep -v '^ *+' conftest.er1 >conftest.err
14106 rm -f conftest.er1
14107 cat conftest.err >&5
14108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14109 (exit $ac_status); } && {
14110 test -z "$ac_c_werror_flag" ||
14111 test ! -s conftest.err
14112 } && test -s conftest.$ac_objext; then
14113 ac_cv_type_pthread_t=yes
14114else
14115 echo "$as_me: failed program was:" >&5
14116sed 's/^/| /' conftest.$ac_ext >&5
14117
14118 ac_cv_type_pthread_t=no
14119fi
14120
14121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14122fi
14123{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14124echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14125
14126# The cast to long int works around a bug in the HP C Compiler
14127# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14128# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14129# This bug is HP SR number 8606223364.
14130{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14131echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
14132if test "${ac_cv_sizeof_pthread_t+set}" = set; then
14133 echo $ECHO_N "(cached) $ECHO_C" >&6
14134else
14135 if test "$cross_compiling" = yes; then
14136 # Depending upon the size, compute the lo and hi bounds.
14137cat >conftest.$ac_ext <<_ACEOF
14138/* confdefs.h. */
14139_ACEOF
14140cat confdefs.h >>conftest.$ac_ext
14141cat >>conftest.$ac_ext <<_ACEOF
14142/* end confdefs.h. */
14143
14144#ifdef HAVE_PTHREAD_H
14145#include <pthread.h>
14146#endif
14147
14148
14149 typedef pthread_t ac__type_sizeof_;
14150int
14151main ()
14152{
14153static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
14154test_array [0] = 0
14155
14156 ;
14157 return 0;
14158}
14159_ACEOF
14160rm -f conftest.$ac_objext
14161if { (ac_try="$ac_compile"
14162case "(($ac_try" in
14163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14164 *) ac_try_echo=$ac_try;;
14165esac
14166eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14167 (eval "$ac_compile") 2>conftest.er1
14168 ac_status=$?
14169 grep -v '^ *+' conftest.er1 >conftest.err
14170 rm -f conftest.er1
14171 cat conftest.err >&5
14172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14173 (exit $ac_status); } && {
14174 test -z "$ac_c_werror_flag" ||
14175 test ! -s conftest.err
14176 } && test -s conftest.$ac_objext; then
14177 ac_lo=0 ac_mid=0
14178 while :; do
14179 cat >conftest.$ac_ext <<_ACEOF
14180/* confdefs.h. */
14181_ACEOF
14182cat confdefs.h >>conftest.$ac_ext
14183cat >>conftest.$ac_ext <<_ACEOF
14184/* end confdefs.h. */
14185
14186#ifdef HAVE_PTHREAD_H
14187#include <pthread.h>
14188#endif
14189
14190
14191 typedef pthread_t ac__type_sizeof_;
14192int
14193main ()
14194{
14195static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14196test_array [0] = 0
14197
14198 ;
14199 return 0;
14200}
14201_ACEOF
14202rm -f conftest.$ac_objext
14203if { (ac_try="$ac_compile"
14204case "(($ac_try" in
14205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14206 *) ac_try_echo=$ac_try;;
14207esac
14208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14209 (eval "$ac_compile") 2>conftest.er1
14210 ac_status=$?
14211 grep -v '^ *+' conftest.er1 >conftest.err
14212 rm -f conftest.er1
14213 cat conftest.err >&5
14214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14215 (exit $ac_status); } && {
14216 test -z "$ac_c_werror_flag" ||
14217 test ! -s conftest.err
14218 } && test -s conftest.$ac_objext; then
14219 ac_hi=$ac_mid; break
14220else
14221 echo "$as_me: failed program was:" >&5
14222sed 's/^/| /' conftest.$ac_ext >&5
14223
14224 ac_lo=`expr $ac_mid + 1`
14225 if test $ac_lo -le $ac_mid; then
14226 ac_lo= ac_hi=
14227 break
14228 fi
14229 ac_mid=`expr 2 '*' $ac_mid + 1`
14230fi
14231
14232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14233 done
14234else
14235 echo "$as_me: failed program was:" >&5
14236sed 's/^/| /' conftest.$ac_ext >&5
14237
14238 cat >conftest.$ac_ext <<_ACEOF
14239/* confdefs.h. */
14240_ACEOF
14241cat confdefs.h >>conftest.$ac_ext
14242cat >>conftest.$ac_ext <<_ACEOF
14243/* end confdefs.h. */
14244
14245#ifdef HAVE_PTHREAD_H
14246#include <pthread.h>
14247#endif
14248
14249
14250 typedef pthread_t ac__type_sizeof_;
14251int
14252main ()
14253{
14254static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
14255test_array [0] = 0
14256
14257 ;
14258 return 0;
14259}
14260_ACEOF
14261rm -f conftest.$ac_objext
14262if { (ac_try="$ac_compile"
14263case "(($ac_try" in
14264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14265 *) ac_try_echo=$ac_try;;
14266esac
14267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14268 (eval "$ac_compile") 2>conftest.er1
14269 ac_status=$?
14270 grep -v '^ *+' conftest.er1 >conftest.err
14271 rm -f conftest.er1
14272 cat conftest.err >&5
14273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14274 (exit $ac_status); } && {
14275 test -z "$ac_c_werror_flag" ||
14276 test ! -s conftest.err
14277 } && test -s conftest.$ac_objext; then
14278 ac_hi=-1 ac_mid=-1
14279 while :; do
14280 cat >conftest.$ac_ext <<_ACEOF
14281/* confdefs.h. */
14282_ACEOF
14283cat confdefs.h >>conftest.$ac_ext
14284cat >>conftest.$ac_ext <<_ACEOF
14285/* end confdefs.h. */
14286
14287#ifdef HAVE_PTHREAD_H
14288#include <pthread.h>
14289#endif
14290
14291
14292 typedef pthread_t ac__type_sizeof_;
14293int
14294main ()
14295{
14296static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
14297test_array [0] = 0
14298
14299 ;
14300 return 0;
14301}
14302_ACEOF
14303rm -f conftest.$ac_objext
14304if { (ac_try="$ac_compile"
14305case "(($ac_try" in
14306 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14307 *) ac_try_echo=$ac_try;;
14308esac
14309eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14310 (eval "$ac_compile") 2>conftest.er1
14311 ac_status=$?
14312 grep -v '^ *+' conftest.er1 >conftest.err
14313 rm -f conftest.er1
14314 cat conftest.err >&5
14315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14316 (exit $ac_status); } && {
14317 test -z "$ac_c_werror_flag" ||
14318 test ! -s conftest.err
14319 } && test -s conftest.$ac_objext; then
14320 ac_lo=$ac_mid; break
14321else
14322 echo "$as_me: failed program was:" >&5
14323sed 's/^/| /' conftest.$ac_ext >&5
14324
14325 ac_hi=`expr '(' $ac_mid ')' - 1`
14326 if test $ac_mid -le $ac_hi; then
14327 ac_lo= ac_hi=
14328 break
14329 fi
14330 ac_mid=`expr 2 '*' $ac_mid`
14331fi
14332
14333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14334 done
14335else
14336 echo "$as_me: failed program was:" >&5
14337sed 's/^/| /' conftest.$ac_ext >&5
14338
14339 ac_lo= ac_hi=
14340fi
14341
14342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14343fi
14344
14345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14346# Binary search between lo and hi bounds.
14347while test "x$ac_lo" != "x$ac_hi"; do
14348 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14349 cat >conftest.$ac_ext <<_ACEOF
14350/* confdefs.h. */
14351_ACEOF
14352cat confdefs.h >>conftest.$ac_ext
14353cat >>conftest.$ac_ext <<_ACEOF
14354/* end confdefs.h. */
14355
14356#ifdef HAVE_PTHREAD_H
14357#include <pthread.h>
14358#endif
14359
14360
14361 typedef pthread_t ac__type_sizeof_;
14362int
14363main ()
14364{
14365static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14366test_array [0] = 0
14367
14368 ;
14369 return 0;
14370}
14371_ACEOF
14372rm -f conftest.$ac_objext
14373if { (ac_try="$ac_compile"
14374case "(($ac_try" in
14375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14376 *) ac_try_echo=$ac_try;;
14377esac
14378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14379 (eval "$ac_compile") 2>conftest.er1
14380 ac_status=$?
14381 grep -v '^ *+' conftest.er1 >conftest.err
14382 rm -f conftest.er1
14383 cat conftest.err >&5
14384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14385 (exit $ac_status); } && {
14386 test -z "$ac_c_werror_flag" ||
14387 test ! -s conftest.err
14388 } && test -s conftest.$ac_objext; then
14389 ac_hi=$ac_mid
14390else
14391 echo "$as_me: failed program was:" >&5
14392sed 's/^/| /' conftest.$ac_ext >&5
14393
14394 ac_lo=`expr '(' $ac_mid ')' + 1`
14395fi
14396
14397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14398done
14399case $ac_lo in
14400?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14401'') if test "$ac_cv_type_pthread_t" = yes; then
14402 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14403See \`config.log' for more details." >&5
14404echo "$as_me: error: cannot compute sizeof (pthread_t)
14405See \`config.log' for more details." >&2;}
14406 { (exit 77); exit 77; }; }
14407 else
14408 ac_cv_sizeof_pthread_t=0
14409 fi ;;
14410esac
14411else
14412 cat >conftest.$ac_ext <<_ACEOF
14413/* confdefs.h. */
14414_ACEOF
14415cat confdefs.h >>conftest.$ac_ext
14416cat >>conftest.$ac_ext <<_ACEOF
14417/* end confdefs.h. */
14418
14419#ifdef HAVE_PTHREAD_H
14420#include <pthread.h>
14421#endif
14422
14423
14424 typedef pthread_t ac__type_sizeof_;
14425static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14426static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
14427#include <stdio.h>
14428#include <stdlib.h>
14429int
14430main ()
14431{
14432
14433 FILE *f = fopen ("conftest.val", "w");
14434 if (! f)
14435 return 1;
14436 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
14437 {
14438 long int i = longval ();
14439 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14440 return 1;
14441 fprintf (f, "%ld\n", i);
14442 }
14443 else
14444 {
14445 unsigned long int i = ulongval ();
14446 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14447 return 1;
14448 fprintf (f, "%lu\n", i);
14449 }
14450 return ferror (f) || fclose (f) != 0;
14451
14452 ;
14453 return 0;
14454}
Martin v. Löwis11437992002-04-12 09:54:03 +000014455_ACEOF
14456rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014457if { (ac_try="$ac_link"
14458case "(($ac_try" in
14459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14460 *) ac_try_echo=$ac_try;;
14461esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014463 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014464 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014466 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014467 { (case "(($ac_try" in
14468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14469 *) ac_try_echo=$ac_try;;
14470esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014471eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014472 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014473 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014475 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014476 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014477else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014478 echo "$as_me: program exited with status $ac_status" >&5
14479echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014480sed 's/^/| /' conftest.$ac_ext >&5
14481
Martin v. Löwis11437992002-04-12 09:54:03 +000014482( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014483if test "$ac_cv_type_pthread_t" = yes; then
14484 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14485See \`config.log' for more details." >&5
14486echo "$as_me: error: cannot compute sizeof (pthread_t)
14487See \`config.log' for more details." >&2;}
14488 { (exit 77); exit 77; }; }
14489 else
14490 ac_cv_sizeof_pthread_t=0
14491 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014492fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014493rm -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 +000014494fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014495rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014496fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014497{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014498echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014499
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014500
14501
Martin v. Löwis11437992002-04-12 09:54:03 +000014502cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014503#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014504_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014505
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014506
Trent Mick635f6fb2000-08-23 21:33:05 +000014507fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014508CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014509
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014510{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
14511echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014512# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000014513if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014514 enableval=$enable_toolbox_glue;
14515fi
Jack Jansene578a632001-08-15 01:27:14 +000014516
14517
14518if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000014519then
Jack Jansene578a632001-08-15 01:27:14 +000014520 case $ac_sys_system/$ac_sys_release in
14521 Darwin/*)
14522 enable_toolbox_glue="yes";;
14523 *)
14524 enable_toolbox_glue="no";;
14525 esac
14526fi
14527case "$enable_toolbox_glue" in
14528yes)
Jack Jansene578a632001-08-15 01:27:14 +000014529 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014530 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000014531
14532cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014533#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014534_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014535
14536 ;;
14537*)
Jack Jansene578a632001-08-15 01:27:14 +000014538 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000014539 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000014540 ;;
14541esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014542{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
14543echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014544
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014545
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014546
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014547case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014548 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014549 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14550 ;;
14551 Darwin/*)
14552 OTHER_LIBTOOL_OPT=""
14553 ;;
14554esac
14555
14556
Ronald Oussoren25967582009-09-06 10:00:26 +000014557ARCH_RUN_32BIT=""
14558
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014559case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014560 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000014561 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14562 if test "${enable_universalsdk}"; then
14563 :
14564 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +000014565 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014566 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014567 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014568 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014569 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +000014570 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014571 if test ${gcc_version} '<' 4.0
14572 then
14573 LIBTOOL_CRUFT="-lcc_dynamic"
14574 else
14575 LIBTOOL_CRUFT=""
14576 fi
Ronald Oussoren25967582009-09-06 10:00:26 +000014577 if test "$cross_compiling" = yes; then
Ronald Oussoren23d92532009-09-07 06:12:00 +000014578 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +000014579else
14580 cat >conftest.$ac_ext <<_ACEOF
14581/* confdefs.h. */
14582_ACEOF
14583cat confdefs.h >>conftest.$ac_ext
14584cat >>conftest.$ac_ext <<_ACEOF
14585/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +000014586
Ronald Oussoren25967582009-09-06 10:00:26 +000014587 #include <unistd.h>
14588 int main(int argc, char*argv[])
14589 {
14590 if (sizeof(long) == 4) {
14591 return 0;
14592 } else {
14593 return 1;
14594 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +000014595 }
Ronald Oussoren23d92532009-09-07 06:12:00 +000014596
Ronald Oussoren25967582009-09-06 10:00:26 +000014597_ACEOF
14598rm -f conftest$ac_exeext
14599if { (ac_try="$ac_link"
14600case "(($ac_try" in
14601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14602 *) ac_try_echo=$ac_try;;
14603esac
14604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14605 (eval "$ac_link") 2>&5
14606 ac_status=$?
14607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14608 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14609 { (case "(($ac_try" in
14610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14611 *) ac_try_echo=$ac_try;;
14612esac
14613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14614 (eval "$ac_try") 2>&5
14615 ac_status=$?
14616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14617 (exit $ac_status); }; }; then
14618 ac_osx_32bit=yes
14619else
14620 echo "$as_me: program exited with status $ac_status" >&5
14621echo "$as_me: failed program was:" >&5
14622sed 's/^/| /' conftest.$ac_ext >&5
14623
14624( exit $ac_status )
14625ac_osx_32bit=no
14626fi
14627rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14628fi
14629
14630
14631
14632 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +000014633 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +000014634 i386)
14635 MACOSX_DEFAULT_ARCH="i386"
14636 ;;
14637 ppc)
14638 MACOSX_DEFAULT_ARCH="ppc"
14639 ;;
14640 *)
14641 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14642echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14643 { (exit 1); exit 1; }; }
14644 ;;
14645 esac
14646 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +000014647 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +000014648 i386)
14649 MACOSX_DEFAULT_ARCH="x86_64"
14650 ;;
14651 ppc)
14652 MACOSX_DEFAULT_ARCH="ppc64"
14653 ;;
14654 *)
14655 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14656echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14657 { (exit 1); exit 1; }; }
14658 ;;
14659 esac
14660
14661 #ARCH_RUN_32BIT="true"
14662 fi
14663
14664 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014665 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014666 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014667esac
14668
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014669{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14670echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014671if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014672then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014673 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014674 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014675 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014676
Martin v. Löwis11437992002-04-12 09:54:03 +000014677cat >>confdefs.h <<\_ACEOF
14678#define WITH_NEXT_FRAMEWORK 1
14679_ACEOF
14680
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014681 { echo "$as_me:$LINENO: result: yes" >&5
14682echo "${ECHO_T}yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +000014683 if test $enable_shared = "yes"
14684 then
Ronald Oussoren9ebd2422009-09-29 13:00:44 +000014685 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." >&5
14686echo "$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 +000014687 { (exit 1); exit 1; }; }
14688 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014689else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014690 { echo "$as_me:$LINENO: result: no" >&5
14691echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014692fi
14693
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014694{ echo "$as_me:$LINENO: checking for dyld" >&5
14695echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014696case $ac_sys_system/$ac_sys_release in
14697 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014698
Martin v. Löwis11437992002-04-12 09:54:03 +000014699cat >>confdefs.h <<\_ACEOF
14700#define WITH_DYLD 1
14701_ACEOF
14702
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014703 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14704echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014705 ;;
14706 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014707 { echo "$as_me:$LINENO: result: no" >&5
14708echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014709 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014710esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014711
Guido van Rossum0a516c91994-09-12 10:58:40 +000014712# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014713
Michael W. Hudson54241132001-12-07 15:38:26 +000014714
14715
14716
14717
Ronald Oussoren75912852010-04-08 08:13:31 +000014718
Guido van Rossum0a516c91994-09-12 10:58:40 +000014719# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014720# -- usually .so, .sl on HP-UX, .dll on Cygwin
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014721{ echo "$as_me:$LINENO: checking SO" >&5
14722echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014723if test -z "$SO"
14724then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014725 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000014726 hp*|HP*)
14727 case `uname -m` in
14728 ia64) SO=.so;;
14729 *) SO=.sl;;
14730 esac
14731 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014732 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014733 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014734 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014735else
14736 # this might also be a termcap variable, see #610332
14737 echo
14738 echo '====================================================================='
14739 echo '+ +'
14740 echo '+ WARNING: You have set SO in your environment. +'
14741 echo '+ Do you really mean to change the extension for shared libraries? +'
14742 echo '+ Continuing in 10 seconds to let you to ponder. +'
14743 echo '+ +'
14744 echo '====================================================================='
14745 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014746fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014747{ echo "$as_me:$LINENO: result: $SO" >&5
14748echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000014749
Ronald Oussoren79f90492009-01-02 10:44:46 +000014750
Neal Norwitz58e28882006-05-19 07:00:58 +000014751cat >>confdefs.h <<_ACEOF
14752#define SHLIB_EXT "$SO"
14753_ACEOF
14754
Guido van Rossum0a516c91994-09-12 10:58:40 +000014755# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014756# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014757# (Shared libraries in this instance are shared modules to be loaded into
14758# Python, as opposed to building Python itself as a shared library.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014759{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14760echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014761if test -z "$LDSHARED"
14762then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014763 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014764 AIX*)
14765 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014766 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014767 ;;
14768 BeOS*)
14769 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000014770 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014771 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014772 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014773 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014774 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +000014775 if test "$GCC" = "yes" ; then
14776 LDSHARED='$(CC) -shared'
14777 LDCXXSHARED='$(CXX) -shared'
14778 else
14779 LDSHARED='$(CC) -G'
14780 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +000014781 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000014782 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +000014783 if test "$GCC" = "yes" ; then
14784 LDSHARED='$(CC) -shared'
14785 LDCXXSHARED='$(CXX) -shared'
14786 else
14787 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +000014788 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014789 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014790 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014791 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Ronald Oussoren75912852010-04-08 08:13:31 +000014792 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +000014793 if test "$enable_framework" ; then
14794 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014795 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14796 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +000014797 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014798 else
14799 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014800 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +000014801 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014802 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014803 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014804 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Ronald Oussoren75912852010-04-08 08:13:31 +000014805 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +000014806 if test "$enable_framework" ; then
14807 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014808 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14809 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +000014810 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014811 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014812 # No framework, use the Python app as bundle-loader
14813 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014814 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +000014815 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014816 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014817 Darwin/*)
14818 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14819 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000014820
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014821 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014822 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000014823 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014824 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014825 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014826 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Ronald Oussoren75912852010-04-08 08:13:31 +000014827 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +000014828 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014829 else
14830 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Ronald Oussoren75912852010-04-08 08:13:31 +000014831 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +000014832 if test "$enable_framework" ; then
14833 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014834 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14835 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +000014836 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014837 else
14838 # No framework, use the Python app as bundle-loader
14839 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14840 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +000014841 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014842 fi
14843 fi
14844 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +000014845 Linux*|GNU*|QNX*)
14846 LDSHARED='$(CC) -shared'
14847 LDCXXSHARED='$(CXX) -shared';;
14848 BSD/OS*/4*)
14849 LDSHARED="gcc -shared"
14850 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014851 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014852 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014853 then
Benjamin Peterson3b2abe92010-03-14 15:06:14 +000014854 LDSHARED='$(CC) -shared ${LDFLAGS}'
Ronald Oussoren75912852010-04-08 08:13:31 +000014855 LDCXXSHARED='$(CXX) -shared ${LDFLAGS}'
Guido van Rossum0286ae82000-08-29 15:06:49 +000014856 else
14857 LDSHARED="ld -Bshareable ${LDFLAGS}"
14858 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014859 OpenBSD*)
14860 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14861 then
14862 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Ronald Oussoren75912852010-04-08 08:13:31 +000014863 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Martin v. Löwis222c5152006-06-03 07:37:13 +000014864 else
14865 case `uname -r` in
14866 [01].* | 2.[0-7] | 2.[0-7].*)
14867 LDSHARED="ld -Bshareable ${LDFLAGS}"
14868 ;;
14869 *)
14870 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Ronald Oussoren75912852010-04-08 08:13:31 +000014871 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Martin v. Löwis222c5152006-06-03 07:37:13 +000014872 ;;
14873 esac
14874 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +000014875 NetBSD*|DragonFly*)
14876 LDSHARED="cc -shared ${LDFLAGS}"
14877 LDCXXSHARED="c++ -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014878 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +000014879 if test "$GCC" = "yes" ; then
14880 LDSHARED='$(CC) -shared'
14881 LDCXXSHARED='$(CXX) -shared'
14882 else
14883 LDSHARED='$(CC) -G'
14884 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014885 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +000014886 SCO_SV*)
14887 LDSHARED='$(CC) -Wl,-G,-Bexport'
14888 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
14889 CYGWIN*)
14890 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
14891 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
14892 atheos*)
14893 LDSHARED="gcc -shared"
14894 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014895 *) LDSHARED="ld";;
14896 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014897fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014898{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14899echo "${ECHO_T}$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +000014900LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014901BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014902# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014903# library (module) -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014904{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14905echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014906if test -z "$CCSHARED"
14907then
Guido van Rossum07397971997-04-29 21:49:50 +000014908 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014909 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000014910 then CCSHARED="-fPIC";
14911 elif test `uname -p` = sparc;
14912 then CCSHARED="-xcode=pic32";
14913 else CCSHARED="-Kpic";
14914 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014915 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014916 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014917 else CCSHARED="+z";
14918 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014919 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014920 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014921 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014922 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014923 if test "$GCC" = "yes"
14924 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014925 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014926 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014927 SCO_SV*)
14928 if test "$GCC" = "yes"
14929 then CCSHARED="-fPIC"
14930 else CCSHARED="-Kpic -belf"
14931 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014932 IRIX*/6*) case $CC in
14933 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014934 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014935 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014936 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014937 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014938fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014939{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14940echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014941# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014942# the python executable -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014943{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14944echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014945if test -z "$LINKFORSHARED"
14946then
Guido van Rossum07397971997-04-29 21:49:50 +000014947 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014948 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014949 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014950 LINKFORSHARED="-Wl,-E -Wl,+s";;
14951# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014952 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014953 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014954 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014955 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014956 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
14957 # which is
Jack Jansene578a632001-08-15 01:27:14 +000014958 # not used by the core itself but which needs to be in the core so
14959 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000014960 # -prebind is no longer used, because it actually seems to give a
14961 # slowdown in stead of a speedup, maybe due to the large number of
14962 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014963
14964 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000014965 if test "$enable_framework"
14966 then
Jack Jansenda49e192005-01-07 13:08:22 +000014967 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014968 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014969 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014970 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014971 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014972 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014973 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014974 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14975 then
14976 LINKFORSHARED="-Wl,--export-dynamic"
14977 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014978 SunOS/5*) case $CC in
14979 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014980 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014981 then
14982 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014983 fi;;
14984 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014985 CYGWIN*)
14986 if test $enable_shared = "no"
14987 then
14988 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14989 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014990 QNX*)
14991 # -Wl,-E causes the symbols to be added to the dynamic
14992 # symbol table so that they can be found when a module
14993 # is loaded. -N 2048K causes the stack size to be set
14994 # to 2048 kilobytes so that the stack doesn't overflow
14995 # when running test_compile.py.
14996 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014997 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014998fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014999{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
15000echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000015001
Michael W. Hudson54241132001-12-07 15:38:26 +000015002
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000015003
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015004{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
15005echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015006if test ! "$LIBRARY" = "$LDLIBRARY"
15007then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000015008 case $ac_sys_system in
15009 CYGWIN*)
15010 # Cygwin needs CCSHARED when building extension DLLs
15011 # but not when building the interpreter DLL.
15012 CFLAGSFORSHARED='';;
15013 *)
15014 CFLAGSFORSHARED='$(CCSHARED)'
15015 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015016fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015017{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
15018echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015019
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015020# SHLIBS are libraries (except -lc and -lm) to link to the python shared
15021# library (with --enable-shared).
15022# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000015023# symbols, this must be set to $(LIBS) (expanded by make). We do this even
15024# if it is not required, since it creates a dependency of the shared library
15025# to LIBS. This, in turn, means that applications linking the shared libpython
15026# don't need to link LIBS explicitly. The default should be only changed
15027# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015028
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015029{ echo "$as_me:$LINENO: checking SHLIBS" >&5
15030echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015031case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015032 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000015033 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015034esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015035{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
15036echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015037
15038
Guido van Rossum627b2d71993-12-24 10:39:16 +000015039# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000015040
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015041{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
15042echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015043if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015044 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015045else
Martin v. Löwis11437992002-04-12 09:54:03 +000015046 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015047LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015048cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015049/* confdefs.h. */
15050_ACEOF
15051cat confdefs.h >>conftest.$ac_ext
15052cat >>conftest.$ac_ext <<_ACEOF
15053/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015054
Martin v. Löwiseba40652007-08-30 20:10:57 +000015055/* Override any GCC internal prototype to avoid an error.
15056 Use char because int might match the return type of a GCC
15057 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015058#ifdef __cplusplus
15059extern "C"
15060#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015061char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015062int
15063main ()
15064{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015065return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015066 ;
15067 return 0;
15068}
15069_ACEOF
15070rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015071if { (ac_try="$ac_link"
15072case "(($ac_try" in
15073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15074 *) ac_try_echo=$ac_try;;
15075esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015077 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015078 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015079 grep -v '^ *+' conftest.er1 >conftest.err
15080 rm -f conftest.er1
15081 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015083 (exit $ac_status); } && {
15084 test -z "$ac_c_werror_flag" ||
15085 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015086 } && test -s conftest$ac_exeext &&
15087 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015088 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015089else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015090 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015091sed 's/^/| /' conftest.$ac_ext >&5
15092
Martin v. Löwiseba40652007-08-30 20:10:57 +000015093 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015094fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015095
15096rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015097 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015098LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015099fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015100{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
15101echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
15102if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015103 cat >>confdefs.h <<_ACEOF
15104#define HAVE_LIBDL 1
15105_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015106
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015107 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015108
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015109fi
15110 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000015111
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015112{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
15113echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015114if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015115 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015116else
Martin v. Löwis11437992002-04-12 09:54:03 +000015117 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015118LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015119cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015120/* confdefs.h. */
15121_ACEOF
15122cat confdefs.h >>conftest.$ac_ext
15123cat >>conftest.$ac_ext <<_ACEOF
15124/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015125
Martin v. Löwiseba40652007-08-30 20:10:57 +000015126/* Override any GCC internal prototype to avoid an error.
15127 Use char because int might match the return type of a GCC
15128 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015129#ifdef __cplusplus
15130extern "C"
15131#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015132char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015133int
15134main ()
15135{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015136return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015137 ;
15138 return 0;
15139}
15140_ACEOF
15141rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015142if { (ac_try="$ac_link"
15143case "(($ac_try" in
15144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15145 *) ac_try_echo=$ac_try;;
15146esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015148 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015149 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015150 grep -v '^ *+' conftest.er1 >conftest.err
15151 rm -f conftest.er1
15152 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015154 (exit $ac_status); } && {
15155 test -z "$ac_c_werror_flag" ||
15156 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015157 } && test -s conftest$ac_exeext &&
15158 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015159 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015160else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015161 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015162sed 's/^/| /' conftest.$ac_ext >&5
15163
Martin v. Löwiseba40652007-08-30 20:10:57 +000015164 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015165fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015166
15167rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015168 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015169LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015170fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015171{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
15172echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
15173if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015174 cat >>confdefs.h <<_ACEOF
15175#define HAVE_LIBDLD 1
15176_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015177
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015178 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015179
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015180fi
15181 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000015182
Ronald Oussoren79f90492009-01-02 10:44:46 +000015183# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000015184if test "$with_threads" = "yes" -o -z "$with_threads"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015185 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
15186echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015187if test "${ac_cv_search_sem_init+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015188 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015189else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015190 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000015191cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015192/* confdefs.h. */
15193_ACEOF
15194cat confdefs.h >>conftest.$ac_ext
15195cat >>conftest.$ac_ext <<_ACEOF
15196/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015197
Martin v. Löwiseba40652007-08-30 20:10:57 +000015198/* Override any GCC internal prototype to avoid an error.
15199 Use char because int might match the return type of a GCC
15200 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015201#ifdef __cplusplus
15202extern "C"
15203#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015204char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015205int
15206main ()
15207{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015208return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015209 ;
15210 return 0;
15211}
15212_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015213for ac_lib in '' pthread rt posix4; do
15214 if test -z "$ac_lib"; then
15215 ac_res="none required"
15216 else
15217 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000015218 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015219 fi
15220 rm -f conftest.$ac_objext conftest$ac_exeext
15221if { (ac_try="$ac_link"
15222case "(($ac_try" in
15223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15224 *) ac_try_echo=$ac_try;;
15225esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015227 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000015228 ac_status=$?
15229 grep -v '^ *+' conftest.er1 >conftest.err
15230 rm -f conftest.er1
15231 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015233 (exit $ac_status); } && {
15234 test -z "$ac_c_werror_flag" ||
15235 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015236 } && test -s conftest$ac_exeext &&
15237 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015238 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000015239else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015240 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015241sed 's/^/| /' conftest.$ac_ext >&5
15242
Martin v. Löwiseba40652007-08-30 20:10:57 +000015243
Brett Cannon19fab762007-06-02 03:02:29 +000015244fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015245
15246rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15247 conftest$ac_exeext
15248 if test "${ac_cv_search_sem_init+set}" = set; then
15249 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000015250fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015251done
15252if test "${ac_cv_search_sem_init+set}" = set; then
15253 :
15254else
15255 ac_cv_search_sem_init=no
15256fi
15257rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015258LIBS=$ac_func_search_save_LIBS
15259fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015260{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15261echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015262ac_res=$ac_cv_search_sem_init
15263if test "$ac_res" != no; then
15264 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015265
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015266fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015267 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015268 # posix4 on Solaris 2.6
15269 # pthread (first!) on Linux
15270fi
15271
Martin v. Löwis19d17342003-06-14 21:03:05 +000015272# check if we need libintl for locale functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015273{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15274echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015275if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015276 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015277else
15278 ac_check_lib_save_LIBS=$LIBS
15279LIBS="-lintl $LIBS"
15280cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015281/* confdefs.h. */
15282_ACEOF
15283cat confdefs.h >>conftest.$ac_ext
15284cat >>conftest.$ac_ext <<_ACEOF
15285/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015286
Martin v. Löwiseba40652007-08-30 20:10:57 +000015287/* Override any GCC internal prototype to avoid an error.
15288 Use char because int might match the return type of a GCC
15289 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015290#ifdef __cplusplus
15291extern "C"
15292#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015293char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015294int
15295main ()
15296{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015297return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015298 ;
15299 return 0;
15300}
15301_ACEOF
15302rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015303if { (ac_try="$ac_link"
15304case "(($ac_try" in
15305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15306 *) ac_try_echo=$ac_try;;
15307esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015308eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015309 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015310 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015311 grep -v '^ *+' conftest.er1 >conftest.err
15312 rm -f conftest.er1
15313 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015315 (exit $ac_status); } && {
15316 test -z "$ac_c_werror_flag" ||
15317 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015318 } && test -s conftest$ac_exeext &&
15319 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015320 ac_cv_lib_intl_textdomain=yes
15321else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015322 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015323sed 's/^/| /' conftest.$ac_ext >&5
15324
Martin v. Löwiseba40652007-08-30 20:10:57 +000015325 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015326fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015327
15328rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015329 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015330LIBS=$ac_check_lib_save_LIBS
15331fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015332{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15333echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15334if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015335
15336cat >>confdefs.h <<\_ACEOF
15337#define WITH_LIBINTL 1
15338_ACEOF
15339
15340fi
15341
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015342
15343# checks for system dependent C++ extensions support
15344case "$ac_sys_system" in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015345 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15346echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015347 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015348/* confdefs.h. */
15349_ACEOF
15350cat confdefs.h >>conftest.$ac_ext
15351cat >>conftest.$ac_ext <<_ACEOF
15352/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015353#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015354int
15355main ()
15356{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015357loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015358 ;
15359 return 0;
15360}
15361_ACEOF
15362rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015363if { (ac_try="$ac_link"
15364case "(($ac_try" in
15365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15366 *) ac_try_echo=$ac_try;;
15367esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015369 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015370 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015371 grep -v '^ *+' conftest.er1 >conftest.err
15372 rm -f conftest.er1
15373 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015375 (exit $ac_status); } && {
15376 test -z "$ac_c_werror_flag" ||
15377 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015378 } && test -s conftest$ac_exeext &&
15379 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015380
Martin v. Löwis11437992002-04-12 09:54:03 +000015381cat >>confdefs.h <<\_ACEOF
15382#define AIX_GENUINE_CPLUSPLUS 1
15383_ACEOF
15384
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015385 { echo "$as_me:$LINENO: result: yes" >&5
15386echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015387else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015388 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015389sed 's/^/| /' conftest.$ac_ext >&5
15390
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015391 { echo "$as_me:$LINENO: result: no" >&5
15392echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015393fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015394
15395rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015396 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015397 *) ;;
15398esac
15399
Guido van Rossum70c7f481998-03-26 18:44:10 +000015400# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015401# BeOS' sockets are stashed in libnet.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015402{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15403echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015404if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015405 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015406else
Martin v. Löwis11437992002-04-12 09:54:03 +000015407 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015408LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015409cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015410/* confdefs.h. */
15411_ACEOF
15412cat confdefs.h >>conftest.$ac_ext
15413cat >>conftest.$ac_ext <<_ACEOF
15414/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015415
Martin v. Löwiseba40652007-08-30 20:10:57 +000015416/* Override any GCC internal prototype to avoid an error.
15417 Use char because int might match the return type of a GCC
15418 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015419#ifdef __cplusplus
15420extern "C"
15421#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015422char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015423int
15424main ()
15425{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015426return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015427 ;
15428 return 0;
15429}
15430_ACEOF
15431rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015432if { (ac_try="$ac_link"
15433case "(($ac_try" in
15434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15435 *) ac_try_echo=$ac_try;;
15436esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015438 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015439 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015440 grep -v '^ *+' conftest.er1 >conftest.err
15441 rm -f conftest.er1
15442 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015444 (exit $ac_status); } && {
15445 test -z "$ac_c_werror_flag" ||
15446 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015447 } && test -s conftest$ac_exeext &&
15448 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015449 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015450else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015451 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015452sed 's/^/| /' conftest.$ac_ext >&5
15453
Martin v. Löwiseba40652007-08-30 20:10:57 +000015454 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015455fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015456
15457rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015458 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015459LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015460fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015461{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15462echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15463if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015464 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015465fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015466 # SVR4
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015467{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15468echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015469if test "${ac_cv_lib_socket_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015470 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015471else
Martin v. Löwis11437992002-04-12 09:54:03 +000015472 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015473LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015474cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015475/* confdefs.h. */
15476_ACEOF
15477cat confdefs.h >>conftest.$ac_ext
15478cat >>conftest.$ac_ext <<_ACEOF
15479/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015480
Martin v. Löwiseba40652007-08-30 20:10:57 +000015481/* Override any GCC internal prototype to avoid an error.
15482 Use char because int might match the return type of a GCC
15483 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015484#ifdef __cplusplus
15485extern "C"
15486#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015487char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015488int
15489main ()
15490{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015491return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015492 ;
15493 return 0;
15494}
15495_ACEOF
15496rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015497if { (ac_try="$ac_link"
15498case "(($ac_try" in
15499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15500 *) ac_try_echo=$ac_try;;
15501esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015503 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015504 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015505 grep -v '^ *+' conftest.er1 >conftest.err
15506 rm -f conftest.er1
15507 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015509 (exit $ac_status); } && {
15510 test -z "$ac_c_werror_flag" ||
15511 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015512 } && test -s conftest$ac_exeext &&
15513 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015514 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015515else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015516 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015517sed 's/^/| /' conftest.$ac_ext >&5
15518
Martin v. Löwiseba40652007-08-30 20:10:57 +000015519 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015520fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015521
15522rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015523 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015524LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015525fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015526{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15527echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15528if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015529 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015530fi
15531 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015532
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000015533case "$ac_sys_system" in
15534BeOS*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015535{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
15536echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015537if test "${ac_cv_lib_net_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015538 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015539else
Martin v. Löwis11437992002-04-12 09:54:03 +000015540 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015541LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015542cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015543/* confdefs.h. */
15544_ACEOF
15545cat confdefs.h >>conftest.$ac_ext
15546cat >>conftest.$ac_ext <<_ACEOF
15547/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015548
Martin v. Löwiseba40652007-08-30 20:10:57 +000015549/* Override any GCC internal prototype to avoid an error.
15550 Use char because int might match the return type of a GCC
15551 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015552#ifdef __cplusplus
15553extern "C"
15554#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015555char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015556int
15557main ()
15558{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015559return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015560 ;
15561 return 0;
15562}
15563_ACEOF
15564rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015565if { (ac_try="$ac_link"
15566case "(($ac_try" in
15567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15568 *) ac_try_echo=$ac_try;;
15569esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015571 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015572 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015573 grep -v '^ *+' conftest.er1 >conftest.err
15574 rm -f conftest.er1
15575 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015577 (exit $ac_status); } && {
15578 test -z "$ac_c_werror_flag" ||
15579 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015580 } && test -s conftest$ac_exeext &&
15581 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015582 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015583else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015584 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015585sed 's/^/| /' conftest.$ac_ext >&5
15586
Martin v. Löwiseba40652007-08-30 20:10:57 +000015587 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000015588fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015589
15590rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015591 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015592LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015593fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015594{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
15595echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
15596if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015597 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015598fi
15599 # BeOS
15600;;
15601esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000015602
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015603{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15604echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015605
Martin v. Löwiseba40652007-08-30 20:10:57 +000015606# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015607if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015608 withval=$with_libs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015609{ echo "$as_me:$LINENO: result: $withval" >&5
15610echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015611LIBS="$withval $LIBS"
15612
15613else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015614 { echo "$as_me:$LINENO: result: no" >&5
15615echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015616fi
15617
Guido van Rossum7f43da71994-08-01 12:15:30 +000015618
Benjamin Petersone9e07bf2010-03-09 21:46:54 +000015619if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +000015620 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
15621set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
15622{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15623echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15624if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
15625 echo $ECHO_N "(cached) $ECHO_C" >&6
15626else
15627 case $PKG_CONFIG in
15628 [\\/]* | ?:[\\/]*)
15629 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
15630 ;;
15631 *)
15632 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15633for as_dir in $PATH
15634do
15635 IFS=$as_save_IFS
15636 test -z "$as_dir" && as_dir=.
15637 for ac_exec_ext in '' $ac_executable_extensions; do
15638 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15639 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15640 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15641 break 2
15642 fi
15643done
15644done
15645IFS=$as_save_IFS
15646
15647 ;;
15648esac
15649fi
15650PKG_CONFIG=$ac_cv_path_PKG_CONFIG
15651if test -n "$PKG_CONFIG"; then
15652 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
15653echo "${ECHO_T}$PKG_CONFIG" >&6; }
15654else
15655 { echo "$as_me:$LINENO: result: no" >&5
15656echo "${ECHO_T}no" >&6; }
15657fi
15658
15659
15660fi
15661if test -z "$ac_cv_path_PKG_CONFIG"; then
15662 ac_pt_PKG_CONFIG=$PKG_CONFIG
15663 # Extract the first word of "pkg-config", so it can be a program name with args.
15664set dummy pkg-config; ac_word=$2
15665{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15666echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15667if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
15668 echo $ECHO_N "(cached) $ECHO_C" >&6
15669else
15670 case $ac_pt_PKG_CONFIG in
15671 [\\/]* | ?:[\\/]*)
15672 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
15673 ;;
15674 *)
15675 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15676for as_dir in $PATH
15677do
15678 IFS=$as_save_IFS
15679 test -z "$as_dir" && as_dir=.
15680 for ac_exec_ext in '' $ac_executable_extensions; do
15681 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15682 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15683 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15684 break 2
15685 fi
15686done
15687done
15688IFS=$as_save_IFS
15689
15690 ;;
15691esac
15692fi
15693ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
15694if test -n "$ac_pt_PKG_CONFIG"; then
15695 { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
15696echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
15697else
15698 { echo "$as_me:$LINENO: result: no" >&5
15699echo "${ECHO_T}no" >&6; }
15700fi
15701
15702 if test "x$ac_pt_PKG_CONFIG" = x; then
15703 PKG_CONFIG=""
15704 else
15705 case $cross_compiling:$ac_tool_warned in
15706yes:)
15707{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
15708whose name does not start with the host triplet. If you think this
15709configuration is useful to you, please write to autoconf@gnu.org." >&5
15710echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
15711whose name does not start with the host triplet. If you think this
15712configuration is useful to you, please write to autoconf@gnu.org." >&2;}
15713ac_tool_warned=yes ;;
15714esac
15715 PKG_CONFIG=$ac_pt_PKG_CONFIG
15716 fi
15717else
15718 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
15719fi
15720
Benjamin Petersone9e07bf2010-03-09 21:46:54 +000015721
15722# Check for use of the system expat library
15723{ echo "$as_me:$LINENO: checking for --with-system-expat" >&5
15724echo $ECHO_N "checking for --with-system-expat... $ECHO_C" >&6; }
15725
15726# Check whether --with-system_expat was given.
15727if test "${with_system_expat+set}" = set; then
15728 withval=$with_system_expat;
15729fi
15730
15731
15732{ echo "$as_me:$LINENO: result: $with_system_expat" >&5
15733echo "${ECHO_T}$with_system_expat" >&6; }
15734
15735# Check for use of the system libffi library
15736{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15737echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
15738
15739# Check whether --with-system_ffi was given.
15740if test "${with_system_ffi+set}" = set; then
15741 withval=$with_system_ffi;
15742fi
15743
15744
15745if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +000015746 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
15747else
15748 LIBFFI_INCLUDEDIR=""
15749fi
15750
15751
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015752{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15753echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015754
Benjamin Peterson867475c2009-04-29 20:36:25 +000015755# Check for --with-dbmliborder
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015756{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15757echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015758
15759# Check whether --with-dbmliborder was given.
15760if test "${with_dbmliborder+set}" = set; then
15761 withval=$with_dbmliborder;
15762if test x$with_dbmliborder = xyes
15763then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015764{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15765echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015766 { (exit 1); exit 1; }; }
15767else
15768 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15769 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15770 then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015771 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15772echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015773 { (exit 1); exit 1; }; }
15774 fi
15775 done
15776fi
15777fi
15778
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015779{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15780echo "${ECHO_T}$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015781
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015782# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015783
15784
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015785{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15786echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015787
Martin v. Löwiseba40652007-08-30 20:10:57 +000015788# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015789if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015790 withval=$with_signal_module;
15791fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015792
15793
15794if test -z "$with_signal_module"
15795then with_signal_module="yes"
15796fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015797{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15798echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015799
15800if test "${with_signal_module}" = "yes"; then
15801 USE_SIGNAL_MODULE=""
15802 SIGNAL_OBJS=""
15803else
15804 USE_SIGNAL_MODULE="#"
15805 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15806fi
15807
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015808# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015809
Barry Warsawc0d24d82000-06-29 16:12:00 +000015810USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015811
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015812{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15813echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015814
Guido van Rossumec2f0731997-01-22 20:54:01 +000015815
Martin v. Löwiseba40652007-08-30 20:10:57 +000015816# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015817if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015818 withval=$with_dec_threads;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015819{ echo "$as_me:$LINENO: result: $withval" >&5
15820echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015821LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015822if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015823 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015824fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015825else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015826 { echo "$as_me:$LINENO: result: no" >&5
15827echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015828fi
15829
Martin v. Löwis11437992002-04-12 09:54:03 +000015830
15831# Templates for things AC_DEFINEd more than once.
15832# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015833
15834
Martin v. Löwis11437992002-04-12 09:54:03 +000015835
15836
15837
15838
15839
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015840{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15841echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015842
Martin v. Löwiseba40652007-08-30 20:10:57 +000015843# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015844if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015845 withval=$with_threads;
15846fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015847
15848
Barry Warsawc0d24d82000-06-29 16:12:00 +000015849# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015850
Martin v. Löwiseba40652007-08-30 20:10:57 +000015851# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015852if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015853 withval=$with_thread; with_threads=$with_thread
15854fi
15855
Barry Warsawc0d24d82000-06-29 16:12:00 +000015856
15857if test -z "$with_threads"
15858then with_threads="yes"
15859fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015860{ echo "$as_me:$LINENO: result: $with_threads" >&5
15861echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000015862
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015863
Barry Warsawc0d24d82000-06-29 16:12:00 +000015864if test "$with_threads" = "no"
15865then
15866 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015867elif test "$ac_cv_pthread_is_default" = yes
15868then
Martin v. Löwis11437992002-04-12 09:54:03 +000015869 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015870#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015871_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015872
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015873 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015874 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015875#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015876_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015877
15878 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015879 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015880elif test "$ac_cv_kpthread" = "yes"
15881then
15882 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015883 if test "$ac_cv_cxx_thread" = "yes"; then
15884 CXX="$CXX -Kpthread"
15885 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015886 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015887#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015888_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015889
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015890 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015891 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015892elif test "$ac_cv_kthread" = "yes"
15893then
15894 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015895 if test "$ac_cv_cxx_thread" = "yes"; then
15896 CXX="$CXX -Kthread"
15897 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015898 cat >>confdefs.h <<\_ACEOF
15899#define WITH_THREAD 1
15900_ACEOF
15901
15902 posix_threads=yes
15903 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015904elif test "$ac_cv_pthread" = "yes"
15905then
15906 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015907 if test "$ac_cv_cxx_thread" = "yes"; then
15908 CXX="$CXX -pthread"
15909 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015910 cat >>confdefs.h <<\_ACEOF
15911#define WITH_THREAD 1
15912_ACEOF
15913
15914 posix_threads=yes
15915 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015916else
15917 if test ! -z "$with_threads" -a -d "$with_threads"
15918 then LDFLAGS="$LDFLAGS -L$with_threads"
15919 fi
15920 if test ! -z "$withval" -a -d "$withval"
15921 then LDFLAGS="$LDFLAGS -L$withval"
15922 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015923
15924 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015925 # define _POSIX_THREADS in unistd.h. Some apparently don't
15926 # (e.g. gnu pth with pthread emulation)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015927 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15928echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015929 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015930/* confdefs.h. */
15931_ACEOF
15932cat confdefs.h >>conftest.$ac_ext
15933cat >>conftest.$ac_ext <<_ACEOF
15934/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015935
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015936#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015937#ifdef _POSIX_THREADS
15938yes
15939#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015940
15941_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015942if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015943 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015944 unistd_defines_pthreads=yes
15945else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015946 unistd_defines_pthreads=no
15947fi
Ronald Oussoren75912852010-04-08 08:13:31 +000015948rm -f -r conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015949
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015950 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15951echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015952
Martin v. Löwis11437992002-04-12 09:54:03 +000015953 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015954#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015955_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015956
Martin v. Löwis11437992002-04-12 09:54:03 +000015957 if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015958 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15959echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015960if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015961 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015962fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015963{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15964echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015965else
Martin v. Löwis11437992002-04-12 09:54:03 +000015966 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015967{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15968echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015969cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015970/* confdefs.h. */
15971_ACEOF
15972cat confdefs.h >>conftest.$ac_ext
15973cat >>conftest.$ac_ext <<_ACEOF
15974/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015975$ac_includes_default
15976#include <cthreads.h>
15977_ACEOF
15978rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015979if { (ac_try="$ac_compile"
15980case "(($ac_try" in
15981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15982 *) ac_try_echo=$ac_try;;
15983esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015985 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015986 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015987 grep -v '^ *+' conftest.er1 >conftest.err
15988 rm -f conftest.er1
15989 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015991 (exit $ac_status); } && {
15992 test -z "$ac_c_werror_flag" ||
15993 test ! -s conftest.err
15994 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015995 ac_header_compiler=yes
15996else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015997 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015998sed 's/^/| /' conftest.$ac_ext >&5
15999
Martin v. Löwiseba40652007-08-30 20:10:57 +000016000 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016001fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016002
16003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016004{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16005echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016006
16007# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016008{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
16009echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016010cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016011/* confdefs.h. */
16012_ACEOF
16013cat confdefs.h >>conftest.$ac_ext
16014cat >>conftest.$ac_ext <<_ACEOF
16015/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016016#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016017_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016018if { (ac_try="$ac_cpp conftest.$ac_ext"
16019case "(($ac_try" in
16020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16021 *) ac_try_echo=$ac_try;;
16022esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016024 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016025 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016026 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016027 rm -f conftest.er1
16028 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016030 (exit $ac_status); } >/dev/null && {
16031 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16032 test ! -s conftest.err
16033 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016034 ac_header_preproc=yes
16035else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016036 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016037sed 's/^/| /' conftest.$ac_ext >&5
16038
Martin v. Löwis11437992002-04-12 09:54:03 +000016039 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016040fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016041
Martin v. Löwis11437992002-04-12 09:54:03 +000016042rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016043{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16044echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016045
16046# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016047case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16048 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016049 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16050echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16051 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
16052echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016053 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016054 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016055 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016056 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
16057echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
16058 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
16059echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
16060 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
16061echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
16062 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
16063echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16064 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
16065echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
16066 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
16067echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016068 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016069## -------------------------------------- ##
16070## Report this to http://bugs.python.org/ ##
16071## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016072_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016073 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016074 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016075esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016076{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
16077echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016078if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016079 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016080else
16081 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016082fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016083{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
16084echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016085
16086fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016087if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016088 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016089#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016090_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016091
Martin v. Löwis11437992002-04-12 09:54:03 +000016092 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016093#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016094_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016095
Martin v. Löwis11437992002-04-12 09:54:03 +000016096
16097cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016098#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016099_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016100
16101 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016102 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016103else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016104
Martin v. Löwis11437992002-04-12 09:54:03 +000016105 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016106 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16107echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016108if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016109 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016110fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016111{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16112echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016113else
Martin v. Löwis11437992002-04-12 09:54:03 +000016114 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016115{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
16116echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016117cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016118/* confdefs.h. */
16119_ACEOF
16120cat confdefs.h >>conftest.$ac_ext
16121cat >>conftest.$ac_ext <<_ACEOF
16122/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016123$ac_includes_default
16124#include <mach/cthreads.h>
16125_ACEOF
16126rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016127if { (ac_try="$ac_compile"
16128case "(($ac_try" in
16129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16130 *) ac_try_echo=$ac_try;;
16131esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016133 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016134 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016135 grep -v '^ *+' conftest.er1 >conftest.err
16136 rm -f conftest.er1
16137 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016139 (exit $ac_status); } && {
16140 test -z "$ac_c_werror_flag" ||
16141 test ! -s conftest.err
16142 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016143 ac_header_compiler=yes
16144else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016145 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016146sed 's/^/| /' conftest.$ac_ext >&5
16147
Martin v. Löwiseba40652007-08-30 20:10:57 +000016148 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016149fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016150
16151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016152{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16153echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016154
16155# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016156{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
16157echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016158cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016159/* confdefs.h. */
16160_ACEOF
16161cat confdefs.h >>conftest.$ac_ext
16162cat >>conftest.$ac_ext <<_ACEOF
16163/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016164#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016165_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016166if { (ac_try="$ac_cpp conftest.$ac_ext"
16167case "(($ac_try" in
16168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16169 *) ac_try_echo=$ac_try;;
16170esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016172 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016173 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016174 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016175 rm -f conftest.er1
16176 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016178 (exit $ac_status); } >/dev/null && {
16179 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16180 test ! -s conftest.err
16181 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016182 ac_header_preproc=yes
16183else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016184 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016185sed 's/^/| /' conftest.$ac_ext >&5
16186
Martin v. Löwis11437992002-04-12 09:54:03 +000016187 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016188fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016189
Martin v. Löwis11437992002-04-12 09:54:03 +000016190rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016191{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16192echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016193
16194# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016195case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16196 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016197 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16198echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16199 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
16200echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016201 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016202 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016203 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016204 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
16205echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
16206 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
16207echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
16208 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
16209echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
16210 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
16211echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16212 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
16213echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
16214 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
16215echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016216 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016217## -------------------------------------- ##
16218## Report this to http://bugs.python.org/ ##
16219## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016220_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016221 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016222 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016223esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016224{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16225echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016226if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016227 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016228else
16229 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016230fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016231{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16232echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016233
16234fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016235if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016236 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016237#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016238_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016239
Martin v. Löwis11437992002-04-12 09:54:03 +000016240 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016241#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016242_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016243
Martin v. Löwis11437992002-04-12 09:54:03 +000016244
16245cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016246#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016247_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016248
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016249 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016250else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016251
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016252 { echo "$as_me:$LINENO: checking for --with-pth" >&5
16253echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016254
Martin v. Löwiseba40652007-08-30 20:10:57 +000016255# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016256if test "${with_pth+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016257 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
16258echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016259 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016260#define WITH_THREAD 1
16261_ACEOF
16262
16263
16264cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016265#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016266_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016267
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016268 LIBS="-lpth $LIBS"
16269 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016270else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016271 { echo "$as_me:$LINENO: result: no" >&5
16272echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016273
16274 # Just looking for pthread_create in libpthread is not enough:
16275 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
16276 # So we really have to include pthread.h, and then link.
16277 _libs=$LIBS
16278 LIBS="$LIBS -lpthread"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016279 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16280echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016281 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016282/* confdefs.h. */
16283_ACEOF
16284cat confdefs.h >>conftest.$ac_ext
16285cat >>conftest.$ac_ext <<_ACEOF
16286/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016287#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000016288
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016289void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000016290int
16291main ()
16292{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016293
16294pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000016295 ;
16296 return 0;
16297}
16298_ACEOF
16299rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016300if { (ac_try="$ac_link"
16301case "(($ac_try" in
16302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16303 *) ac_try_echo=$ac_try;;
16304esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016306 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016307 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016308 grep -v '^ *+' conftest.er1 >conftest.err
16309 rm -f conftest.er1
16310 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016312 (exit $ac_status); } && {
16313 test -z "$ac_c_werror_flag" ||
16314 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016315 } && test -s conftest$ac_exeext &&
16316 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016317
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016318 { echo "$as_me:$LINENO: result: yes" >&5
16319echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016320 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016321#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016322_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016323
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016324 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016325 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016326else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016327 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016328sed 's/^/| /' conftest.$ac_ext >&5
16329
Martin v. Löwis11437992002-04-12 09:54:03 +000016330
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016331 LIBS=$_libs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016332 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
16333echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016334if test "${ac_cv_func_pthread_detach+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016335 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016336else
Martin v. Löwis11437992002-04-12 09:54:03 +000016337 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016338/* confdefs.h. */
16339_ACEOF
16340cat confdefs.h >>conftest.$ac_ext
16341cat >>conftest.$ac_ext <<_ACEOF
16342/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016343/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16344 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16345#define pthread_detach innocuous_pthread_detach
16346
Guido van Rossumad678af1998-10-02 14:42:15 +000016347/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016348 which can conflict with char pthread_detach (); below.
16349 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016350 <limits.h> exists even on freestanding compilers. */
16351
16352#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016353# include <limits.h>
16354#else
16355# include <assert.h>
16356#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016357
16358#undef pthread_detach
16359
Martin v. Löwiseba40652007-08-30 20:10:57 +000016360/* Override any GCC internal prototype to avoid an error.
16361 Use char because int might match the return type of a GCC
16362 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016363#ifdef __cplusplus
16364extern "C"
16365#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016366char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016367/* The GNU C library defines this for functions which it implements
16368 to always fail with ENOSYS. Some functions are actually named
16369 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016370#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016371choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016372#endif
16373
Skip Montanaro6dead952003-09-25 14:50:04 +000016374int
16375main ()
16376{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016377return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016378 ;
16379 return 0;
16380}
16381_ACEOF
16382rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016383if { (ac_try="$ac_link"
16384case "(($ac_try" in
16385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16386 *) ac_try_echo=$ac_try;;
16387esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016389 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016390 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016391 grep -v '^ *+' conftest.er1 >conftest.err
16392 rm -f conftest.er1
16393 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016395 (exit $ac_status); } && {
16396 test -z "$ac_c_werror_flag" ||
16397 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016398 } && test -s conftest$ac_exeext &&
16399 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016400 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016401else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016402 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016403sed 's/^/| /' conftest.$ac_ext >&5
16404
Martin v. Löwiseba40652007-08-30 20:10:57 +000016405 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016406fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016407
16408rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016409 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016410fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016411{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16412echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16413if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016414 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016415#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016416_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016417
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016418 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016419 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016420else
Guido van Rossumad678af1998-10-02 14:42:15 +000016421
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016422 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016423 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16424echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016425if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016426 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016427fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016428{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16429echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016430else
16431 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016432{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
16433echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016434cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016435/* confdefs.h. */
16436_ACEOF
16437cat confdefs.h >>conftest.$ac_ext
16438cat >>conftest.$ac_ext <<_ACEOF
16439/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016440$ac_includes_default
16441#include <atheos/threads.h>
16442_ACEOF
16443rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016444if { (ac_try="$ac_compile"
16445case "(($ac_try" in
16446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16447 *) ac_try_echo=$ac_try;;
16448esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016449eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016450 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016451 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016452 grep -v '^ *+' conftest.er1 >conftest.err
16453 rm -f conftest.er1
16454 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016456 (exit $ac_status); } && {
16457 test -z "$ac_c_werror_flag" ||
16458 test ! -s conftest.err
16459 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016460 ac_header_compiler=yes
16461else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016462 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016463sed 's/^/| /' conftest.$ac_ext >&5
16464
Martin v. Löwiseba40652007-08-30 20:10:57 +000016465 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016466fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016467
16468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016469{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16470echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016471
16472# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016473{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
16474echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016475cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016476/* confdefs.h. */
16477_ACEOF
16478cat confdefs.h >>conftest.$ac_ext
16479cat >>conftest.$ac_ext <<_ACEOF
16480/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016481#include <atheos/threads.h>
16482_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016483if { (ac_try="$ac_cpp conftest.$ac_ext"
16484case "(($ac_try" in
16485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16486 *) ac_try_echo=$ac_try;;
16487esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016489 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016490 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016491 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016492 rm -f conftest.er1
16493 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016495 (exit $ac_status); } >/dev/null && {
16496 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16497 test ! -s conftest.err
16498 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016499 ac_header_preproc=yes
16500else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016501 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016502sed 's/^/| /' conftest.$ac_ext >&5
16503
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016504 ac_header_preproc=no
16505fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016506
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016507rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016508{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16509echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016510
16511# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016512case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16513 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016514 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16515echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16516 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
16517echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016518 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016519 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016520 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016521 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
16522echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
16523 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
16524echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
16525 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
16526echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
16527 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
16528echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16529 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
16530echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
16531 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
16532echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016533 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016534## -------------------------------------- ##
16535## Report this to http://bugs.python.org/ ##
16536## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016537_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016538 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016539 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016540esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016541{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16542echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016543if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016544 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016545else
16546 ac_cv_header_atheos_threads_h=$ac_header_preproc
16547fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016548{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16549echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016550
16551fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016552if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016553 cat >>confdefs.h <<\_ACEOF
16554#define WITH_THREAD 1
16555_ACEOF
16556
16557
16558cat >>confdefs.h <<\_ACEOF
16559#define ATHEOS_THREADS 1
16560_ACEOF
16561
16562 THREADOBJ="Python/thread.o"
16563else
16564
Martin v. Löwis11437992002-04-12 09:54:03 +000016565 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016566 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16567echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016568if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016569 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016570fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016571{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16572echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016573else
Martin v. Löwis11437992002-04-12 09:54:03 +000016574 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016575{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
16576echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016577cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016578/* confdefs.h. */
16579_ACEOF
16580cat confdefs.h >>conftest.$ac_ext
16581cat >>conftest.$ac_ext <<_ACEOF
16582/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016583$ac_includes_default
16584#include <kernel/OS.h>
16585_ACEOF
16586rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016587if { (ac_try="$ac_compile"
16588case "(($ac_try" in
16589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16590 *) ac_try_echo=$ac_try;;
16591esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016593 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016594 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016595 grep -v '^ *+' conftest.er1 >conftest.err
16596 rm -f conftest.er1
16597 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016599 (exit $ac_status); } && {
16600 test -z "$ac_c_werror_flag" ||
16601 test ! -s conftest.err
16602 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016603 ac_header_compiler=yes
16604else
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_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016609fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016610
16611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016612{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16613echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016614
16615# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016616{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
16617echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016618cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016619/* confdefs.h. */
16620_ACEOF
16621cat confdefs.h >>conftest.$ac_ext
16622cat >>conftest.$ac_ext <<_ACEOF
16623/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016624#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016625_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016626if { (ac_try="$ac_cpp conftest.$ac_ext"
16627case "(($ac_try" in
16628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16629 *) ac_try_echo=$ac_try;;
16630esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016632 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016633 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016634 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016635 rm -f conftest.er1
16636 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016638 (exit $ac_status); } >/dev/null && {
16639 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16640 test ! -s conftest.err
16641 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016642 ac_header_preproc=yes
16643else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016644 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016645sed 's/^/| /' conftest.$ac_ext >&5
16646
Martin v. Löwis11437992002-04-12 09:54:03 +000016647 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016648fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016649
Martin v. Löwis11437992002-04-12 09:54:03 +000016650rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016651{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16652echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016653
Martin v. Löwis11437992002-04-12 09:54:03 +000016654# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016655case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16656 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016657 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
16658echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16659 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
16660echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016661 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016662 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016663 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016664 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
16665echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
16666 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
16667echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
16668 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
16669echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
16670 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
16671echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
16672 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
16673echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
16674 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
16675echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016676 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016677## -------------------------------------- ##
16678## Report this to http://bugs.python.org/ ##
16679## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016680_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016681 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016682 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016683esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016684{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16685echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016686if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016687 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016688else
16689 ac_cv_header_kernel_OS_h=$ac_header_preproc
16690fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016691{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16692echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016693
16694fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016695if test $ac_cv_header_kernel_OS_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016696 cat >>confdefs.h <<\_ACEOF
16697#define WITH_THREAD 1
16698_ACEOF
16699
16700
16701cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016702#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016703_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016704
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016705 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016706else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016707
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016708 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16709echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016710if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016711 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016712else
Martin v. Löwis11437992002-04-12 09:54:03 +000016713 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016714LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016715cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016716/* confdefs.h. */
16717_ACEOF
16718cat confdefs.h >>conftest.$ac_ext
16719cat >>conftest.$ac_ext <<_ACEOF
16720/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016721
Martin v. Löwiseba40652007-08-30 20:10:57 +000016722/* Override any GCC internal prototype to avoid an error.
16723 Use char because int might match the return type of a GCC
16724 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016725#ifdef __cplusplus
16726extern "C"
16727#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016728char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016729int
16730main ()
16731{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016732return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016733 ;
16734 return 0;
16735}
16736_ACEOF
16737rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016738if { (ac_try="$ac_link"
16739case "(($ac_try" in
16740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16741 *) ac_try_echo=$ac_try;;
16742esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016744 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016745 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016746 grep -v '^ *+' conftest.er1 >conftest.err
16747 rm -f conftest.er1
16748 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016750 (exit $ac_status); } && {
16751 test -z "$ac_c_werror_flag" ||
16752 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016753 } && test -s conftest$ac_exeext &&
16754 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016755 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016756else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016757 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016758sed 's/^/| /' conftest.$ac_ext >&5
16759
Martin v. Löwiseba40652007-08-30 20:10:57 +000016760 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016761fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016762
16763rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016764 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016765LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016766fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016767{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16768echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16769if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016770 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016771#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016772_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016773
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016774 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016775 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016776 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016777else
Greg Steinadf63d62000-07-05 10:38:09 +000016778
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016779 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16780echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016781if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016782 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016783else
Martin v. Löwis11437992002-04-12 09:54:03 +000016784 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016785LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016786cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016787/* confdefs.h. */
16788_ACEOF
16789cat confdefs.h >>conftest.$ac_ext
16790cat >>conftest.$ac_ext <<_ACEOF
16791/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016792
Martin v. Löwiseba40652007-08-30 20:10:57 +000016793/* Override any GCC internal prototype to avoid an error.
16794 Use char because int might match the return type of a GCC
16795 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016796#ifdef __cplusplus
16797extern "C"
16798#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016799char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016800int
16801main ()
16802{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016803return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016804 ;
16805 return 0;
16806}
16807_ACEOF
16808rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016809if { (ac_try="$ac_link"
16810case "(($ac_try" in
16811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16812 *) ac_try_echo=$ac_try;;
16813esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016815 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016816 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016817 grep -v '^ *+' conftest.er1 >conftest.err
16818 rm -f conftest.er1
16819 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016821 (exit $ac_status); } && {
16822 test -z "$ac_c_werror_flag" ||
16823 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016824 } && test -s conftest$ac_exeext &&
16825 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016826 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016827else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016828 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016829sed 's/^/| /' conftest.$ac_ext >&5
16830
Martin v. Löwiseba40652007-08-30 20:10:57 +000016831 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016832fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016833
16834rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016835 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016836LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016837fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016838{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16839echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16840if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016841 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016842#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016843_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016844
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016845 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016846 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016847 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016848else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016849
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016850 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16851echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016852if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016853 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016854else
Martin v. Löwis11437992002-04-12 09:54:03 +000016855 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016856LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016857cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016858/* confdefs.h. */
16859_ACEOF
16860cat confdefs.h >>conftest.$ac_ext
16861cat >>conftest.$ac_ext <<_ACEOF
16862/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016863
Martin v. Löwiseba40652007-08-30 20:10:57 +000016864/* Override any GCC internal prototype to avoid an error.
16865 Use char because int might match the return type of a GCC
16866 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016867#ifdef __cplusplus
16868extern "C"
16869#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016870char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016871int
16872main ()
16873{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016874return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016875 ;
16876 return 0;
16877}
16878_ACEOF
16879rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016880if { (ac_try="$ac_link"
16881case "(($ac_try" in
16882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16883 *) ac_try_echo=$ac_try;;
16884esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016886 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016887 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016888 grep -v '^ *+' conftest.er1 >conftest.err
16889 rm -f conftest.er1
16890 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016892 (exit $ac_status); } && {
16893 test -z "$ac_c_werror_flag" ||
16894 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016895 } && test -s conftest$ac_exeext &&
16896 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016897 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016898else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016899 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016900sed 's/^/| /' conftest.$ac_ext >&5
16901
Martin v. Löwiseba40652007-08-30 20:10:57 +000016902 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016903fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016904
16905rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016906 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016907LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016908fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016909{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16910echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16911if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016912 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016913#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016914_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016915
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016916 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016917 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016918 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016919else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016920
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016921 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16922echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016923if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016924 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016925else
Martin v. Löwis11437992002-04-12 09:54:03 +000016926 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016927LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016928cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016929/* confdefs.h. */
16930_ACEOF
16931cat confdefs.h >>conftest.$ac_ext
16932cat >>conftest.$ac_ext <<_ACEOF
16933/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016934
Martin v. Löwiseba40652007-08-30 20:10:57 +000016935/* Override any GCC internal prototype to avoid an error.
16936 Use char because int might match the return type of a GCC
16937 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016938#ifdef __cplusplus
16939extern "C"
16940#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016941char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016942int
16943main ()
16944{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016945return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016946 ;
16947 return 0;
16948}
16949_ACEOF
16950rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016951if { (ac_try="$ac_link"
16952case "(($ac_try" in
16953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16954 *) ac_try_echo=$ac_try;;
16955esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016957 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016958 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016959 grep -v '^ *+' conftest.er1 >conftest.err
16960 rm -f conftest.er1
16961 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016963 (exit $ac_status); } && {
16964 test -z "$ac_c_werror_flag" ||
16965 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016966 } && test -s conftest$ac_exeext &&
16967 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016968 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016969else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016970 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016971sed 's/^/| /' conftest.$ac_ext >&5
16972
Martin v. Löwiseba40652007-08-30 20:10:57 +000016973 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016974fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016975
16976rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016977 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016978LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016979fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016980{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16981echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16982if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016983 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016984#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016985_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016986
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016987 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016988 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016989 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016990else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016991
Martin v. Löwis130fb172001-07-19 11:00:41 +000016992 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016993fi
16994
Guido van Rossum627b2d71993-12-24 10:39:16 +000016995
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016996fi
16997
Guido van Rossum0be3e491997-05-22 20:33:33 +000016998fi
16999
Guido van Rossum49545951997-12-02 19:28:29 +000017000fi
17001
Guido van Rossumb93a8621998-05-07 13:27:32 +000017002fi
17003
Guido van Rossum07bd90e2000-05-08 13:41:38 +000017004
Michael W. Hudson54241132001-12-07 15:38:26 +000017005fi
17006
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017007
17008fi
17009
Martin v. Löwisa6e97582002-01-01 18:41:33 +000017010fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017011
17012rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017013 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017014fi
17015
Martin v. Löwis11437992002-04-12 09:54:03 +000017016fi
17017
17018
17019fi
17020
Martin v. Löwisa6e97582002-01-01 18:41:33 +000017021
Michael W. Hudson54241132001-12-07 15:38:26 +000017022
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017023 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
17024echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017025if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017026 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017027else
Martin v. Löwis11437992002-04-12 09:54:03 +000017028 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017029LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017030cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017031/* confdefs.h. */
17032_ACEOF
17033cat confdefs.h >>conftest.$ac_ext
17034cat >>conftest.$ac_ext <<_ACEOF
17035/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017036
Martin v. Löwiseba40652007-08-30 20:10:57 +000017037/* Override any GCC internal prototype to avoid an error.
17038 Use char because int might match the return type of a GCC
17039 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017040#ifdef __cplusplus
17041extern "C"
17042#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017043char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017044int
17045main ()
17046{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017047return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017048 ;
17049 return 0;
17050}
17051_ACEOF
17052rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017053if { (ac_try="$ac_link"
17054case "(($ac_try" in
17055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17056 *) ac_try_echo=$ac_try;;
17057esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017059 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017060 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017061 grep -v '^ *+' conftest.er1 >conftest.err
17062 rm -f conftest.er1
17063 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017065 (exit $ac_status); } && {
17066 test -z "$ac_c_werror_flag" ||
17067 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017068 } && test -s conftest$ac_exeext &&
17069 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017070 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017071else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017072 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017073sed 's/^/| /' conftest.$ac_ext >&5
17074
Martin v. Löwiseba40652007-08-30 20:10:57 +000017075 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017076fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017077
17078rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017079 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017080LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017081fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017082{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
17083echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
17084if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017085 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017086#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017087_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017088
Martin v. Löwis130fb172001-07-19 11:00:41 +000017089 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000017090 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000017091 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000017092fi
17093
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017094
Neal Norwitza978ab02002-11-02 16:58:05 +000017095 if test "$posix_threads" != "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017096 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
17097echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017098if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017099 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017100else
Martin v. Löwis11437992002-04-12 09:54:03 +000017101 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017102LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017103cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017104/* confdefs.h. */
17105_ACEOF
17106cat confdefs.h >>conftest.$ac_ext
17107cat >>conftest.$ac_ext <<_ACEOF
17108/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017109
Martin v. Löwiseba40652007-08-30 20:10:57 +000017110/* Override any GCC internal prototype to avoid an error.
17111 Use char because int might match the return type of a GCC
17112 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017113#ifdef __cplusplus
17114extern "C"
17115#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017116char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017117int
17118main ()
17119{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017120return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017121 ;
17122 return 0;
17123}
17124_ACEOF
17125rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017126if { (ac_try="$ac_link"
17127case "(($ac_try" in
17128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17129 *) ac_try_echo=$ac_try;;
17130esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017132 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017133 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017134 grep -v '^ *+' conftest.er1 >conftest.err
17135 rm -f conftest.er1
17136 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017138 (exit $ac_status); } && {
17139 test -z "$ac_c_werror_flag" ||
17140 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017141 } && test -s conftest$ac_exeext &&
17142 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017143 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017144else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017145 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017146sed 's/^/| /' conftest.$ac_ext >&5
17147
Martin v. Löwiseba40652007-08-30 20:10:57 +000017148 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017149fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017150
17151rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017152 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017153LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017154fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017155{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
17156echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
17157if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017158 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017159#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017160_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017161
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017162 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000017163 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017164 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000017165fi
17166
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017167 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017168
Martin v. Löwis130fb172001-07-19 11:00:41 +000017169 if test "$USE_THREAD_MODULE" != "#"
17170 then
17171 # If the above checks didn't disable threads, (at least) OSF1
17172 # needs this '-threads' argument during linking.
17173 case $ac_sys_system in
17174 OSF1) LDLAST=-threads;;
17175 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000017176 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017177fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017178
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017179if test "$posix_threads" = "yes"; then
17180 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017181
17182cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017183#define _POSIX_THREADS 1
17184_ACEOF
17185
17186 fi
17187
17188 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
17189 case $ac_sys_system/$ac_sys_release in
17190 SunOS/5.6)
17191cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017192#define HAVE_PTHREAD_DESTRUCTOR 1
17193_ACEOF
17194
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017195 ;;
17196 SunOS/5.8)
17197cat >>confdefs.h <<\_ACEOF
17198#define HAVE_BROKEN_POSIX_SEMAPHORES 1
17199_ACEOF
17200
17201 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000017202 AIX/5)
17203cat >>confdefs.h <<\_ACEOF
17204#define HAVE_BROKEN_POSIX_SEMAPHORES 1
17205_ACEOF
17206
17207 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017208 esac
17209
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017210 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
17211echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017212 if test "${ac_cv_pthread_system_supported+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017213 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017214else
17215 if test "$cross_compiling" = yes; then
17216 ac_cv_pthread_system_supported=no
17217else
17218 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017219/* confdefs.h. */
17220_ACEOF
17221cat confdefs.h >>conftest.$ac_ext
17222cat >>conftest.$ac_ext <<_ACEOF
17223/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017224#include <pthread.h>
17225 void *foo(void *parm) {
17226 return NULL;
17227 }
17228 main() {
17229 pthread_attr_t attr;
17230 pthread_t id;
17231 if (pthread_attr_init(&attr)) exit(-1);
17232 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
17233 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
17234 exit(0);
17235 }
17236_ACEOF
17237rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017238if { (ac_try="$ac_link"
17239case "(($ac_try" in
17240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17241 *) ac_try_echo=$ac_try;;
17242esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017244 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017245 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017247 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017248 { (case "(($ac_try" in
17249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17250 *) ac_try_echo=$ac_try;;
17251esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017253 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017254 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017256 (exit $ac_status); }; }; then
17257 ac_cv_pthread_system_supported=yes
17258else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017259 echo "$as_me: program exited with status $ac_status" >&5
17260echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017261sed 's/^/| /' conftest.$ac_ext >&5
17262
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017263( exit $ac_status )
17264ac_cv_pthread_system_supported=no
17265fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017266rm -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 +000017267fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017268
Martin v. Löwiseba40652007-08-30 20:10:57 +000017269
17270
Guido van Rossum627b2d71993-12-24 10:39:16 +000017271fi
17272
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017273 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
17274echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017275 if test "$ac_cv_pthread_system_supported" = "yes"; then
17276
17277cat >>confdefs.h <<\_ACEOF
17278#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
17279_ACEOF
17280
17281 fi
17282
17283for ac_func in pthread_sigmask
17284do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017285as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17286{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17287echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017288if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017289 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017290else
17291 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017292/* confdefs.h. */
17293_ACEOF
17294cat confdefs.h >>conftest.$ac_ext
17295cat >>conftest.$ac_ext <<_ACEOF
17296/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017297/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17298 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17299#define $ac_func innocuous_$ac_func
17300
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017301/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017302 which can conflict with char $ac_func (); below.
17303 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017304 <limits.h> exists even on freestanding compilers. */
17305
17306#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017307# include <limits.h>
17308#else
17309# include <assert.h>
17310#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017311
17312#undef $ac_func
17313
Martin v. Löwiseba40652007-08-30 20:10:57 +000017314/* Override any GCC internal prototype to avoid an error.
17315 Use char because int might match the return type of a GCC
17316 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017317#ifdef __cplusplus
17318extern "C"
17319#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017320char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017321/* The GNU C library defines this for functions which it implements
17322 to always fail with ENOSYS. Some functions are actually named
17323 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017324#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017325choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017326#endif
17327
Skip Montanaro6dead952003-09-25 14:50:04 +000017328int
17329main ()
17330{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017331return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017332 ;
17333 return 0;
17334}
17335_ACEOF
17336rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017337if { (ac_try="$ac_link"
17338case "(($ac_try" in
17339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17340 *) ac_try_echo=$ac_try;;
17341esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017343 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017344 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017345 grep -v '^ *+' conftest.er1 >conftest.err
17346 rm -f conftest.er1
17347 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017349 (exit $ac_status); } && {
17350 test -z "$ac_c_werror_flag" ||
17351 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017352 } && test -s conftest$ac_exeext &&
17353 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017354 eval "$as_ac_var=yes"
17355else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017356 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017357sed 's/^/| /' conftest.$ac_ext >&5
17358
Martin v. Löwiseba40652007-08-30 20:10:57 +000017359 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017360fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017361
17362rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017363 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017364fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017365ac_res=`eval echo '${'$as_ac_var'}'`
17366 { echo "$as_me:$LINENO: result: $ac_res" >&5
17367echo "${ECHO_T}$ac_res" >&6; }
17368if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017369 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017370#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017371_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000017372 case $ac_sys_system in
17373 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017374
Jason Tishlerfac083d2003-07-22 15:20:49 +000017375cat >>confdefs.h <<\_ACEOF
17376#define HAVE_BROKEN_PTHREAD_SIGMASK 1
17377_ACEOF
17378
17379 ;;
17380 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017381fi
17382done
17383
17384fi
17385
17386
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017387# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000017388
17389
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017390{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
17391echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017392# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017393if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017394 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017395 no)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017396 { echo "$as_me:$LINENO: result: no" >&5
17397echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017398 ipv6=no
17399 ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017400 *) { echo "$as_me:$LINENO: result: yes" >&5
17401echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017402 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017403#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017404_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017405
17406 ipv6=yes
17407 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017408 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017409else
Martin v. Löwis11437992002-04-12 09:54:03 +000017410
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017411 if test "$cross_compiling" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017412 { echo "$as_me:$LINENO: result: no" >&5
17413echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017414 ipv6=no
17415
17416else
Martin v. Löwis11437992002-04-12 09:54:03 +000017417 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017418/* confdefs.h. */
17419_ACEOF
17420cat confdefs.h >>conftest.$ac_ext
17421cat >>conftest.$ac_ext <<_ACEOF
17422/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017423 /* AF_INET6 available check */
17424#include <sys/types.h>
17425#include <sys/socket.h>
17426main()
17427{
17428 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
17429 exit(1);
17430 else
17431 exit(0);
17432}
17433
Martin v. Löwis11437992002-04-12 09:54:03 +000017434_ACEOF
17435rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017436if { (ac_try="$ac_link"
17437case "(($ac_try" in
17438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17439 *) ac_try_echo=$ac_try;;
17440esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017442 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017443 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017445 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017446 { (case "(($ac_try" in
17447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17448 *) ac_try_echo=$ac_try;;
17449esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017451 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017452 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017454 (exit $ac_status); }; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017455 { echo "$as_me:$LINENO: result: yes" >&5
17456echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017457 ipv6=yes
17458else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017459 echo "$as_me: program exited with status $ac_status" >&5
17460echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017461sed 's/^/| /' conftest.$ac_ext >&5
17462
Martin v. Löwis11437992002-04-12 09:54:03 +000017463( exit $ac_status )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017464{ echo "$as_me:$LINENO: result: no" >&5
17465echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017466 ipv6=no
17467fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017468rm -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 +000017469fi
17470
Martin v. Löwiseba40652007-08-30 20:10:57 +000017471
17472
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017473if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017474 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
17475echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017476 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017477/* confdefs.h. */
17478_ACEOF
17479cat confdefs.h >>conftest.$ac_ext
17480cat >>conftest.$ac_ext <<_ACEOF
17481/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017482#include <sys/types.h>
17483#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017484int
17485main ()
17486{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017487struct sockaddr_in6 x;
17488x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000017489 ;
17490 return 0;
17491}
17492_ACEOF
17493rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017494if { (ac_try="$ac_compile"
17495case "(($ac_try" in
17496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17497 *) ac_try_echo=$ac_try;;
17498esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017499eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017500 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017501 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017502 grep -v '^ *+' conftest.er1 >conftest.err
17503 rm -f conftest.er1
17504 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017506 (exit $ac_status); } && {
17507 test -z "$ac_c_werror_flag" ||
17508 test ! -s conftest.err
17509 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017510 { echo "$as_me:$LINENO: result: yes" >&5
17511echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017512 ipv6=yes
17513else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017514 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017515sed 's/^/| /' conftest.$ac_ext >&5
17516
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017517 { echo "$as_me:$LINENO: result: no" >&5
17518echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017519 ipv6=no
17520fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017521
17522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017523fi
17524
17525if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017526 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017527#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017528_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017529
17530fi
17531
Martin v. Löwiseba40652007-08-30 20:10:57 +000017532fi
17533
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017534
17535ipv6type=unknown
17536ipv6lib=none
17537ipv6trylibc=no
17538
17539if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017540 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17541echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017542 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17543 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017544 case $i in
17545 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017546 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017547/* confdefs.h. */
17548_ACEOF
17549cat confdefs.h >>conftest.$ac_ext
17550cat >>conftest.$ac_ext <<_ACEOF
17551/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017552
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017553#include <netinet/in.h>
17554#ifdef IPV6_INRIA_VERSION
17555yes
17556#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017557_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017558if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017559 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017560 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017561fi
Ronald Oussoren75912852010-04-08 08:13:31 +000017562rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017563
17564 ;;
17565 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017566 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017567/* confdefs.h. */
17568_ACEOF
17569cat confdefs.h >>conftest.$ac_ext
17570cat >>conftest.$ac_ext <<_ACEOF
17571/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017572
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017573#include <netinet/in.h>
17574#ifdef __KAME__
17575yes
17576#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017577_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017578if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017579 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017580 ipv6type=$i;
17581 ipv6lib=inet6
17582 ipv6libdir=/usr/local/v6/lib
17583 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017584fi
Ronald Oussoren75912852010-04-08 08:13:31 +000017585rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017586
17587 ;;
17588 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017589 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017590/* confdefs.h. */
17591_ACEOF
17592cat confdefs.h >>conftest.$ac_ext
17593cat >>conftest.$ac_ext <<_ACEOF
17594/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017595
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017596#include <features.h>
17597#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17598yes
17599#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017600_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017601if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017602 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017603 ipv6type=$i;
17604 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017605fi
Ronald Oussoren75912852010-04-08 08:13:31 +000017606rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017607
17608 ;;
17609 linux-inet6)
17610 if test -d /usr/inet6; then
17611 ipv6type=$i
17612 ipv6lib=inet6
17613 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017614 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017615 fi
17616 ;;
17617 solaris)
17618 if test -f /etc/netconfig; then
17619 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17620 ipv6type=$i
17621 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017622 fi
17623 fi
17624 ;;
17625 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017626 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017627/* confdefs.h. */
17628_ACEOF
17629cat confdefs.h >>conftest.$ac_ext
17630cat >>conftest.$ac_ext <<_ACEOF
17631/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017632
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017633#include <sys/param.h>
17634#ifdef _TOSHIBA_INET6
17635yes
17636#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017637_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017638if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017639 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017640 ipv6type=$i;
17641 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017642 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017643fi
Ronald Oussoren75912852010-04-08 08:13:31 +000017644rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017645
17646 ;;
17647 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017648 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017649/* confdefs.h. */
17650_ACEOF
17651cat confdefs.h >>conftest.$ac_ext
17652cat >>conftest.$ac_ext <<_ACEOF
17653/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017654
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017655#include </usr/local/v6/include/sys/v6config.h>
17656#ifdef __V6D__
17657yes
17658#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017659_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017660if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017661 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017662 ipv6type=$i;
17663 ipv6lib=v6;
17664 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017665 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017666fi
Ronald Oussoren75912852010-04-08 08:13:31 +000017667rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017668
17669 ;;
17670 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017671 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017672/* confdefs.h. */
17673_ACEOF
17674cat confdefs.h >>conftest.$ac_ext
17675cat >>conftest.$ac_ext <<_ACEOF
17676/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017677
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017678#include <sys/param.h>
17679#ifdef _ZETA_MINAMI_INET6
17680yes
17681#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017682_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017683if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017684 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017685 ipv6type=$i;
17686 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017687 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017688fi
Ronald Oussoren75912852010-04-08 08:13:31 +000017689rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017690
17691 ;;
17692 esac
17693 if test "$ipv6type" != "unknown"; then
17694 break
17695 fi
17696 done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017697 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17698echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017699fi
17700
17701if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17702 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17703 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17704 echo "using lib$ipv6lib"
17705 else
17706 if test $ipv6trylibc = "yes"; then
17707 echo "using libc"
17708 else
17709 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17710 echo "You need to fetch lib$ipv6lib.a from appropriate"
17711 echo 'ipv6 kit and compile beforehand.'
17712 exit 1
17713 fi
17714 fi
17715fi
17716
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017717{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17718echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017719cat >conftest.$ac_ext <<_ACEOF
17720/* confdefs.h. */
17721_ACEOF
17722cat confdefs.h >>conftest.$ac_ext
17723cat >>conftest.$ac_ext <<_ACEOF
17724/* end confdefs.h. */
17725#include <Carbon/Carbon.h>
17726int
17727main ()
17728{
17729FSIORefNum fRef = 0
17730 ;
17731 return 0;
17732}
17733_ACEOF
17734rm -f conftest.$ac_objext
17735if { (ac_try="$ac_compile"
17736case "(($ac_try" in
17737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17738 *) ac_try_echo=$ac_try;;
17739esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017741 (eval "$ac_compile") 2>conftest.er1
17742 ac_status=$?
17743 grep -v '^ *+' conftest.er1 >conftest.err
17744 rm -f conftest.er1
17745 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017747 (exit $ac_status); } && {
17748 test -z "$ac_c_werror_flag" ||
17749 test ! -s conftest.err
17750 } && test -s conftest.$ac_objext; then
17751
17752cat >>confdefs.h <<\_ACEOF
17753#define HAVE_OSX105_SDK 1
17754_ACEOF
17755
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017756 { echo "$as_me:$LINENO: result: yes" >&5
17757echo "${ECHO_T}yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017758else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017759 echo "$as_me: failed program was:" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017760sed 's/^/| /' conftest.$ac_ext >&5
17761
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017762 { echo "$as_me:$LINENO: result: no" >&5
17763echo "${ECHO_T}no" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017764
17765fi
17766
17767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17768
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017769# Check for --with-doc-strings
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017770{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17771echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017772
Martin v. Löwiseba40652007-08-30 20:10:57 +000017773# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017774if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017775 withval=$with_doc_strings;
17776fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017777
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017778
17779if test -z "$with_doc_strings"
17780then with_doc_strings="yes"
17781fi
17782if test "$with_doc_strings" != "no"
17783then
17784
17785cat >>confdefs.h <<\_ACEOF
17786#define WITH_DOC_STRINGS 1
17787_ACEOF
17788
17789fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017790{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17791echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017792
Neil Schemenauera35c6882001-02-27 04:45:05 +000017793# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017794{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17795echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017796
Martin v. Löwiseba40652007-08-30 20:10:57 +000017797# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017798if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017799 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017800if test "$withval" != no
17801then
17802
17803cat >>confdefs.h <<\_ACEOF
17804#define WITH_TSC 1
17805_ACEOF
17806
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017807 { echo "$as_me:$LINENO: result: yes" >&5
17808echo "${ECHO_T}yes" >&6; }
17809else { echo "$as_me:$LINENO: result: no" >&5
17810echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017811fi
17812else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017813 { echo "$as_me:$LINENO: result: no" >&5
17814echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017815fi
17816
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017817
17818# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017819{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17820echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017821
Martin v. Löwiseba40652007-08-30 20:10:57 +000017822# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017823if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017824 withval=$with_pymalloc;
17825fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017826
Neil Schemenauera35c6882001-02-27 04:45:05 +000017827
Neil Schemenauer16c22972002-03-22 15:34:49 +000017828if test -z "$with_pymalloc"
17829then with_pymalloc="yes"
17830fi
17831if test "$with_pymalloc" != "no"
17832then
Martin v. Löwis11437992002-04-12 09:54:03 +000017833
17834cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017835#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017836_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017837
17838fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017839{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17840echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017841
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000017842# Check for Valgrind support
17843{ echo "$as_me:$LINENO: checking for --with-valgrind" >&5
17844echo $ECHO_N "checking for --with-valgrind... $ECHO_C" >&6; }
17845
17846# Check whether --with-valgrind was given.
17847if test "${with_valgrind+set}" = set; then
17848 withval=$with_valgrind;
17849else
17850 with_valgrind=no
17851fi
17852
17853{ echo "$as_me:$LINENO: result: $with_valgrind" >&5
17854echo "${ECHO_T}$with_valgrind" >&6; }
17855if test "$with_valgrind" != no; then
17856 if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17857 { echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17858echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17859if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17860 echo $ECHO_N "(cached) $ECHO_C" >&6
17861fi
17862{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17863echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17864else
17865 # Is the header compilable?
17866{ echo "$as_me:$LINENO: checking valgrind/valgrind.h usability" >&5
17867echo $ECHO_N "checking valgrind/valgrind.h usability... $ECHO_C" >&6; }
17868cat >conftest.$ac_ext <<_ACEOF
17869/* confdefs.h. */
17870_ACEOF
17871cat confdefs.h >>conftest.$ac_ext
17872cat >>conftest.$ac_ext <<_ACEOF
17873/* end confdefs.h. */
17874$ac_includes_default
17875#include <valgrind/valgrind.h>
17876_ACEOF
17877rm -f conftest.$ac_objext
17878if { (ac_try="$ac_compile"
17879case "(($ac_try" in
17880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17881 *) ac_try_echo=$ac_try;;
17882esac
17883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17884 (eval "$ac_compile") 2>conftest.er1
17885 ac_status=$?
17886 grep -v '^ *+' conftest.er1 >conftest.err
17887 rm -f conftest.er1
17888 cat conftest.err >&5
17889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17890 (exit $ac_status); } && {
17891 test -z "$ac_c_werror_flag" ||
17892 test ! -s conftest.err
17893 } && test -s conftest.$ac_objext; then
17894 ac_header_compiler=yes
17895else
17896 echo "$as_me: failed program was:" >&5
17897sed 's/^/| /' conftest.$ac_ext >&5
17898
17899 ac_header_compiler=no
17900fi
17901
17902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17903{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17904echo "${ECHO_T}$ac_header_compiler" >&6; }
17905
17906# Is the header present?
17907{ echo "$as_me:$LINENO: checking valgrind/valgrind.h presence" >&5
17908echo $ECHO_N "checking valgrind/valgrind.h presence... $ECHO_C" >&6; }
17909cat >conftest.$ac_ext <<_ACEOF
17910/* confdefs.h. */
17911_ACEOF
17912cat confdefs.h >>conftest.$ac_ext
17913cat >>conftest.$ac_ext <<_ACEOF
17914/* end confdefs.h. */
17915#include <valgrind/valgrind.h>
17916_ACEOF
17917if { (ac_try="$ac_cpp conftest.$ac_ext"
17918case "(($ac_try" in
17919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17920 *) ac_try_echo=$ac_try;;
17921esac
17922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17923 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17924 ac_status=$?
17925 grep -v '^ *+' conftest.er1 >conftest.err
17926 rm -f conftest.er1
17927 cat conftest.err >&5
17928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17929 (exit $ac_status); } >/dev/null && {
17930 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17931 test ! -s conftest.err
17932 }; then
17933 ac_header_preproc=yes
17934else
17935 echo "$as_me: failed program was:" >&5
17936sed 's/^/| /' conftest.$ac_ext >&5
17937
17938 ac_header_preproc=no
17939fi
17940
17941rm -f conftest.err conftest.$ac_ext
17942{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17943echo "${ECHO_T}$ac_header_preproc" >&6; }
17944
17945# So? What about this header?
17946case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17947 yes:no: )
17948 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
17949echo "$as_me: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17950 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&5
17951echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&2;}
17952 ac_header_preproc=yes
17953 ;;
17954 no:yes:* )
17955 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&5
17956echo "$as_me: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&2;}
17957 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&5
17958echo "$as_me: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&2;}
17959 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&5
17960echo "$as_me: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&2;}
17961 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
17962echo "$as_me: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
17963 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&5
17964echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&2;}
17965 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&5
17966echo "$as_me: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&2;}
17967 ( cat <<\_ASBOX
17968## -------------------------------------- ##
17969## Report this to http://bugs.python.org/ ##
17970## -------------------------------------- ##
17971_ASBOX
17972 ) | sed "s/^/$as_me: WARNING: /" >&2
17973 ;;
17974esac
17975{ echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17976echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17977if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17978 echo $ECHO_N "(cached) $ECHO_C" >&6
17979else
17980 ac_cv_header_valgrind_valgrind_h=$ac_header_preproc
17981fi
17982{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17983echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17984
17985fi
17986if test $ac_cv_header_valgrind_valgrind_h = yes; then
17987
17988cat >>confdefs.h <<\_ACEOF
17989#define WITH_VALGRIND 1
17990_ACEOF
17991
17992else
17993 { { echo "$as_me:$LINENO: error: Valgrind support requested but headers not available" >&5
17994echo "$as_me: error: Valgrind support requested but headers not available" >&2;}
17995 { (exit 1); exit 1; }; }
17996
17997fi
17998
17999
18000fi
18001
Barry Warsawef82cd72000-06-30 16:21:01 +000018002# Check for --with-wctype-functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018003{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
18004echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018005
Martin v. Löwiseba40652007-08-30 20:10:57 +000018006# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000018007if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018008 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000018009if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000018010then
18011
18012cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000018013#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018014_ACEOF
18015
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018016 { echo "$as_me:$LINENO: result: yes" >&5
18017echo "${ECHO_T}yes" >&6; }
18018else { echo "$as_me:$LINENO: result: no" >&5
18019echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000018020fi
18021else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018022 { echo "$as_me:$LINENO: result: no" >&5
18023echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018024fi
18025
Barry Warsawef82cd72000-06-30 16:21:01 +000018026
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018027# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000018028
Guido van Rossum98935bf2001-09-05 19:13:16 +000018029DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000018030
Guido van Rossume97ee181999-12-20 21:27:22 +000018031# the dlopen() function means we might want to use dynload_shlib.o. some
18032# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000018033
Thomas Wouters3a584202000-08-05 23:28:51 +000018034for ac_func in dlopen
18035do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018036as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18037{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18038echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018039if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018040 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000018041else
Martin v. Löwis11437992002-04-12 09:54:03 +000018042 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018043/* confdefs.h. */
18044_ACEOF
18045cat confdefs.h >>conftest.$ac_ext
18046cat >>conftest.$ac_ext <<_ACEOF
18047/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018048/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18049 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18050#define $ac_func innocuous_$ac_func
18051
Guido van Rossume97ee181999-12-20 21:27:22 +000018052/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018053 which can conflict with char $ac_func (); below.
18054 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018055 <limits.h> exists even on freestanding compilers. */
18056
18057#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018058# include <limits.h>
18059#else
18060# include <assert.h>
18061#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018062
18063#undef $ac_func
18064
Martin v. Löwiseba40652007-08-30 20:10:57 +000018065/* Override any GCC internal prototype to avoid an error.
18066 Use char because int might match the return type of a GCC
18067 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018068#ifdef __cplusplus
18069extern "C"
18070#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018071char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000018072/* The GNU C library defines this for functions which it implements
18073 to always fail with ENOSYS. Some functions are actually named
18074 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018075#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000018076choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000018077#endif
18078
Skip Montanaro6dead952003-09-25 14:50:04 +000018079int
18080main ()
18081{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018082return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018083 ;
18084 return 0;
18085}
18086_ACEOF
18087rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018088if { (ac_try="$ac_link"
18089case "(($ac_try" in
18090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18091 *) ac_try_echo=$ac_try;;
18092esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018094 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018095 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018096 grep -v '^ *+' conftest.er1 >conftest.err
18097 rm -f conftest.er1
18098 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018100 (exit $ac_status); } && {
18101 test -z "$ac_c_werror_flag" ||
18102 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018103 } && test -s conftest$ac_exeext &&
18104 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018105 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018106else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018107 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018108sed 's/^/| /' conftest.$ac_ext >&5
18109
Martin v. Löwiseba40652007-08-30 20:10:57 +000018110 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018111fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018112
18113rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018114 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018115fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018116ac_res=`eval echo '${'$as_ac_var'}'`
18117 { echo "$as_me:$LINENO: result: $ac_res" >&5
18118echo "${ECHO_T}$ac_res" >&6; }
18119if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018120 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018121#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018122_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000018123
Guido van Rossume97ee181999-12-20 21:27:22 +000018124fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018125done
Guido van Rossume97ee181999-12-20 21:27:22 +000018126
Michael W. Hudson54241132001-12-07 15:38:26 +000018127
Guido van Rossume97ee181999-12-20 21:27:22 +000018128# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
18129# loading of modules.
18130
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018131{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
18132echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000018133if test -z "$DYNLOADFILE"
18134then
18135 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000018136 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
18137 if test "$ac_cv_func_dlopen" = yes
18138 then DYNLOADFILE="dynload_shlib.o"
18139 else DYNLOADFILE="dynload_aix.o"
18140 fi
18141 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000018142 BeOS*) DYNLOADFILE="dynload_beos.o";;
18143 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000018144 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
18145 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018146 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000018147 *)
18148 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
18149 # out any dynamic loading
18150 if test "$ac_cv_func_dlopen" = yes
18151 then DYNLOADFILE="dynload_shlib.o"
18152 else DYNLOADFILE="dynload_stub.o"
18153 fi
18154 ;;
18155 esac
18156fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018157{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
18158echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000018159if test "$DYNLOADFILE" != "dynload_stub.o"
18160then
Martin v. Löwis11437992002-04-12 09:54:03 +000018161
18162cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000018163#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018164_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000018165
18166fi
18167
Neil Schemenauer4e425612001-06-19 15:44:15 +000018168# MACHDEP_OBJS can be set to platform-specific object files needed by Python
18169
Michael W. Hudson54241132001-12-07 15:38:26 +000018170
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018171{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
18172echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000018173if test -z "$MACHDEP_OBJS"
18174then
Jack Jansene578a632001-08-15 01:27:14 +000018175 MACHDEP_OBJS=$extra_machdep_objs
18176else
18177 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000018178fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018179{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
18180echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000018181
Guido van Rossum627b2d71993-12-24 10:39:16 +000018182# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018183
18184
18185
18186
18187
18188
18189
18190
18191
18192
18193
18194
18195
18196
18197
18198
18199
18200
18201
18202
18203
18204
18205
18206
18207
18208
18209
18210
18211
18212
18213
18214
18215
18216
18217
18218
18219
18220
18221
18222
18223
18224
18225
18226
18227
18228
18229
18230
18231
18232
18233
18234
18235
18236
18237
18238
18239
18240
18241
18242
18243
18244
18245
18246
18247
18248
18249
18250
18251
18252
18253
Martin v. Löwisd6320502004-08-12 13:45:08 +000018254
Martin v. Löwisc3001752005-01-23 09:27:24 +000018255
18256
Neal Norwitz05a45592006-03-20 06:30:08 +000018257
18258
Martin v. Löwis382abef2007-02-19 10:55:19 +000018259
18260
Christian Heimes36281872007-11-30 21:11:28 +000018261
Martin v. Löwisaef18b12008-03-24 13:31:16 +000018262
18263
Jesse Noller355b1262009-04-02 00:03:28 +000018264
18265
18266
18267
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018268
18269
18270
18271
18272
18273
18274
18275
18276
18277
18278
18279
18280
Antoine Pitrou30b3b352009-12-02 20:37:54 +000018281
Martin v. Löwisaef18b12008-03-24 13:31:16 +000018282for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
18283 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000018284 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018285 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrou30b3b352009-12-02 20:37:54 +000018286 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000018287 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000018288 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000018289 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
18290 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000018291 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018292 setlocale setregid setreuid setresuid setresgid \
18293 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000018294 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000018295 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000018296 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000018297do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018298as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18299{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18300echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018301if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018302 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018303else
Martin v. Löwis11437992002-04-12 09:54:03 +000018304 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018305/* confdefs.h. */
18306_ACEOF
18307cat confdefs.h >>conftest.$ac_ext
18308cat >>conftest.$ac_ext <<_ACEOF
18309/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018310/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18311 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18312#define $ac_func innocuous_$ac_func
18313
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018314/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018315 which can conflict with char $ac_func (); below.
18316 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018317 <limits.h> exists even on freestanding compilers. */
18318
18319#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018320# include <limits.h>
18321#else
18322# include <assert.h>
18323#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018324
18325#undef $ac_func
18326
Martin v. Löwiseba40652007-08-30 20:10:57 +000018327/* Override any GCC internal prototype to avoid an error.
18328 Use char because int might match the return type of a GCC
18329 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018330#ifdef __cplusplus
18331extern "C"
18332#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018333char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018334/* The GNU C library defines this for functions which it implements
18335 to always fail with ENOSYS. Some functions are actually named
18336 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018337#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018338choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018339#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018340
Skip Montanaro6dead952003-09-25 14:50:04 +000018341int
18342main ()
18343{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018344return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018345 ;
18346 return 0;
18347}
18348_ACEOF
18349rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018350if { (ac_try="$ac_link"
18351case "(($ac_try" in
18352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18353 *) ac_try_echo=$ac_try;;
18354esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018356 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018357 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018358 grep -v '^ *+' conftest.er1 >conftest.err
18359 rm -f conftest.er1
18360 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018362 (exit $ac_status); } && {
18363 test -z "$ac_c_werror_flag" ||
18364 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018365 } && test -s conftest$ac_exeext &&
18366 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018367 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018368else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018369 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018370sed 's/^/| /' conftest.$ac_ext >&5
18371
Martin v. Löwiseba40652007-08-30 20:10:57 +000018372 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018373fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018374
18375rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018376 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018377fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018378ac_res=`eval echo '${'$as_ac_var'}'`
18379 { echo "$as_me:$LINENO: result: $ac_res" >&5
18380echo "${ECHO_T}$ac_res" >&6; }
18381if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018382 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018383#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018384_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018385
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018386fi
18387done
18388
Michael W. Hudson54241132001-12-07 15:38:26 +000018389
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018390# For some functions, having a definition is not sufficient, since
18391# we want to take their address.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018392{ echo "$as_me:$LINENO: checking for chroot" >&5
18393echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018394cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018395/* confdefs.h. */
18396_ACEOF
18397cat confdefs.h >>conftest.$ac_ext
18398cat >>conftest.$ac_ext <<_ACEOF
18399/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018400#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018401int
18402main ()
18403{
18404void *x=chroot
18405 ;
18406 return 0;
18407}
18408_ACEOF
18409rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018410if { (ac_try="$ac_compile"
18411case "(($ac_try" in
18412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18413 *) ac_try_echo=$ac_try;;
18414esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018416 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018417 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018418 grep -v '^ *+' conftest.er1 >conftest.err
18419 rm -f conftest.er1
18420 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018422 (exit $ac_status); } && {
18423 test -z "$ac_c_werror_flag" ||
18424 test ! -s conftest.err
18425 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018426
18427cat >>confdefs.h <<\_ACEOF
18428#define HAVE_CHROOT 1
18429_ACEOF
18430
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018431 { echo "$as_me:$LINENO: result: yes" >&5
18432echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018433else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018434 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018435sed 's/^/| /' conftest.$ac_ext >&5
18436
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018437 { echo "$as_me:$LINENO: result: no" >&5
18438echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018439
18440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018441
18442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018443{ echo "$as_me:$LINENO: checking for link" >&5
18444echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018445cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018446/* confdefs.h. */
18447_ACEOF
18448cat confdefs.h >>conftest.$ac_ext
18449cat >>conftest.$ac_ext <<_ACEOF
18450/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018451#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018452int
18453main ()
18454{
18455void *x=link
18456 ;
18457 return 0;
18458}
18459_ACEOF
18460rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018461if { (ac_try="$ac_compile"
18462case "(($ac_try" in
18463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18464 *) ac_try_echo=$ac_try;;
18465esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018467 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018468 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018469 grep -v '^ *+' conftest.er1 >conftest.err
18470 rm -f conftest.er1
18471 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018473 (exit $ac_status); } && {
18474 test -z "$ac_c_werror_flag" ||
18475 test ! -s conftest.err
18476 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018477
18478cat >>confdefs.h <<\_ACEOF
18479#define HAVE_LINK 1
18480_ACEOF
18481
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018482 { echo "$as_me:$LINENO: result: yes" >&5
18483echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018484else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018485 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018486sed 's/^/| /' conftest.$ac_ext >&5
18487
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018488 { echo "$as_me:$LINENO: result: no" >&5
18489echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018490
18491fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018492
18493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018494{ echo "$as_me:$LINENO: checking for symlink" >&5
18495echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018496cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018497/* confdefs.h. */
18498_ACEOF
18499cat confdefs.h >>conftest.$ac_ext
18500cat >>conftest.$ac_ext <<_ACEOF
18501/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018502#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018503int
18504main ()
18505{
18506void *x=symlink
18507 ;
18508 return 0;
18509}
18510_ACEOF
18511rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018512if { (ac_try="$ac_compile"
18513case "(($ac_try" in
18514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18515 *) ac_try_echo=$ac_try;;
18516esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018518 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018519 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018520 grep -v '^ *+' conftest.er1 >conftest.err
18521 rm -f conftest.er1
18522 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018524 (exit $ac_status); } && {
18525 test -z "$ac_c_werror_flag" ||
18526 test ! -s conftest.err
18527 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018528
18529cat >>confdefs.h <<\_ACEOF
18530#define HAVE_SYMLINK 1
18531_ACEOF
18532
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018533 { echo "$as_me:$LINENO: result: yes" >&5
18534echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018535else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018536 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018537sed 's/^/| /' conftest.$ac_ext >&5
18538
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018539 { echo "$as_me:$LINENO: result: no" >&5
18540echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018541
18542fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018543
18544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018545{ echo "$as_me:$LINENO: checking for fchdir" >&5
18546echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018547cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018548/* confdefs.h. */
18549_ACEOF
18550cat confdefs.h >>conftest.$ac_ext
18551cat >>conftest.$ac_ext <<_ACEOF
18552/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018553#include <unistd.h>
18554int
18555main ()
18556{
18557void *x=fchdir
18558 ;
18559 return 0;
18560}
18561_ACEOF
18562rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018563if { (ac_try="$ac_compile"
18564case "(($ac_try" in
18565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18566 *) ac_try_echo=$ac_try;;
18567esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018569 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018570 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018571 grep -v '^ *+' conftest.er1 >conftest.err
18572 rm -f conftest.er1
18573 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018575 (exit $ac_status); } && {
18576 test -z "$ac_c_werror_flag" ||
18577 test ! -s conftest.err
18578 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018579
18580cat >>confdefs.h <<\_ACEOF
18581#define HAVE_FCHDIR 1
18582_ACEOF
18583
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018584 { echo "$as_me:$LINENO: result: yes" >&5
18585echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018586else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018587 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018588sed 's/^/| /' conftest.$ac_ext >&5
18589
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018590 { echo "$as_me:$LINENO: result: no" >&5
18591echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018592
18593fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018594
18595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018596{ echo "$as_me:$LINENO: checking for fsync" >&5
18597echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018598cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018599/* confdefs.h. */
18600_ACEOF
18601cat confdefs.h >>conftest.$ac_ext
18602cat >>conftest.$ac_ext <<_ACEOF
18603/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018604#include <unistd.h>
18605int
18606main ()
18607{
18608void *x=fsync
18609 ;
18610 return 0;
18611}
18612_ACEOF
18613rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018614if { (ac_try="$ac_compile"
18615case "(($ac_try" in
18616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18617 *) ac_try_echo=$ac_try;;
18618esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018620 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018621 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018622 grep -v '^ *+' conftest.er1 >conftest.err
18623 rm -f conftest.er1
18624 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018626 (exit $ac_status); } && {
18627 test -z "$ac_c_werror_flag" ||
18628 test ! -s conftest.err
18629 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018630
18631cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018632#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018633_ACEOF
18634
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018635 { echo "$as_me:$LINENO: result: yes" >&5
18636echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018637else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018638 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018639sed 's/^/| /' conftest.$ac_ext >&5
18640
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018641 { echo "$as_me:$LINENO: result: no" >&5
18642echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018643
18644fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018645
18646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018647{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18648echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018649cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018650/* confdefs.h. */
18651_ACEOF
18652cat confdefs.h >>conftest.$ac_ext
18653cat >>conftest.$ac_ext <<_ACEOF
18654/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018655#include <unistd.h>
18656int
18657main ()
18658{
18659void *x=fdatasync
18660 ;
18661 return 0;
18662}
18663_ACEOF
18664rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018665if { (ac_try="$ac_compile"
18666case "(($ac_try" in
18667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18668 *) ac_try_echo=$ac_try;;
18669esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018671 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018672 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018673 grep -v '^ *+' conftest.er1 >conftest.err
18674 rm -f conftest.er1
18675 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018677 (exit $ac_status); } && {
18678 test -z "$ac_c_werror_flag" ||
18679 test ! -s conftest.err
18680 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018681
18682cat >>confdefs.h <<\_ACEOF
18683#define HAVE_FDATASYNC 1
18684_ACEOF
18685
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018686 { echo "$as_me:$LINENO: result: yes" >&5
18687echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018688else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018689 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018690sed 's/^/| /' conftest.$ac_ext >&5
18691
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018692 { echo "$as_me:$LINENO: result: no" >&5
18693echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018694
18695fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018696
18697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018698{ echo "$as_me:$LINENO: checking for epoll" >&5
18699echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018700cat >conftest.$ac_ext <<_ACEOF
18701/* confdefs.h. */
18702_ACEOF
18703cat confdefs.h >>conftest.$ac_ext
18704cat >>conftest.$ac_ext <<_ACEOF
18705/* end confdefs.h. */
18706#include <sys/epoll.h>
18707int
18708main ()
18709{
18710void *x=epoll_create
18711 ;
18712 return 0;
18713}
18714_ACEOF
18715rm -f conftest.$ac_objext
18716if { (ac_try="$ac_compile"
18717case "(($ac_try" in
18718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18719 *) ac_try_echo=$ac_try;;
18720esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018722 (eval "$ac_compile") 2>conftest.er1
18723 ac_status=$?
18724 grep -v '^ *+' conftest.er1 >conftest.err
18725 rm -f conftest.er1
18726 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018728 (exit $ac_status); } && {
18729 test -z "$ac_c_werror_flag" ||
18730 test ! -s conftest.err
18731 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018732
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018733cat >>confdefs.h <<\_ACEOF
18734#define HAVE_EPOLL 1
18735_ACEOF
18736
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018737 { echo "$as_me:$LINENO: result: yes" >&5
18738echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018739else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018740 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018741sed 's/^/| /' conftest.$ac_ext >&5
18742
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018743 { echo "$as_me:$LINENO: result: no" >&5
18744echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018745
18746fi
18747
18748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018749{ echo "$as_me:$LINENO: checking for kqueue" >&5
18750echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018751cat >conftest.$ac_ext <<_ACEOF
18752/* confdefs.h. */
18753_ACEOF
18754cat confdefs.h >>conftest.$ac_ext
18755cat >>conftest.$ac_ext <<_ACEOF
18756/* end confdefs.h. */
18757
18758#include <sys/types.h>
18759#include <sys/event.h>
18760
18761int
18762main ()
18763{
18764int x=kqueue()
18765 ;
18766 return 0;
18767}
18768_ACEOF
18769rm -f conftest.$ac_objext
18770if { (ac_try="$ac_compile"
18771case "(($ac_try" in
18772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18773 *) ac_try_echo=$ac_try;;
18774esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018776 (eval "$ac_compile") 2>conftest.er1
18777 ac_status=$?
18778 grep -v '^ *+' conftest.er1 >conftest.err
18779 rm -f conftest.er1
18780 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018782 (exit $ac_status); } && {
18783 test -z "$ac_c_werror_flag" ||
18784 test ! -s conftest.err
18785 } && test -s conftest.$ac_objext; then
18786
18787cat >>confdefs.h <<\_ACEOF
18788#define HAVE_KQUEUE 1
18789_ACEOF
18790
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018791 { echo "$as_me:$LINENO: result: yes" >&5
18792echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018793else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018794 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018795sed 's/^/| /' conftest.$ac_ext >&5
18796
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018797 { echo "$as_me:$LINENO: result: no" >&5
18798echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018799
18800fi
18801
18802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018803# On some systems (eg. FreeBSD 5), we would find a definition of the
18804# functions ctermid_r, setgroups in the library, but no prototype
18805# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18806# address to avoid compiler warnings and potential miscompilations
18807# because of the missing prototypes.
18808
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018809{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18810echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018811cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018812/* confdefs.h. */
18813_ACEOF
18814cat confdefs.h >>conftest.$ac_ext
18815cat >>conftest.$ac_ext <<_ACEOF
18816/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018817
18818#include "confdefs.h"
18819#include <stdio.h>
18820
Martin v. Löwisd5843682002-11-21 20:41:28 +000018821int
18822main ()
18823{
18824void* p = ctermid_r
18825 ;
18826 return 0;
18827}
18828_ACEOF
18829rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018830if { (ac_try="$ac_compile"
18831case "(($ac_try" in
18832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18833 *) ac_try_echo=$ac_try;;
18834esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018836 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018837 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018838 grep -v '^ *+' conftest.er1 >conftest.err
18839 rm -f conftest.er1
18840 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018842 (exit $ac_status); } && {
18843 test -z "$ac_c_werror_flag" ||
18844 test ! -s conftest.err
18845 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018846
18847cat >>confdefs.h <<\_ACEOF
18848#define HAVE_CTERMID_R 1
18849_ACEOF
18850
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018851 { echo "$as_me:$LINENO: result: yes" >&5
18852echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018853else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018854 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018855sed 's/^/| /' conftest.$ac_ext >&5
18856
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018857 { echo "$as_me:$LINENO: result: no" >&5
18858echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018859
18860fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000018861
Martin v. Löwiseba40652007-08-30 20:10:57 +000018862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18863
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018864{ echo "$as_me:$LINENO: checking for flock" >&5
18865echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018866cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018867/* confdefs.h. */
18868_ACEOF
18869cat confdefs.h >>conftest.$ac_ext
18870cat >>conftest.$ac_ext <<_ACEOF
18871/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018872
18873#include "confdefs.h"
18874#include <sys/file.h>
18875
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018876int
18877main ()
18878{
18879void* p = flock
18880 ;
18881 return 0;
18882}
18883_ACEOF
18884rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018885if { (ac_try="$ac_compile"
18886case "(($ac_try" in
18887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18888 *) ac_try_echo=$ac_try;;
18889esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018891 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018892 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018893 grep -v '^ *+' conftest.er1 >conftest.err
18894 rm -f conftest.er1
18895 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018897 (exit $ac_status); } && {
18898 test -z "$ac_c_werror_flag" ||
18899 test ! -s conftest.err
18900 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018901
18902cat >>confdefs.h <<\_ACEOF
18903#define HAVE_FLOCK 1
18904_ACEOF
18905
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018906 { echo "$as_me:$LINENO: result: yes" >&5
18907echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018908else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018909 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018910sed 's/^/| /' conftest.$ac_ext >&5
18911
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018912 { echo "$as_me:$LINENO: result: no" >&5
18913echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018914
18915fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018916
Martin v. Löwiseba40652007-08-30 20:10:57 +000018917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18918
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018919{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18920echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018921cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018922/* confdefs.h. */
18923_ACEOF
18924cat confdefs.h >>conftest.$ac_ext
18925cat >>conftest.$ac_ext <<_ACEOF
18926/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018927
18928#include "confdefs.h"
18929#include <unistd.h>
18930
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018931int
18932main ()
18933{
18934void* p = getpagesize
18935 ;
18936 return 0;
18937}
18938_ACEOF
18939rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018940if { (ac_try="$ac_compile"
18941case "(($ac_try" in
18942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18943 *) ac_try_echo=$ac_try;;
18944esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018946 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018947 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018948 grep -v '^ *+' conftest.er1 >conftest.err
18949 rm -f conftest.er1
18950 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018952 (exit $ac_status); } && {
18953 test -z "$ac_c_werror_flag" ||
18954 test ! -s conftest.err
18955 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018956
18957cat >>confdefs.h <<\_ACEOF
18958#define HAVE_GETPAGESIZE 1
18959_ACEOF
18960
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018961 { echo "$as_me:$LINENO: result: yes" >&5
18962echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018963else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018964 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018965sed 's/^/| /' conftest.$ac_ext >&5
18966
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018967 { echo "$as_me:$LINENO: result: no" >&5
18968echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018969
18970fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018971
18972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018973
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018974for ac_prog in true
18975do
18976 # Extract the first word of "$ac_prog", so it can be a program name with args.
18977set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018978{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18979echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018980if test "${ac_cv_prog_TRUE+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018981 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018982else
18983 if test -n "$TRUE"; then
18984 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18985else
18986as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18987for as_dir in $PATH
18988do
18989 IFS=$as_save_IFS
18990 test -z "$as_dir" && as_dir=.
18991 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000018992 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 +000018993 ac_cv_prog_TRUE="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018994 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018995 break 2
18996 fi
18997done
18998done
Martin v. Löwiseba40652007-08-30 20:10:57 +000018999IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019000
19001fi
19002fi
19003TRUE=$ac_cv_prog_TRUE
19004if test -n "$TRUE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019005 { echo "$as_me:$LINENO: result: $TRUE" >&5
19006echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019007else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019008 { echo "$as_me:$LINENO: result: no" >&5
19009echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019010fi
19011
Martin v. Löwiseba40652007-08-30 20:10:57 +000019012
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019013 test -n "$TRUE" && break
19014done
19015test -n "$TRUE" || TRUE="/bin/true"
19016
19017
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019018{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
19019echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019020if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019021 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019022else
19023 ac_check_lib_save_LIBS=$LIBS
19024LIBS="-lc $LIBS"
19025cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019026/* confdefs.h. */
19027_ACEOF
19028cat confdefs.h >>conftest.$ac_ext
19029cat >>conftest.$ac_ext <<_ACEOF
19030/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019031
Martin v. Löwiseba40652007-08-30 20:10:57 +000019032/* Override any GCC internal prototype to avoid an error.
19033 Use char because int might match the return type of a GCC
19034 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019035#ifdef __cplusplus
19036extern "C"
19037#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019038char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019039int
19040main ()
19041{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019042return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019043 ;
19044 return 0;
19045}
19046_ACEOF
19047rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019048if { (ac_try="$ac_link"
19049case "(($ac_try" in
19050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19051 *) ac_try_echo=$ac_try;;
19052esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019054 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019055 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019056 grep -v '^ *+' conftest.er1 >conftest.err
19057 rm -f conftest.er1
19058 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019060 (exit $ac_status); } && {
19061 test -z "$ac_c_werror_flag" ||
19062 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019063 } && test -s conftest$ac_exeext &&
19064 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019065 ac_cv_lib_c_inet_aton=yes
19066else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019067 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019068sed 's/^/| /' conftest.$ac_ext >&5
19069
Martin v. Löwiseba40652007-08-30 20:10:57 +000019070 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019071fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019072
19073rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019074 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019075LIBS=$ac_check_lib_save_LIBS
19076fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019077{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
19078echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
19079if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019080 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019081else
19082
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019083{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
19084echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019085if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019086 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019087else
19088 ac_check_lib_save_LIBS=$LIBS
19089LIBS="-lresolv $LIBS"
19090cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019091/* confdefs.h. */
19092_ACEOF
19093cat confdefs.h >>conftest.$ac_ext
19094cat >>conftest.$ac_ext <<_ACEOF
19095/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019096
Martin v. Löwiseba40652007-08-30 20:10:57 +000019097/* Override any GCC internal prototype to avoid an error.
19098 Use char because int might match the return type of a GCC
19099 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019100#ifdef __cplusplus
19101extern "C"
19102#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019103char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019104int
19105main ()
19106{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019107return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019108 ;
19109 return 0;
19110}
19111_ACEOF
19112rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019113if { (ac_try="$ac_link"
19114case "(($ac_try" in
19115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19116 *) ac_try_echo=$ac_try;;
19117esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019119 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019120 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019121 grep -v '^ *+' conftest.er1 >conftest.err
19122 rm -f conftest.er1
19123 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019125 (exit $ac_status); } && {
19126 test -z "$ac_c_werror_flag" ||
19127 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019128 } && test -s conftest$ac_exeext &&
19129 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019130 ac_cv_lib_resolv_inet_aton=yes
19131else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019132 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019133sed 's/^/| /' conftest.$ac_ext >&5
19134
Martin v. Löwiseba40652007-08-30 20:10:57 +000019135 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019136fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019137
19138rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019139 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019140LIBS=$ac_check_lib_save_LIBS
19141fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019142{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
19143echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
19144if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019145 cat >>confdefs.h <<_ACEOF
19146#define HAVE_LIBRESOLV 1
19147_ACEOF
19148
19149 LIBS="-lresolv $LIBS"
19150
19151fi
19152
19153
19154fi
19155
19156
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019157# On Tru64, chflags seems to be present, but calling it will
19158# exit Python
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019159{ echo "$as_me:$LINENO: checking for chflags" >&5
19160echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019161if test "${ac_cv_have_chflags+set}" = set; then
19162 echo $ECHO_N "(cached) $ECHO_C" >&6
19163else
19164 if test "$cross_compiling" = yes; then
Gregory P. Smith49437c22009-11-02 01:38:35 +000019165 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019166else
19167 cat >conftest.$ac_ext <<_ACEOF
19168/* confdefs.h. */
19169_ACEOF
19170cat confdefs.h >>conftest.$ac_ext
19171cat >>conftest.$ac_ext <<_ACEOF
19172/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000019173[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019174#include <sys/stat.h>
19175#include <unistd.h>
19176int main(int argc, char*argv[])
19177{
19178 if(chflags(argv[0], 0) != 0)
19179 return 1;
19180 return 0;
19181}
Gregory P. Smith49437c22009-11-02 01:38:35 +000019182]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019183_ACEOF
19184rm -f conftest$ac_exeext
19185if { (ac_try="$ac_link"
19186case "(($ac_try" in
19187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19188 *) ac_try_echo=$ac_try;;
19189esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019191 (eval "$ac_link") 2>&5
19192 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019194 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19195 { (case "(($ac_try" in
19196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19197 *) ac_try_echo=$ac_try;;
19198esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019200 (eval "$ac_try") 2>&5
19201 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019203 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019204 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019205else
19206 echo "$as_me: program exited with status $ac_status" >&5
19207echo "$as_me: failed program was:" >&5
19208sed 's/^/| /' conftest.$ac_ext >&5
19209
19210( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019211ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019212fi
19213rm -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 +000019214fi
19215
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019216
19217
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019218fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019219{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
19220echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000019221if test "$ac_cv_have_chflags" = cross ; then
19222 { echo "$as_me:$LINENO: checking for chflags" >&5
19223echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
19224if test "${ac_cv_func_chflags+set}" = set; then
19225 echo $ECHO_N "(cached) $ECHO_C" >&6
19226else
19227 cat >conftest.$ac_ext <<_ACEOF
19228/* confdefs.h. */
19229_ACEOF
19230cat confdefs.h >>conftest.$ac_ext
19231cat >>conftest.$ac_ext <<_ACEOF
19232/* end confdefs.h. */
19233/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
19234 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19235#define chflags innocuous_chflags
19236
19237/* System header to define __stub macros and hopefully few prototypes,
19238 which can conflict with char chflags (); below.
19239 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19240 <limits.h> exists even on freestanding compilers. */
19241
19242#ifdef __STDC__
19243# include <limits.h>
19244#else
19245# include <assert.h>
19246#endif
19247
19248#undef chflags
19249
19250/* Override any GCC internal prototype to avoid an error.
19251 Use char because int might match the return type of a GCC
19252 builtin and then its argument prototype would still apply. */
19253#ifdef __cplusplus
19254extern "C"
19255#endif
19256char chflags ();
19257/* The GNU C library defines this for functions which it implements
19258 to always fail with ENOSYS. Some functions are actually named
19259 something starting with __ and the normal name is an alias. */
19260#if defined __stub_chflags || defined __stub___chflags
19261choke me
19262#endif
19263
19264int
19265main ()
19266{
19267return chflags ();
19268 ;
19269 return 0;
19270}
19271_ACEOF
19272rm -f conftest.$ac_objext conftest$ac_exeext
19273if { (ac_try="$ac_link"
19274case "(($ac_try" in
19275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19276 *) ac_try_echo=$ac_try;;
19277esac
19278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19279 (eval "$ac_link") 2>conftest.er1
19280 ac_status=$?
19281 grep -v '^ *+' conftest.er1 >conftest.err
19282 rm -f conftest.er1
19283 cat conftest.err >&5
19284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19285 (exit $ac_status); } && {
19286 test -z "$ac_c_werror_flag" ||
19287 test ! -s conftest.err
19288 } && test -s conftest$ac_exeext &&
19289 $as_test_x conftest$ac_exeext; then
19290 ac_cv_func_chflags=yes
19291else
19292 echo "$as_me: failed program was:" >&5
19293sed 's/^/| /' conftest.$ac_ext >&5
19294
19295 ac_cv_func_chflags=no
19296fi
19297
19298rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19299 conftest$ac_exeext conftest.$ac_ext
19300fi
19301{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
19302echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
19303if test $ac_cv_func_chflags = yes; then
19304 ac_cv_have_chflags="yes"
19305else
19306 ac_cv_have_chflags="no"
19307fi
19308
19309fi
19310if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019311
19312cat >>confdefs.h <<\_ACEOF
19313#define HAVE_CHFLAGS 1
19314_ACEOF
19315
19316fi
19317
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019318{ echo "$as_me:$LINENO: checking for lchflags" >&5
19319echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019320if test "${ac_cv_have_lchflags+set}" = set; then
19321 echo $ECHO_N "(cached) $ECHO_C" >&6
19322else
19323 if test "$cross_compiling" = yes; then
Gregory P. Smith49437c22009-11-02 01:38:35 +000019324 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019325else
19326 cat >conftest.$ac_ext <<_ACEOF
19327/* confdefs.h. */
19328_ACEOF
19329cat confdefs.h >>conftest.$ac_ext
19330cat >>conftest.$ac_ext <<_ACEOF
19331/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000019332[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019333#include <sys/stat.h>
19334#include <unistd.h>
19335int main(int argc, char*argv[])
19336{
19337 if(lchflags(argv[0], 0) != 0)
19338 return 1;
19339 return 0;
19340}
Gregory P. Smith49437c22009-11-02 01:38:35 +000019341]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019342_ACEOF
19343rm -f conftest$ac_exeext
19344if { (ac_try="$ac_link"
19345case "(($ac_try" in
19346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19347 *) ac_try_echo=$ac_try;;
19348esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019350 (eval "$ac_link") 2>&5
19351 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019353 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19354 { (case "(($ac_try" in
19355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19356 *) ac_try_echo=$ac_try;;
19357esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019359 (eval "$ac_try") 2>&5
19360 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019362 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019363 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019364else
19365 echo "$as_me: program exited with status $ac_status" >&5
19366echo "$as_me: failed program was:" >&5
19367sed 's/^/| /' conftest.$ac_ext >&5
19368
19369( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019370ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019371fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019372rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19373fi
19374
19375
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019376
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019377fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019378{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
19379echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000019380if test "$ac_cv_have_lchflags" = cross ; then
19381 { echo "$as_me:$LINENO: checking for lchflags" >&5
19382echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
19383if test "${ac_cv_func_lchflags+set}" = set; then
19384 echo $ECHO_N "(cached) $ECHO_C" >&6
19385else
19386 cat >conftest.$ac_ext <<_ACEOF
19387/* confdefs.h. */
19388_ACEOF
19389cat confdefs.h >>conftest.$ac_ext
19390cat >>conftest.$ac_ext <<_ACEOF
19391/* end confdefs.h. */
19392/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
19393 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19394#define lchflags innocuous_lchflags
19395
19396/* System header to define __stub macros and hopefully few prototypes,
19397 which can conflict with char lchflags (); below.
19398 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19399 <limits.h> exists even on freestanding compilers. */
19400
19401#ifdef __STDC__
19402# include <limits.h>
19403#else
19404# include <assert.h>
19405#endif
19406
19407#undef lchflags
19408
19409/* Override any GCC internal prototype to avoid an error.
19410 Use char because int might match the return type of a GCC
19411 builtin and then its argument prototype would still apply. */
19412#ifdef __cplusplus
19413extern "C"
19414#endif
19415char lchflags ();
19416/* The GNU C library defines this for functions which it implements
19417 to always fail with ENOSYS. Some functions are actually named
19418 something starting with __ and the normal name is an alias. */
19419#if defined __stub_lchflags || defined __stub___lchflags
19420choke me
19421#endif
19422
19423int
19424main ()
19425{
19426return lchflags ();
19427 ;
19428 return 0;
19429}
19430_ACEOF
19431rm -f conftest.$ac_objext conftest$ac_exeext
19432if { (ac_try="$ac_link"
19433case "(($ac_try" in
19434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19435 *) ac_try_echo=$ac_try;;
19436esac
19437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19438 (eval "$ac_link") 2>conftest.er1
19439 ac_status=$?
19440 grep -v '^ *+' conftest.er1 >conftest.err
19441 rm -f conftest.er1
19442 cat conftest.err >&5
19443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19444 (exit $ac_status); } && {
19445 test -z "$ac_c_werror_flag" ||
19446 test ! -s conftest.err
19447 } && test -s conftest$ac_exeext &&
19448 $as_test_x conftest$ac_exeext; then
19449 ac_cv_func_lchflags=yes
19450else
19451 echo "$as_me: failed program was:" >&5
19452sed 's/^/| /' conftest.$ac_ext >&5
19453
19454 ac_cv_func_lchflags=no
19455fi
19456
19457rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19458 conftest$ac_exeext conftest.$ac_ext
19459fi
19460{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
19461echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
19462if test $ac_cv_func_lchflags = yes; then
19463 ac_cv_have_lchflags="yes"
19464else
19465 ac_cv_have_lchflags="no"
19466fi
19467
19468fi
19469if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019470
19471cat >>confdefs.h <<\_ACEOF
19472#define HAVE_LCHFLAGS 1
19473_ACEOF
19474
19475fi
19476
Ronald Oussorenf8752642006-07-06 10:13:35 +000019477case $ac_sys_system/$ac_sys_release in
19478Darwin/*)
19479 _CUR_CFLAGS="${CFLAGS}"
19480 _CUR_LDFLAGS="${LDFLAGS}"
19481 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
19482 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
19483 ;;
19484esac
19485
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019486{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
19487echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019488if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019489 echo $ECHO_N "(cached) $ECHO_C" >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019490else
19491 ac_check_lib_save_LIBS=$LIBS
19492LIBS="-lz $LIBS"
19493cat >conftest.$ac_ext <<_ACEOF
19494/* confdefs.h. */
19495_ACEOF
19496cat confdefs.h >>conftest.$ac_ext
19497cat >>conftest.$ac_ext <<_ACEOF
19498/* end confdefs.h. */
19499
Martin v. Löwiseba40652007-08-30 20:10:57 +000019500/* Override any GCC internal prototype to avoid an error.
19501 Use char because int might match the return type of a GCC
19502 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019503#ifdef __cplusplus
19504extern "C"
19505#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019506char inflateCopy ();
19507int
19508main ()
19509{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019510return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019511 ;
19512 return 0;
19513}
19514_ACEOF
19515rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019516if { (ac_try="$ac_link"
19517case "(($ac_try" in
19518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19519 *) ac_try_echo=$ac_try;;
19520esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019522 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019523 ac_status=$?
19524 grep -v '^ *+' conftest.er1 >conftest.err
19525 rm -f conftest.er1
19526 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019528 (exit $ac_status); } && {
19529 test -z "$ac_c_werror_flag" ||
19530 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019531 } && test -s conftest$ac_exeext &&
19532 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019533 ac_cv_lib_z_inflateCopy=yes
19534else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019535 echo "$as_me: failed program was:" >&5
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019536sed 's/^/| /' conftest.$ac_ext >&5
19537
Martin v. Löwiseba40652007-08-30 20:10:57 +000019538 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019539fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019540
19541rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019542 conftest$ac_exeext conftest.$ac_ext
19543LIBS=$ac_check_lib_save_LIBS
19544fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019545{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
19546echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
19547if test $ac_cv_lib_z_inflateCopy = yes; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019548
19549cat >>confdefs.h <<\_ACEOF
19550#define HAVE_ZLIB_COPY 1
19551_ACEOF
19552
19553fi
19554
19555
Ronald Oussorenf8752642006-07-06 10:13:35 +000019556case $ac_sys_system/$ac_sys_release in
19557Darwin/*)
19558 CFLAGS="${_CUR_CFLAGS}"
19559 LDFLAGS="${_CUR_LDFLAGS}"
19560 ;;
19561esac
19562
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019563{ echo "$as_me:$LINENO: checking for hstrerror" >&5
19564echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019565cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019566/* confdefs.h. */
19567_ACEOF
19568cat confdefs.h >>conftest.$ac_ext
19569cat >>conftest.$ac_ext <<_ACEOF
19570/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019571
19572#include "confdefs.h"
19573#include <netdb.h>
19574
Martin v. Löwise9416172003-05-03 10:12:45 +000019575int
19576main ()
19577{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019578void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019579 ;
19580 return 0;
19581}
19582_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019583rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019584if { (ac_try="$ac_link"
19585case "(($ac_try" in
19586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19587 *) ac_try_echo=$ac_try;;
19588esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019590 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019591 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019592 grep -v '^ *+' conftest.er1 >conftest.err
19593 rm -f conftest.er1
19594 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019596 (exit $ac_status); } && {
19597 test -z "$ac_c_werror_flag" ||
19598 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019599 } && test -s conftest$ac_exeext &&
19600 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019601
19602cat >>confdefs.h <<\_ACEOF
19603#define HAVE_HSTRERROR 1
19604_ACEOF
19605
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019606 { echo "$as_me:$LINENO: result: yes" >&5
19607echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019608else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019609 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019610sed 's/^/| /' conftest.$ac_ext >&5
19611
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019612 { echo "$as_me:$LINENO: result: no" >&5
19613echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019614
19615fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019616
19617rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019618 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019619
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019620{ echo "$as_me:$LINENO: checking for inet_aton" >&5
19621echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019622cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019623/* confdefs.h. */
19624_ACEOF
19625cat confdefs.h >>conftest.$ac_ext
19626cat >>conftest.$ac_ext <<_ACEOF
19627/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019628
19629#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000019630#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019631#include <sys/socket.h>
19632#include <netinet/in.h>
19633#include <arpa/inet.h>
19634
Martin v. Löwise9416172003-05-03 10:12:45 +000019635int
19636main ()
19637{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019638void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019639 ;
19640 return 0;
19641}
19642_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019643rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019644if { (ac_try="$ac_link"
19645case "(($ac_try" in
19646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19647 *) ac_try_echo=$ac_try;;
19648esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019650 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019651 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019652 grep -v '^ *+' conftest.er1 >conftest.err
19653 rm -f conftest.er1
19654 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019656 (exit $ac_status); } && {
19657 test -z "$ac_c_werror_flag" ||
19658 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019659 } && test -s conftest$ac_exeext &&
19660 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019661
19662cat >>confdefs.h <<\_ACEOF
19663#define HAVE_INET_ATON 1
19664_ACEOF
19665
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019666 { echo "$as_me:$LINENO: result: yes" >&5
19667echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019668else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019669 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019670sed 's/^/| /' conftest.$ac_ext >&5
19671
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019672 { echo "$as_me:$LINENO: result: no" >&5
19673echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019674
19675fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019676
19677rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019678 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019679
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019680{ echo "$as_me:$LINENO: checking for inet_pton" >&5
19681echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019682cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019683/* confdefs.h. */
19684_ACEOF
19685cat confdefs.h >>conftest.$ac_ext
19686cat >>conftest.$ac_ext <<_ACEOF
19687/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019688
19689#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019690#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019691#include <sys/socket.h>
19692#include <netinet/in.h>
19693#include <arpa/inet.h>
19694
Martin v. Löwise9416172003-05-03 10:12:45 +000019695int
19696main ()
19697{
19698void* p = inet_pton
19699 ;
19700 return 0;
19701}
19702_ACEOF
19703rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019704if { (ac_try="$ac_compile"
19705case "(($ac_try" in
19706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19707 *) ac_try_echo=$ac_try;;
19708esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019710 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019711 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019712 grep -v '^ *+' conftest.er1 >conftest.err
19713 rm -f conftest.er1
19714 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019716 (exit $ac_status); } && {
19717 test -z "$ac_c_werror_flag" ||
19718 test ! -s conftest.err
19719 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019720
19721cat >>confdefs.h <<\_ACEOF
19722#define HAVE_INET_PTON 1
19723_ACEOF
19724
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019725 { echo "$as_me:$LINENO: result: yes" >&5
19726echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019727else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019728 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019729sed 's/^/| /' conftest.$ac_ext >&5
19730
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019731 { echo "$as_me:$LINENO: result: no" >&5
19732echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019733
19734fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019735
19736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019737
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019738# On some systems, setgroups is in unistd.h, on others, in grp.h
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019739{ echo "$as_me:$LINENO: checking for setgroups" >&5
19740echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019741cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019742/* confdefs.h. */
19743_ACEOF
19744cat confdefs.h >>conftest.$ac_ext
19745cat >>conftest.$ac_ext <<_ACEOF
19746/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019747
19748#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019749#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019750#ifdef HAVE_GRP_H
19751#include <grp.h>
19752#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019753
Martin v. Löwisd5843682002-11-21 20:41:28 +000019754int
19755main ()
19756{
19757void* p = setgroups
19758 ;
19759 return 0;
19760}
19761_ACEOF
19762rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019763if { (ac_try="$ac_compile"
19764case "(($ac_try" in
19765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19766 *) ac_try_echo=$ac_try;;
19767esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019769 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019770 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019771 grep -v '^ *+' conftest.er1 >conftest.err
19772 rm -f conftest.er1
19773 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019775 (exit $ac_status); } && {
19776 test -z "$ac_c_werror_flag" ||
19777 test ! -s conftest.err
19778 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019779
19780cat >>confdefs.h <<\_ACEOF
19781#define HAVE_SETGROUPS 1
19782_ACEOF
19783
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019784 { echo "$as_me:$LINENO: result: yes" >&5
19785echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019786else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019787 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019788sed 's/^/| /' conftest.$ac_ext >&5
19789
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019790 { echo "$as_me:$LINENO: result: no" >&5
19791echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019792
19793fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019794
19795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019796
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019797# check for openpty and forkpty
19798
Martin v. Löwis11437992002-04-12 09:54:03 +000019799
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019800for ac_func in openpty
19801do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019802as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19803{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19804echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019805if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019806 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019807else
Martin v. Löwis11437992002-04-12 09:54:03 +000019808 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019809/* confdefs.h. */
19810_ACEOF
19811cat confdefs.h >>conftest.$ac_ext
19812cat >>conftest.$ac_ext <<_ACEOF
19813/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019814/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19815 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19816#define $ac_func innocuous_$ac_func
19817
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019818/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019819 which can conflict with char $ac_func (); below.
19820 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019821 <limits.h> exists even on freestanding compilers. */
19822
19823#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019824# include <limits.h>
19825#else
19826# include <assert.h>
19827#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019828
19829#undef $ac_func
19830
Martin v. Löwiseba40652007-08-30 20:10:57 +000019831/* Override any GCC internal prototype to avoid an error.
19832 Use char because int might match the return type of a GCC
19833 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019834#ifdef __cplusplus
19835extern "C"
19836#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019837char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019838/* The GNU C library defines this for functions which it implements
19839 to always fail with ENOSYS. Some functions are actually named
19840 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019841#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019842choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019843#endif
19844
Skip Montanaro6dead952003-09-25 14:50:04 +000019845int
19846main ()
19847{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019848return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019849 ;
19850 return 0;
19851}
19852_ACEOF
19853rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019854if { (ac_try="$ac_link"
19855case "(($ac_try" in
19856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19857 *) ac_try_echo=$ac_try;;
19858esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019859eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019860 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019861 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019862 grep -v '^ *+' conftest.er1 >conftest.err
19863 rm -f conftest.er1
19864 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019866 (exit $ac_status); } && {
19867 test -z "$ac_c_werror_flag" ||
19868 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019869 } && test -s conftest$ac_exeext &&
19870 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019871 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019872else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019873 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019874sed 's/^/| /' conftest.$ac_ext >&5
19875
Martin v. Löwiseba40652007-08-30 20:10:57 +000019876 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019877fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019878
19879rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019880 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019881fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019882ac_res=`eval echo '${'$as_ac_var'}'`
19883 { echo "$as_me:$LINENO: result: $ac_res" >&5
19884echo "${ECHO_T}$ac_res" >&6; }
19885if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019886 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019887#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019888_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019889
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019890else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019891 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19892echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019893if test "${ac_cv_lib_util_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019894 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019895else
Martin v. Löwis11437992002-04-12 09:54:03 +000019896 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019897LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019898cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019899/* confdefs.h. */
19900_ACEOF
19901cat confdefs.h >>conftest.$ac_ext
19902cat >>conftest.$ac_ext <<_ACEOF
19903/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019904
Martin v. Löwiseba40652007-08-30 20:10:57 +000019905/* Override any GCC internal prototype to avoid an error.
19906 Use char because int might match the return type of a GCC
19907 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019908#ifdef __cplusplus
19909extern "C"
19910#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019911char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019912int
19913main ()
19914{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019915return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019916 ;
19917 return 0;
19918}
19919_ACEOF
19920rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019921if { (ac_try="$ac_link"
19922case "(($ac_try" in
19923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19924 *) ac_try_echo=$ac_try;;
19925esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019926eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019927 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019928 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019929 grep -v '^ *+' conftest.er1 >conftest.err
19930 rm -f conftest.er1
19931 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019933 (exit $ac_status); } && {
19934 test -z "$ac_c_werror_flag" ||
19935 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019936 } && test -s conftest$ac_exeext &&
19937 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019938 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019939else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019940 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019941sed 's/^/| /' conftest.$ac_ext >&5
19942
Martin v. Löwiseba40652007-08-30 20:10:57 +000019943 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019944fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019945
19946rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019947 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019948LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019949fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019950{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19951echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19952if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019953 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019954#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019955_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019956 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019957else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019958 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19959echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019960if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019961 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019962else
19963 ac_check_lib_save_LIBS=$LIBS
19964LIBS="-lbsd $LIBS"
19965cat >conftest.$ac_ext <<_ACEOF
19966/* confdefs.h. */
19967_ACEOF
19968cat confdefs.h >>conftest.$ac_ext
19969cat >>conftest.$ac_ext <<_ACEOF
19970/* end confdefs.h. */
19971
Martin v. Löwiseba40652007-08-30 20:10:57 +000019972/* Override any GCC internal prototype to avoid an error.
19973 Use char because int might match the return type of a GCC
19974 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019975#ifdef __cplusplus
19976extern "C"
19977#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019978char openpty ();
19979int
19980main ()
19981{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019982return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019983 ;
19984 return 0;
19985}
19986_ACEOF
19987rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019988if { (ac_try="$ac_link"
19989case "(($ac_try" in
19990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19991 *) ac_try_echo=$ac_try;;
19992esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019994 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019995 ac_status=$?
19996 grep -v '^ *+' conftest.er1 >conftest.err
19997 rm -f conftest.er1
19998 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020000 (exit $ac_status); } && {
20001 test -z "$ac_c_werror_flag" ||
20002 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020003 } && test -s conftest$ac_exeext &&
20004 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020005 ac_cv_lib_bsd_openpty=yes
20006else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020007 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020008sed 's/^/| /' conftest.$ac_ext >&5
20009
Martin v. Löwiseba40652007-08-30 20:10:57 +000020010 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020011fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020012
20013rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020014 conftest$ac_exeext conftest.$ac_ext
20015LIBS=$ac_check_lib_save_LIBS
20016fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020017{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
20018echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
20019if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020020 cat >>confdefs.h <<\_ACEOF
20021#define HAVE_OPENPTY 1
20022_ACEOF
20023 LIBS="$LIBS -lbsd"
20024fi
20025
20026
20027fi
20028
Fred Drake8cef4cf2000-06-28 16:40:38 +000020029
20030fi
20031done
20032
Martin v. Löwis11437992002-04-12 09:54:03 +000020033
Fred Drake8cef4cf2000-06-28 16:40:38 +000020034for ac_func in forkpty
20035do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020036as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20037{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20038echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020039if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020040 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000020041else
Martin v. Löwis11437992002-04-12 09:54:03 +000020042 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020043/* confdefs.h. */
20044_ACEOF
20045cat confdefs.h >>conftest.$ac_ext
20046cat >>conftest.$ac_ext <<_ACEOF
20047/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020048/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20049 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20050#define $ac_func innocuous_$ac_func
20051
Fred Drake8cef4cf2000-06-28 16:40:38 +000020052/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020053 which can conflict with char $ac_func (); below.
20054 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020055 <limits.h> exists even on freestanding compilers. */
20056
20057#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020058# include <limits.h>
20059#else
20060# include <assert.h>
20061#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020062
20063#undef $ac_func
20064
Martin v. Löwiseba40652007-08-30 20:10:57 +000020065/* Override any GCC internal prototype to avoid an error.
20066 Use char because int might match the return type of a GCC
20067 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020068#ifdef __cplusplus
20069extern "C"
20070#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020071char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000020072/* The GNU C library defines this for functions which it implements
20073 to always fail with ENOSYS. Some functions are actually named
20074 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020075#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000020076choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000020077#endif
20078
Skip Montanaro6dead952003-09-25 14:50:04 +000020079int
20080main ()
20081{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020082return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020083 ;
20084 return 0;
20085}
20086_ACEOF
20087rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020088if { (ac_try="$ac_link"
20089case "(($ac_try" in
20090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20091 *) ac_try_echo=$ac_try;;
20092esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020094 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020095 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020096 grep -v '^ *+' conftest.er1 >conftest.err
20097 rm -f conftest.er1
20098 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020100 (exit $ac_status); } && {
20101 test -z "$ac_c_werror_flag" ||
20102 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020103 } && test -s conftest$ac_exeext &&
20104 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020105 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020106else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020107 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020108sed 's/^/| /' conftest.$ac_ext >&5
20109
Martin v. Löwiseba40652007-08-30 20:10:57 +000020110 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020111fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020112
20113rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020114 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020115fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020116ac_res=`eval echo '${'$as_ac_var'}'`
20117 { echo "$as_me:$LINENO: result: $ac_res" >&5
20118echo "${ECHO_T}$ac_res" >&6; }
20119if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020120 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020121#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020122_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020123
Fred Drake8cef4cf2000-06-28 16:40:38 +000020124else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020125 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
20126echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020127if test "${ac_cv_lib_util_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020128 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000020129else
Martin v. Löwis11437992002-04-12 09:54:03 +000020130 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000020131LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020132cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020133/* confdefs.h. */
20134_ACEOF
20135cat confdefs.h >>conftest.$ac_ext
20136cat >>conftest.$ac_ext <<_ACEOF
20137/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020138
Martin v. Löwiseba40652007-08-30 20:10:57 +000020139/* Override any GCC internal prototype to avoid an error.
20140 Use char because int might match the return type of a GCC
20141 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020142#ifdef __cplusplus
20143extern "C"
20144#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020145char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020146int
20147main ()
20148{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020149return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020150 ;
20151 return 0;
20152}
20153_ACEOF
20154rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020155if { (ac_try="$ac_link"
20156case "(($ac_try" in
20157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20158 *) ac_try_echo=$ac_try;;
20159esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020161 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020162 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020163 grep -v '^ *+' conftest.er1 >conftest.err
20164 rm -f conftest.er1
20165 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020167 (exit $ac_status); } && {
20168 test -z "$ac_c_werror_flag" ||
20169 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020170 } && test -s conftest$ac_exeext &&
20171 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020172 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000020173else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020174 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020175sed 's/^/| /' conftest.$ac_ext >&5
20176
Martin v. Löwiseba40652007-08-30 20:10:57 +000020177 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020178fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020179
20180rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020181 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020182LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000020183fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020184{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
20185echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
20186if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020187 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020188#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020189_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020190 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020191else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020192 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
20193echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020194if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020195 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020196else
20197 ac_check_lib_save_LIBS=$LIBS
20198LIBS="-lbsd $LIBS"
20199cat >conftest.$ac_ext <<_ACEOF
20200/* confdefs.h. */
20201_ACEOF
20202cat confdefs.h >>conftest.$ac_ext
20203cat >>conftest.$ac_ext <<_ACEOF
20204/* end confdefs.h. */
20205
Martin v. Löwiseba40652007-08-30 20:10:57 +000020206/* Override any GCC internal prototype to avoid an error.
20207 Use char because int might match the return type of a GCC
20208 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020209#ifdef __cplusplus
20210extern "C"
20211#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020212char forkpty ();
20213int
20214main ()
20215{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020216return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020217 ;
20218 return 0;
20219}
20220_ACEOF
20221rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020222if { (ac_try="$ac_link"
20223case "(($ac_try" in
20224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20225 *) ac_try_echo=$ac_try;;
20226esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020228 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020229 ac_status=$?
20230 grep -v '^ *+' conftest.er1 >conftest.err
20231 rm -f conftest.er1
20232 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020234 (exit $ac_status); } && {
20235 test -z "$ac_c_werror_flag" ||
20236 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020237 } && test -s conftest$ac_exeext &&
20238 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020239 ac_cv_lib_bsd_forkpty=yes
20240else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020241 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020242sed 's/^/| /' conftest.$ac_ext >&5
20243
Martin v. Löwiseba40652007-08-30 20:10:57 +000020244 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020245fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020246
20247rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020248 conftest$ac_exeext conftest.$ac_ext
20249LIBS=$ac_check_lib_save_LIBS
20250fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020251{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
20252echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
20253if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020254 cat >>confdefs.h <<\_ACEOF
20255#define HAVE_FORKPTY 1
20256_ACEOF
20257 LIBS="$LIBS -lbsd"
20258fi
20259
20260
20261fi
20262
Fred Drake8cef4cf2000-06-28 16:40:38 +000020263
20264fi
20265done
20266
Jack Jansendd19cf82001-12-06 22:36:17 +000020267
Brett Cannonaa5778d2008-03-18 04:09:00 +000020268# Stuff for expat.
20269
20270for ac_func in memmove
20271do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020272as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20273{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20274echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Brett Cannonaa5778d2008-03-18 04:09:00 +000020275if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020276 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannonaa5778d2008-03-18 04:09:00 +000020277else
20278 cat >conftest.$ac_ext <<_ACEOF
20279/* confdefs.h. */
20280_ACEOF
20281cat confdefs.h >>conftest.$ac_ext
20282cat >>conftest.$ac_ext <<_ACEOF
20283/* end confdefs.h. */
20284/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20285 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20286#define $ac_func innocuous_$ac_func
20287
20288/* System header to define __stub macros and hopefully few prototypes,
20289 which can conflict with char $ac_func (); below.
20290 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20291 <limits.h> exists even on freestanding compilers. */
20292
20293#ifdef __STDC__
20294# include <limits.h>
20295#else
20296# include <assert.h>
20297#endif
20298
20299#undef $ac_func
20300
20301/* Override any GCC internal prototype to avoid an error.
20302 Use char because int might match the return type of a GCC
20303 builtin and then its argument prototype would still apply. */
20304#ifdef __cplusplus
20305extern "C"
20306#endif
20307char $ac_func ();
20308/* The GNU C library defines this for functions which it implements
20309 to always fail with ENOSYS. Some functions are actually named
20310 something starting with __ and the normal name is an alias. */
20311#if defined __stub_$ac_func || defined __stub___$ac_func
20312choke me
20313#endif
20314
20315int
20316main ()
20317{
20318return $ac_func ();
20319 ;
20320 return 0;
20321}
20322_ACEOF
20323rm -f conftest.$ac_objext conftest$ac_exeext
20324if { (ac_try="$ac_link"
20325case "(($ac_try" in
20326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20327 *) ac_try_echo=$ac_try;;
20328esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020330 (eval "$ac_link") 2>conftest.er1
20331 ac_status=$?
20332 grep -v '^ *+' conftest.er1 >conftest.err
20333 rm -f conftest.er1
20334 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020336 (exit $ac_status); } && {
20337 test -z "$ac_c_werror_flag" ||
20338 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020339 } && test -s conftest$ac_exeext &&
20340 $as_test_x conftest$ac_exeext; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000020341 eval "$as_ac_var=yes"
20342else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020343 echo "$as_me: failed program was:" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020344sed 's/^/| /' conftest.$ac_ext >&5
20345
20346 eval "$as_ac_var=no"
20347fi
20348
20349rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20350 conftest$ac_exeext conftest.$ac_ext
20351fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020352ac_res=`eval echo '${'$as_ac_var'}'`
20353 { echo "$as_me:$LINENO: result: $ac_res" >&5
20354echo "${ECHO_T}$ac_res" >&6; }
20355if test `eval echo '${'$as_ac_var'}'` = yes; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000020356 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020357#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000020358_ACEOF
20359
20360fi
20361done
20362
20363
Michael W. Hudson54241132001-12-07 15:38:26 +000020364# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000020365
20366
20367
20368
20369
20370
Fred Drake8cef4cf2000-06-28 16:40:38 +000020371for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
20372do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020373as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20374{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20375echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020376if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020377 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020378else
Martin v. Löwis11437992002-04-12 09:54:03 +000020379 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020380/* confdefs.h. */
20381_ACEOF
20382cat confdefs.h >>conftest.$ac_ext
20383cat >>conftest.$ac_ext <<_ACEOF
20384/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020385/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20386 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20387#define $ac_func innocuous_$ac_func
20388
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020389/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020390 which can conflict with char $ac_func (); below.
20391 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020392 <limits.h> exists even on freestanding compilers. */
20393
20394#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020395# include <limits.h>
20396#else
20397# include <assert.h>
20398#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020399
20400#undef $ac_func
20401
Martin v. Löwiseba40652007-08-30 20:10:57 +000020402/* Override any GCC internal prototype to avoid an error.
20403 Use char because int might match the return type of a GCC
20404 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020405#ifdef __cplusplus
20406extern "C"
20407#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020408char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020409/* The GNU C library defines this for functions which it implements
20410 to always fail with ENOSYS. Some functions are actually named
20411 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020412#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020413choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020414#endif
20415
Skip Montanaro6dead952003-09-25 14:50:04 +000020416int
20417main ()
20418{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020419return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020420 ;
20421 return 0;
20422}
20423_ACEOF
20424rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020425if { (ac_try="$ac_link"
20426case "(($ac_try" in
20427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20428 *) ac_try_echo=$ac_try;;
20429esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020431 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020432 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020433 grep -v '^ *+' conftest.er1 >conftest.err
20434 rm -f conftest.er1
20435 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020437 (exit $ac_status); } && {
20438 test -z "$ac_c_werror_flag" ||
20439 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020440 } && test -s conftest$ac_exeext &&
20441 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020442 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020443else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020444 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020445sed 's/^/| /' conftest.$ac_ext >&5
20446
Martin v. Löwiseba40652007-08-30 20:10:57 +000020447 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020448fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020449
20450rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020451 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020452fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020453ac_res=`eval echo '${'$as_ac_var'}'`
20454 { echo "$as_me:$LINENO: result: $ac_res" >&5
20455echo "${ECHO_T}$ac_res" >&6; }
20456if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020457 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020458#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020459_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000020460
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020461fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000020462done
20463
Michael W. Hudson54241132001-12-07 15:38:26 +000020464
Martin v. Löwis11437992002-04-12 09:54:03 +000020465
20466
20467
Brett Cannonaa5778d2008-03-18 04:09:00 +000020468for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000020469do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020470as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20471{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20472echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020473if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020474 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020475else
Martin v. Löwis11437992002-04-12 09:54:03 +000020476 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020477/* confdefs.h. */
20478_ACEOF
20479cat confdefs.h >>conftest.$ac_ext
20480cat >>conftest.$ac_ext <<_ACEOF
20481/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020482/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20483 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20484#define $ac_func innocuous_$ac_func
20485
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020486/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020487 which can conflict with char $ac_func (); below.
20488 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020489 <limits.h> exists even on freestanding compilers. */
20490
20491#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020492# include <limits.h>
20493#else
20494# include <assert.h>
20495#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020496
20497#undef $ac_func
20498
Martin v. Löwiseba40652007-08-30 20:10:57 +000020499/* Override any GCC internal prototype to avoid an error.
20500 Use char because int might match the return type of a GCC
20501 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020502#ifdef __cplusplus
20503extern "C"
20504#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020505char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000020506/* The GNU C library defines this for functions which it implements
20507 to always fail with ENOSYS. Some functions are actually named
20508 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020509#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000020510choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000020511#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020512
Skip Montanaro6dead952003-09-25 14:50:04 +000020513int
20514main ()
20515{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020516return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020517 ;
20518 return 0;
20519}
20520_ACEOF
20521rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020522if { (ac_try="$ac_link"
20523case "(($ac_try" in
20524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20525 *) ac_try_echo=$ac_try;;
20526esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020528 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020529 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020530 grep -v '^ *+' conftest.er1 >conftest.err
20531 rm -f conftest.er1
20532 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020534 (exit $ac_status); } && {
20535 test -z "$ac_c_werror_flag" ||
20536 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020537 } && test -s conftest$ac_exeext &&
20538 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020539 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020540else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020542sed 's/^/| /' conftest.$ac_ext >&5
20543
Martin v. Löwiseba40652007-08-30 20:10:57 +000020544 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020545fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020546
20547rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020548 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000020549fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020550ac_res=`eval echo '${'$as_ac_var'}'`
20551 { echo "$as_me:$LINENO: result: $ac_res" >&5
20552echo "${ECHO_T}$ac_res" >&6; }
20553if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020554 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020555#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020556_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000020557
Martin v. Löwis1142de32002-03-29 16:28:31 +000020558else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020559 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020560 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020561 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20562 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020563esac
20564
Martin v. Löwis1142de32002-03-29 16:28:31 +000020565fi
20566done
20567
20568
Martin v. Löwis11437992002-04-12 09:54:03 +000020569
Martin v. Löwis1142de32002-03-29 16:28:31 +000020570for ac_func in getpgrp
20571do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020572as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20573{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20574echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020575if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020576 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000020577else
Martin v. Löwis11437992002-04-12 09:54:03 +000020578 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020579/* confdefs.h. */
20580_ACEOF
20581cat confdefs.h >>conftest.$ac_ext
20582cat >>conftest.$ac_ext <<_ACEOF
20583/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020584/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20585 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20586#define $ac_func innocuous_$ac_func
20587
Martin v. Löwis1142de32002-03-29 16:28:31 +000020588/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020589 which can conflict with char $ac_func (); below.
20590 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020591 <limits.h> exists even on freestanding compilers. */
20592
20593#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020594# include <limits.h>
20595#else
20596# include <assert.h>
20597#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020598
20599#undef $ac_func
20600
Martin v. Löwiseba40652007-08-30 20:10:57 +000020601/* Override any GCC internal prototype to avoid an error.
20602 Use char because int might match the return type of a GCC
20603 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020604#ifdef __cplusplus
20605extern "C"
20606#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020607char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000020608/* The GNU C library defines this for functions which it implements
20609 to always fail with ENOSYS. Some functions are actually named
20610 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020611#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000020612choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000020613#endif
20614
Skip Montanaro6dead952003-09-25 14:50:04 +000020615int
20616main ()
20617{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020618return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020619 ;
20620 return 0;
20621}
20622_ACEOF
20623rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020624if { (ac_try="$ac_link"
20625case "(($ac_try" in
20626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20627 *) ac_try_echo=$ac_try;;
20628esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020630 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020631 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020632 grep -v '^ *+' conftest.er1 >conftest.err
20633 rm -f conftest.er1
20634 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020636 (exit $ac_status); } && {
20637 test -z "$ac_c_werror_flag" ||
20638 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020639 } && test -s conftest$ac_exeext &&
20640 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020641 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020642else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020643 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020644sed 's/^/| /' conftest.$ac_ext >&5
20645
Martin v. Löwiseba40652007-08-30 20:10:57 +000020646 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020647fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020648
20649rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020650 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020651fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020652ac_res=`eval echo '${'$as_ac_var'}'`
20653 { echo "$as_me:$LINENO: result: $ac_res" >&5
20654echo "${ECHO_T}$ac_res" >&6; }
20655if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020656 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020657#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020658_ACEOF
20659 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020660/* confdefs.h. */
20661_ACEOF
20662cat confdefs.h >>conftest.$ac_ext
20663cat >>conftest.$ac_ext <<_ACEOF
20664/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020665#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020666int
20667main ()
20668{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020669getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020670 ;
20671 return 0;
20672}
20673_ACEOF
20674rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020675if { (ac_try="$ac_compile"
20676case "(($ac_try" in
20677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20678 *) ac_try_echo=$ac_try;;
20679esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020680eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020681 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020682 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020683 grep -v '^ *+' conftest.er1 >conftest.err
20684 rm -f conftest.er1
20685 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020687 (exit $ac_status); } && {
20688 test -z "$ac_c_werror_flag" ||
20689 test ! -s conftest.err
20690 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020691
20692cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020693#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020694_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020695
Martin v. Löwis11437992002-04-12 09:54:03 +000020696
Guido van Rossumf78abae1997-01-21 22:02:36 +000020697else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020698 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020699sed 's/^/| /' conftest.$ac_ext >&5
20700
Martin v. Löwiseba40652007-08-30 20:10:57 +000020701
Guido van Rossum627b2d71993-12-24 10:39:16 +000020702fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020703
20704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020705
Guido van Rossum627b2d71993-12-24 10:39:16 +000020706fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020707done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020708
Jack Jansen150753c2003-03-29 22:07:47 +000020709
20710for ac_func in setpgrp
20711do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020712as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20713{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20714echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020715if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020716 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020717else
Martin v. Löwis11437992002-04-12 09:54:03 +000020718 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020719/* confdefs.h. */
20720_ACEOF
20721cat confdefs.h >>conftest.$ac_ext
20722cat >>conftest.$ac_ext <<_ACEOF
20723/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020724/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20725 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20726#define $ac_func innocuous_$ac_func
20727
Jack Jansen150753c2003-03-29 22:07:47 +000020728/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020729 which can conflict with char $ac_func (); below.
20730 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020731 <limits.h> exists even on freestanding compilers. */
20732
20733#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020734# include <limits.h>
20735#else
20736# include <assert.h>
20737#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020738
20739#undef $ac_func
20740
Martin v. Löwiseba40652007-08-30 20:10:57 +000020741/* Override any GCC internal prototype to avoid an error.
20742 Use char because int might match the return type of a GCC
20743 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020744#ifdef __cplusplus
20745extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020746#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020747char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020748/* The GNU C library defines this for functions which it implements
20749 to always fail with ENOSYS. Some functions are actually named
20750 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020751#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020752choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020753#endif
20754
Skip Montanaro6dead952003-09-25 14:50:04 +000020755int
20756main ()
20757{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020758return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020759 ;
20760 return 0;
20761}
20762_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020763rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020764if { (ac_try="$ac_link"
20765case "(($ac_try" in
20766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20767 *) ac_try_echo=$ac_try;;
20768esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020770 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020771 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020772 grep -v '^ *+' conftest.er1 >conftest.err
20773 rm -f conftest.er1
20774 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020776 (exit $ac_status); } && {
20777 test -z "$ac_c_werror_flag" ||
20778 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020779 } && test -s conftest$ac_exeext &&
20780 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000020781 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020782else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020783 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020784sed 's/^/| /' conftest.$ac_ext >&5
20785
Martin v. Löwiseba40652007-08-30 20:10:57 +000020786 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020787fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020788
20789rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020790 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020791fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020792ac_res=`eval echo '${'$as_ac_var'}'`
20793 { echo "$as_me:$LINENO: result: $ac_res" >&5
20794echo "${ECHO_T}$ac_res" >&6; }
20795if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020796 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020797#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020798_ACEOF
20799 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020800/* confdefs.h. */
20801_ACEOF
20802cat confdefs.h >>conftest.$ac_ext
20803cat >>conftest.$ac_ext <<_ACEOF
20804/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020805#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020806int
20807main ()
20808{
20809setpgrp(0,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
Jack Jansen150753c2003-03-29 22:07:47 +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
Martin v. Löwis11437992002-04-12 09:54:03 +000020831
20832cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020833#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020834_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020835
Jack Jansen150753c2003-03-29 22:07:47 +000020836
20837else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020838 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020839sed 's/^/| /' conftest.$ac_ext >&5
20840
Martin v. Löwiseba40652007-08-30 20:10:57 +000020841
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020842fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020843
20844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020845
20846fi
20847done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020848
Martin v. Löwis11437992002-04-12 09:54:03 +000020849
Thomas Wouters3a584202000-08-05 23:28:51 +000020850for ac_func in gettimeofday
20851do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020852as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20853{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20854echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020855if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020856 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020857else
Martin v. Löwis11437992002-04-12 09:54:03 +000020858 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020859/* confdefs.h. */
20860_ACEOF
20861cat confdefs.h >>conftest.$ac_ext
20862cat >>conftest.$ac_ext <<_ACEOF
20863/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020864/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20865 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20866#define $ac_func innocuous_$ac_func
20867
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020868/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020869 which can conflict with char $ac_func (); below.
20870 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020871 <limits.h> exists even on freestanding compilers. */
20872
20873#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020874# include <limits.h>
20875#else
20876# include <assert.h>
20877#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020878
20879#undef $ac_func
20880
Martin v. Löwiseba40652007-08-30 20:10:57 +000020881/* Override any GCC internal prototype to avoid an error.
20882 Use char because int might match the return type of a GCC
20883 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020884#ifdef __cplusplus
20885extern "C"
20886#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020887char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020888/* The GNU C library defines this for functions which it implements
20889 to always fail with ENOSYS. Some functions are actually named
20890 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020891#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020892choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020893#endif
20894
Skip Montanaro6dead952003-09-25 14:50:04 +000020895int
20896main ()
20897{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020898return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020899 ;
20900 return 0;
20901}
20902_ACEOF
20903rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020904if { (ac_try="$ac_link"
20905case "(($ac_try" in
20906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20907 *) ac_try_echo=$ac_try;;
20908esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020910 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020911 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020912 grep -v '^ *+' conftest.er1 >conftest.err
20913 rm -f conftest.er1
20914 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020916 (exit $ac_status); } && {
20917 test -z "$ac_c_werror_flag" ||
20918 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020919 } && test -s conftest$ac_exeext &&
20920 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020921 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020922else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020923 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020924sed 's/^/| /' conftest.$ac_ext >&5
20925
Martin v. Löwiseba40652007-08-30 20:10:57 +000020926 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020927fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020928
20929rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020930 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020931fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020932ac_res=`eval echo '${'$as_ac_var'}'`
20933 { echo "$as_me:$LINENO: result: $ac_res" >&5
20934echo "${ECHO_T}$ac_res" >&6; }
20935if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020936 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020937#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020938_ACEOF
20939 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020940/* confdefs.h. */
20941_ACEOF
20942cat confdefs.h >>conftest.$ac_ext
20943cat >>conftest.$ac_ext <<_ACEOF
20944/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020945#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020946int
20947main ()
20948{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020949gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020950 ;
20951 return 0;
20952}
20953_ACEOF
20954rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020955if { (ac_try="$ac_compile"
20956case "(($ac_try" in
20957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20958 *) ac_try_echo=$ac_try;;
20959esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020961 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020962 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020963 grep -v '^ *+' conftest.er1 >conftest.err
20964 rm -f conftest.er1
20965 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020967 (exit $ac_status); } && {
20968 test -z "$ac_c_werror_flag" ||
20969 test ! -s conftest.err
20970 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020971 :
20972else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020973 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020974sed 's/^/| /' conftest.$ac_ext >&5
20975
Martin v. Löwis11437992002-04-12 09:54:03 +000020976
20977cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020978#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020979_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020980
Martin v. Löwis11437992002-04-12 09:54:03 +000020981
Guido van Rossum627b2d71993-12-24 10:39:16 +000020982fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020983
20984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020985
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020986fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020987done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020988
Michael W. Hudson54241132001-12-07 15:38:26 +000020989
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020990{ echo "$as_me:$LINENO: checking for major" >&5
20991echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020992cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020993/* confdefs.h. */
20994_ACEOF
20995cat confdefs.h >>conftest.$ac_ext
20996cat >>conftest.$ac_ext <<_ACEOF
20997/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020998
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020999#if defined(MAJOR_IN_MKDEV)
21000#include <sys/mkdev.h>
21001#elif defined(MAJOR_IN_SYSMACROS)
21002#include <sys/sysmacros.h>
21003#else
21004#include <sys/types.h>
21005#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021006
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021007int
21008main ()
21009{
21010
21011 makedev(major(0),minor(0));
21012
21013 ;
21014 return 0;
21015}
21016_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000021017rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021018if { (ac_try="$ac_link"
21019case "(($ac_try" in
21020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21021 *) ac_try_echo=$ac_try;;
21022esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021024 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021025 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021026 grep -v '^ *+' conftest.er1 >conftest.err
21027 rm -f conftest.er1
21028 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021030 (exit $ac_status); } && {
21031 test -z "$ac_c_werror_flag" ||
21032 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021033 } && test -s conftest$ac_exeext &&
21034 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021035
21036
21037cat >>confdefs.h <<\_ACEOF
21038#define HAVE_DEVICE_MACROS 1
21039_ACEOF
21040
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021041 { echo "$as_me:$LINENO: result: yes" >&5
21042echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021043
21044else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021045 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021046sed 's/^/| /' conftest.$ac_ext >&5
21047
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021048
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021049 { echo "$as_me:$LINENO: result: no" >&5
21050echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021051
21052fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021053
21054rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021055 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021056
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021057# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000021058# for [no]getaddrinfo in netdb.h.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021059{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
21060echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021061cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021062/* confdefs.h. */
21063_ACEOF
21064cat confdefs.h >>conftest.$ac_ext
21065cat >>conftest.$ac_ext <<_ACEOF
21066/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021067
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000021068#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021069#include <sys/socket.h>
21070#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000021071#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021072
Martin v. Löwis11437992002-04-12 09:54:03 +000021073int
21074main ()
21075{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021076getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000021077 ;
21078 return 0;
21079}
21080_ACEOF
21081rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021082if { (ac_try="$ac_link"
21083case "(($ac_try" in
21084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21085 *) ac_try_echo=$ac_try;;
21086esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021088 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021089 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021090 grep -v '^ *+' conftest.er1 >conftest.err
21091 rm -f conftest.er1
21092 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021094 (exit $ac_status); } && {
21095 test -z "$ac_c_werror_flag" ||
21096 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021097 } && test -s conftest$ac_exeext &&
21098 $as_test_x conftest$ac_exeext; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021099 have_getaddrinfo=yes
21100else
21101 echo "$as_me: failed program was:" >&5
21102sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021103
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021104 have_getaddrinfo=no
21105fi
21106
21107rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21108 conftest$ac_exeext conftest.$ac_ext
21109{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
21110echo "${ECHO_T}$have_getaddrinfo" >&6; }
21111if test $have_getaddrinfo = yes
21112then
21113 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021114echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021115 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
21116 echo $ECHO_N "(cached) $ECHO_C" >&6
21117else
21118 if test "$cross_compiling" = yes; then
21119 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021120else
Martin v. Löwis11437992002-04-12 09:54:03 +000021121 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021122/* confdefs.h. */
21123_ACEOF
21124cat confdefs.h >>conftest.$ac_ext
21125cat >>conftest.$ac_ext <<_ACEOF
21126/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021127
21128#include <sys/types.h>
21129#include <netdb.h>
21130#include <string.h>
21131#include <sys/socket.h>
21132#include <netinet/in.h>
21133
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021134int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021135{
21136 int passive, gaierr, inet4 = 0, inet6 = 0;
21137 struct addrinfo hints, *ai, *aitop;
21138 char straddr[INET6_ADDRSTRLEN], strport[16];
21139
21140 for (passive = 0; passive <= 1; passive++) {
21141 memset(&hints, 0, sizeof(hints));
21142 hints.ai_family = AF_UNSPEC;
21143 hints.ai_flags = passive ? AI_PASSIVE : 0;
21144 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000021145 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021146 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
21147 (void)gai_strerror(gaierr);
21148 goto bad;
21149 }
21150 for (ai = aitop; ai; ai = ai->ai_next) {
21151 if (ai->ai_addr == NULL ||
21152 ai->ai_addrlen == 0 ||
21153 getnameinfo(ai->ai_addr, ai->ai_addrlen,
21154 straddr, sizeof(straddr), strport, sizeof(strport),
21155 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
21156 goto bad;
21157 }
21158 switch (ai->ai_family) {
21159 case AF_INET:
21160 if (strcmp(strport, "54321") != 0) {
21161 goto bad;
21162 }
21163 if (passive) {
21164 if (strcmp(straddr, "0.0.0.0") != 0) {
21165 goto bad;
21166 }
21167 } else {
21168 if (strcmp(straddr, "127.0.0.1") != 0) {
21169 goto bad;
21170 }
21171 }
21172 inet4++;
21173 break;
21174 case AF_INET6:
21175 if (strcmp(strport, "54321") != 0) {
21176 goto bad;
21177 }
21178 if (passive) {
21179 if (strcmp(straddr, "::") != 0) {
21180 goto bad;
21181 }
21182 } else {
21183 if (strcmp(straddr, "::1") != 0) {
21184 goto bad;
21185 }
21186 }
21187 inet6++;
21188 break;
21189 case AF_UNSPEC:
21190 goto bad;
21191 break;
21192 default:
21193 /* another family support? */
21194 break;
21195 }
21196 }
21197 }
21198
21199 if (!(inet4 == 0 || inet4 == 2))
21200 goto bad;
21201 if (!(inet6 == 0 || inet6 == 2))
21202 goto bad;
21203
21204 if (aitop)
21205 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021206 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021207
21208 bad:
21209 if (aitop)
21210 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021211 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021212}
21213
Martin v. Löwis11437992002-04-12 09:54:03 +000021214_ACEOF
21215rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021216if { (ac_try="$ac_link"
21217case "(($ac_try" in
21218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21219 *) ac_try_echo=$ac_try;;
21220esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021221eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021222 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021223 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021225 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021226 { (case "(($ac_try" in
21227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21228 *) ac_try_echo=$ac_try;;
21229esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021231 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021232 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021234 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021235 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021236else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021237 echo "$as_me: program exited with status $ac_status" >&5
21238echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021239sed 's/^/| /' conftest.$ac_ext >&5
21240
Martin v. Löwis11437992002-04-12 09:54:03 +000021241( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021242ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021243fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021244rm -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 +000021245fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021246
21247
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021248fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021249
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021250fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021251
Mark Dickinson0ef0b912009-12-31 21:11:48 +000021252if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021253then
21254 if test $ipv6 = yes
21255 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021256 echo 'Fatal: You must get working getaddrinfo() function.'
21257 echo ' or you can specify "--disable-ipv6"'.
21258 exit 1
21259 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021260else
Martin v. Löwis11437992002-04-12 09:54:03 +000021261
21262cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021263#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021264_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021265
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021266fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021267
Jack Jansen9a66b6d2001-08-08 13:56:14 +000021268for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021269do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021270as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21271{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21272echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021273if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021274 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021275else
Martin v. Löwis11437992002-04-12 09:54:03 +000021276 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021277/* confdefs.h. */
21278_ACEOF
21279cat confdefs.h >>conftest.$ac_ext
21280cat >>conftest.$ac_ext <<_ACEOF
21281/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021282/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21283 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21284#define $ac_func innocuous_$ac_func
21285
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021286/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021287 which can conflict with char $ac_func (); below.
21288 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021289 <limits.h> exists even on freestanding compilers. */
21290
21291#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021292# include <limits.h>
21293#else
21294# include <assert.h>
21295#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021296
21297#undef $ac_func
21298
Martin v. Löwiseba40652007-08-30 20:10:57 +000021299/* Override any GCC internal prototype to avoid an error.
21300 Use char because int might match the return type of a GCC
21301 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021302#ifdef __cplusplus
21303extern "C"
21304#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021305char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021306/* The GNU C library defines this for functions which it implements
21307 to always fail with ENOSYS. Some functions are actually named
21308 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021309#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021310choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021311#endif
21312
Skip Montanaro6dead952003-09-25 14:50:04 +000021313int
21314main ()
21315{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021316return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021317 ;
21318 return 0;
21319}
21320_ACEOF
21321rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021322if { (ac_try="$ac_link"
21323case "(($ac_try" in
21324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21325 *) ac_try_echo=$ac_try;;
21326esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021328 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021329 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021330 grep -v '^ *+' conftest.er1 >conftest.err
21331 rm -f conftest.er1
21332 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021334 (exit $ac_status); } && {
21335 test -z "$ac_c_werror_flag" ||
21336 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021337 } && test -s conftest$ac_exeext &&
21338 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021339 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021340else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021341 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021342sed 's/^/| /' conftest.$ac_ext >&5
21343
Martin v. Löwiseba40652007-08-30 20:10:57 +000021344 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021345fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021346
21347rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021348 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021349fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021350ac_res=`eval echo '${'$as_ac_var'}'`
21351 { echo "$as_me:$LINENO: result: $ac_res" >&5
21352echo "${ECHO_T}$ac_res" >&6; }
21353if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021354 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021355#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021356_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021357
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021358fi
21359done
21360
Michael W. Hudson54241132001-12-07 15:38:26 +000021361
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021362# checks for structures
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021363{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
21364echo $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 +000021365if test "${ac_cv_header_time+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021366 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021367else
Martin v. Löwis11437992002-04-12 09:54:03 +000021368 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021369/* confdefs.h. */
21370_ACEOF
21371cat confdefs.h >>conftest.$ac_ext
21372cat >>conftest.$ac_ext <<_ACEOF
21373/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021374#include <sys/types.h>
21375#include <sys/time.h>
21376#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021377
Martin v. Löwis11437992002-04-12 09:54:03 +000021378int
21379main ()
21380{
21381if ((struct tm *) 0)
21382return 0;
21383 ;
21384 return 0;
21385}
21386_ACEOF
21387rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021388if { (ac_try="$ac_compile"
21389case "(($ac_try" in
21390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21391 *) ac_try_echo=$ac_try;;
21392esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021394 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021395 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021396 grep -v '^ *+' conftest.er1 >conftest.err
21397 rm -f conftest.er1
21398 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021400 (exit $ac_status); } && {
21401 test -z "$ac_c_werror_flag" ||
21402 test ! -s conftest.err
21403 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021404 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021405else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021406 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021407sed 's/^/| /' conftest.$ac_ext >&5
21408
Martin v. Löwiseba40652007-08-30 20:10:57 +000021409 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021410fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021411
21412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021413fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021414{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
21415echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021416if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021417
21418cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021419#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021420_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021421
21422fi
21423
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021424{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
21425echo $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 +000021426if test "${ac_cv_struct_tm+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021427 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021428else
Martin v. Löwis11437992002-04-12 09:54:03 +000021429 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021430/* confdefs.h. */
21431_ACEOF
21432cat confdefs.h >>conftest.$ac_ext
21433cat >>conftest.$ac_ext <<_ACEOF
21434/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021435#include <sys/types.h>
21436#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021437
Martin v. Löwis11437992002-04-12 09:54:03 +000021438int
21439main ()
21440{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021441struct tm tm;
21442 int *p = &tm.tm_sec;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021443 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000021444 ;
21445 return 0;
21446}
21447_ACEOF
21448rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021449if { (ac_try="$ac_compile"
21450case "(($ac_try" in
21451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21452 *) ac_try_echo=$ac_try;;
21453esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021455 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021456 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021457 grep -v '^ *+' conftest.er1 >conftest.err
21458 rm -f conftest.er1
21459 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021461 (exit $ac_status); } && {
21462 test -z "$ac_c_werror_flag" ||
21463 test ! -s conftest.err
21464 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021465 ac_cv_struct_tm=time.h
21466else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021467 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021468sed 's/^/| /' conftest.$ac_ext >&5
21469
Martin v. Löwiseba40652007-08-30 20:10:57 +000021470 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021471fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021472
21473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021474fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021475{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
21476echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021477if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021478
21479cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021480#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021481_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021482
21483fi
21484
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021485{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
21486echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021487if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021488 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021489else
Martin v. Löwis11437992002-04-12 09:54:03 +000021490 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021491/* confdefs.h. */
21492_ACEOF
21493cat confdefs.h >>conftest.$ac_ext
21494cat >>conftest.$ac_ext <<_ACEOF
21495/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021496#include <sys/types.h>
21497#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000021498
21499
Martin v. Löwis11437992002-04-12 09:54:03 +000021500int
21501main ()
21502{
21503static struct tm ac_aggr;
21504if (ac_aggr.tm_zone)
21505return 0;
21506 ;
21507 return 0;
21508}
21509_ACEOF
21510rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021511if { (ac_try="$ac_compile"
21512case "(($ac_try" in
21513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21514 *) ac_try_echo=$ac_try;;
21515esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021517 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021518 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021519 grep -v '^ *+' conftest.er1 >conftest.err
21520 rm -f conftest.er1
21521 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021523 (exit $ac_status); } && {
21524 test -z "$ac_c_werror_flag" ||
21525 test ! -s conftest.err
21526 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021527 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021528else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021529 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021530sed 's/^/| /' conftest.$ac_ext >&5
21531
Martin v. Löwiseba40652007-08-30 20:10:57 +000021532 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021533/* confdefs.h. */
21534_ACEOF
21535cat confdefs.h >>conftest.$ac_ext
21536cat >>conftest.$ac_ext <<_ACEOF
21537/* end confdefs.h. */
21538#include <sys/types.h>
21539#include <$ac_cv_struct_tm>
21540
21541
21542int
21543main ()
21544{
21545static struct tm ac_aggr;
21546if (sizeof ac_aggr.tm_zone)
21547return 0;
21548 ;
21549 return 0;
21550}
21551_ACEOF
21552rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021553if { (ac_try="$ac_compile"
21554case "(($ac_try" in
21555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21556 *) ac_try_echo=$ac_try;;
21557esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021559 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021560 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021561 grep -v '^ *+' conftest.er1 >conftest.err
21562 rm -f conftest.er1
21563 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021565 (exit $ac_status); } && {
21566 test -z "$ac_c_werror_flag" ||
21567 test ! -s conftest.err
21568 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021569 ac_cv_member_struct_tm_tm_zone=yes
21570else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021571 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021572sed 's/^/| /' conftest.$ac_ext >&5
21573
Martin v. Löwiseba40652007-08-30 20:10:57 +000021574 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021575fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021576
21577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021578fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021579
21580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021581fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021582{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21583echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
21584if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021585
21586cat >>confdefs.h <<_ACEOF
21587#define HAVE_STRUCT_TM_TM_ZONE 1
21588_ACEOF
21589
21590
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021591fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021592
Martin v. Löwis11437992002-04-12 09:54:03 +000021593if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21594
21595cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021596#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021597_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021598
21599else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021600 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
21601echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021602if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021603 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000021604else
21605 cat >conftest.$ac_ext <<_ACEOF
21606/* confdefs.h. */
21607_ACEOF
21608cat confdefs.h >>conftest.$ac_ext
21609cat >>conftest.$ac_ext <<_ACEOF
21610/* end confdefs.h. */
21611#include <time.h>
21612
21613int
21614main ()
21615{
21616#ifndef tzname
21617 (void) tzname;
21618#endif
21619
21620 ;
21621 return 0;
21622}
21623_ACEOF
21624rm -f conftest.$ac_objext
21625if { (ac_try="$ac_compile"
21626case "(($ac_try" in
21627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21628 *) ac_try_echo=$ac_try;;
21629esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021631 (eval "$ac_compile") 2>conftest.er1
21632 ac_status=$?
21633 grep -v '^ *+' conftest.er1 >conftest.err
21634 rm -f conftest.er1
21635 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021637 (exit $ac_status); } && {
21638 test -z "$ac_c_werror_flag" ||
21639 test ! -s conftest.err
21640 } && test -s conftest.$ac_objext; then
21641 ac_cv_have_decl_tzname=yes
21642else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021643 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021644sed 's/^/| /' conftest.$ac_ext >&5
21645
21646 ac_cv_have_decl_tzname=no
21647fi
21648
21649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21650fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021651{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
21652echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
21653if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021654
21655cat >>confdefs.h <<_ACEOF
21656#define HAVE_DECL_TZNAME 1
21657_ACEOF
21658
21659
21660else
21661 cat >>confdefs.h <<_ACEOF
21662#define HAVE_DECL_TZNAME 0
21663_ACEOF
21664
21665
21666fi
21667
21668
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021669 { echo "$as_me:$LINENO: checking for tzname" >&5
21670echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021671if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021672 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021673else
Martin v. Löwis11437992002-04-12 09:54:03 +000021674 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021675/* confdefs.h. */
21676_ACEOF
21677cat confdefs.h >>conftest.$ac_ext
21678cat >>conftest.$ac_ext <<_ACEOF
21679/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021680#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000021681#if !HAVE_DECL_TZNAME
21682extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021683#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021684
Martin v. Löwis11437992002-04-12 09:54:03 +000021685int
21686main ()
21687{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021688return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021689 ;
21690 return 0;
21691}
21692_ACEOF
21693rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021694if { (ac_try="$ac_link"
21695case "(($ac_try" in
21696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21697 *) ac_try_echo=$ac_try;;
21698esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021700 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021701 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021702 grep -v '^ *+' conftest.er1 >conftest.err
21703 rm -f conftest.er1
21704 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021706 (exit $ac_status); } && {
21707 test -z "$ac_c_werror_flag" ||
21708 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021709 } && test -s conftest$ac_exeext &&
21710 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021711 ac_cv_var_tzname=yes
21712else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021713 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021714sed 's/^/| /' conftest.$ac_ext >&5
21715
Martin v. Löwiseba40652007-08-30 20:10:57 +000021716 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021717fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021718
21719rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021720 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021721fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021722{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21723echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021724 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021725
21726cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021727#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021728_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021729
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021730 fi
21731fi
21732
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021733{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21734echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021735if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021736 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021737else
21738 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021739/* confdefs.h. */
21740_ACEOF
21741cat confdefs.h >>conftest.$ac_ext
21742cat >>conftest.$ac_ext <<_ACEOF
21743/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021744$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021745int
21746main ()
21747{
21748static struct stat ac_aggr;
21749if (ac_aggr.st_rdev)
21750return 0;
21751 ;
21752 return 0;
21753}
21754_ACEOF
21755rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021756if { (ac_try="$ac_compile"
21757case "(($ac_try" in
21758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21759 *) ac_try_echo=$ac_try;;
21760esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021762 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021763 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021764 grep -v '^ *+' conftest.er1 >conftest.err
21765 rm -f conftest.er1
21766 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021768 (exit $ac_status); } && {
21769 test -z "$ac_c_werror_flag" ||
21770 test ! -s conftest.err
21771 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021772 ac_cv_member_struct_stat_st_rdev=yes
21773else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021775sed 's/^/| /' conftest.$ac_ext >&5
21776
Martin v. Löwiseba40652007-08-30 20:10:57 +000021777 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021778/* confdefs.h. */
21779_ACEOF
21780cat confdefs.h >>conftest.$ac_ext
21781cat >>conftest.$ac_ext <<_ACEOF
21782/* end confdefs.h. */
21783$ac_includes_default
21784int
21785main ()
21786{
21787static struct stat ac_aggr;
21788if (sizeof ac_aggr.st_rdev)
21789return 0;
21790 ;
21791 return 0;
21792}
21793_ACEOF
21794rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021795if { (ac_try="$ac_compile"
21796case "(($ac_try" in
21797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21798 *) ac_try_echo=$ac_try;;
21799esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021801 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021802 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021803 grep -v '^ *+' conftest.er1 >conftest.err
21804 rm -f conftest.er1
21805 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021807 (exit $ac_status); } && {
21808 test -z "$ac_c_werror_flag" ||
21809 test ! -s conftest.err
21810 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021811 ac_cv_member_struct_stat_st_rdev=yes
21812else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021813 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021814sed 's/^/| /' conftest.$ac_ext >&5
21815
Martin v. Löwiseba40652007-08-30 20:10:57 +000021816 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021817fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021818
21819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021820fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021821
21822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021823fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021824{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21825echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21826if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021827
21828cat >>confdefs.h <<_ACEOF
21829#define HAVE_STRUCT_STAT_ST_RDEV 1
21830_ACEOF
21831
21832
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021833fi
21834
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021835{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21836echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021837if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021838 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021839else
Martin v. Löwis11437992002-04-12 09:54:03 +000021840 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021841/* confdefs.h. */
21842_ACEOF
21843cat confdefs.h >>conftest.$ac_ext
21844cat >>conftest.$ac_ext <<_ACEOF
21845/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021846$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021847int
21848main ()
21849{
21850static struct stat ac_aggr;
21851if (ac_aggr.st_blksize)
21852return 0;
21853 ;
21854 return 0;
21855}
21856_ACEOF
21857rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021858if { (ac_try="$ac_compile"
21859case "(($ac_try" in
21860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21861 *) ac_try_echo=$ac_try;;
21862esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021863eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021864 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021865 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021866 grep -v '^ *+' conftest.er1 >conftest.err
21867 rm -f conftest.er1
21868 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021870 (exit $ac_status); } && {
21871 test -z "$ac_c_werror_flag" ||
21872 test ! -s conftest.err
21873 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021874 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021875else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021876 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021877sed 's/^/| /' conftest.$ac_ext >&5
21878
Martin v. Löwiseba40652007-08-30 20:10:57 +000021879 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021880/* confdefs.h. */
21881_ACEOF
21882cat confdefs.h >>conftest.$ac_ext
21883cat >>conftest.$ac_ext <<_ACEOF
21884/* end confdefs.h. */
21885$ac_includes_default
21886int
21887main ()
21888{
21889static struct stat ac_aggr;
21890if (sizeof ac_aggr.st_blksize)
21891return 0;
21892 ;
21893 return 0;
21894}
21895_ACEOF
21896rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021897if { (ac_try="$ac_compile"
21898case "(($ac_try" in
21899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21900 *) ac_try_echo=$ac_try;;
21901esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021903 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021904 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021905 grep -v '^ *+' conftest.er1 >conftest.err
21906 rm -f conftest.er1
21907 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021909 (exit $ac_status); } && {
21910 test -z "$ac_c_werror_flag" ||
21911 test ! -s conftest.err
21912 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021913 ac_cv_member_struct_stat_st_blksize=yes
21914else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021915 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021916sed 's/^/| /' conftest.$ac_ext >&5
21917
Martin v. Löwiseba40652007-08-30 20:10:57 +000021918 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021919fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021920
21921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021922fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021923
21924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021925fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021926{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21927echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21928if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021929
Martin v. Löwis11437992002-04-12 09:54:03 +000021930cat >>confdefs.h <<_ACEOF
21931#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21932_ACEOF
21933
21934
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021935fi
21936
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021937{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21938echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021939if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021940 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021941else
21942 cat >conftest.$ac_ext <<_ACEOF
21943/* confdefs.h. */
21944_ACEOF
21945cat confdefs.h >>conftest.$ac_ext
21946cat >>conftest.$ac_ext <<_ACEOF
21947/* end confdefs.h. */
21948$ac_includes_default
21949int
21950main ()
21951{
21952static struct stat ac_aggr;
21953if (ac_aggr.st_flags)
21954return 0;
21955 ;
21956 return 0;
21957}
21958_ACEOF
21959rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021960if { (ac_try="$ac_compile"
21961case "(($ac_try" in
21962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21963 *) ac_try_echo=$ac_try;;
21964esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021966 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021967 ac_status=$?
21968 grep -v '^ *+' conftest.er1 >conftest.err
21969 rm -f conftest.er1
21970 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021972 (exit $ac_status); } && {
21973 test -z "$ac_c_werror_flag" ||
21974 test ! -s conftest.err
21975 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021976 ac_cv_member_struct_stat_st_flags=yes
21977else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021978 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021979sed 's/^/| /' conftest.$ac_ext >&5
21980
Martin v. Löwiseba40652007-08-30 20:10:57 +000021981 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021982/* confdefs.h. */
21983_ACEOF
21984cat confdefs.h >>conftest.$ac_ext
21985cat >>conftest.$ac_ext <<_ACEOF
21986/* end confdefs.h. */
21987$ac_includes_default
21988int
21989main ()
21990{
21991static struct stat ac_aggr;
21992if (sizeof ac_aggr.st_flags)
21993return 0;
21994 ;
21995 return 0;
21996}
21997_ACEOF
21998rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021999if { (ac_try="$ac_compile"
22000case "(($ac_try" in
22001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22002 *) ac_try_echo=$ac_try;;
22003esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022005 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022006 ac_status=$?
22007 grep -v '^ *+' conftest.er1 >conftest.err
22008 rm -f conftest.er1
22009 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022011 (exit $ac_status); } && {
22012 test -z "$ac_c_werror_flag" ||
22013 test ! -s conftest.err
22014 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022015 ac_cv_member_struct_stat_st_flags=yes
22016else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022017 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022018sed 's/^/| /' conftest.$ac_ext >&5
22019
Martin v. Löwiseba40652007-08-30 20:10:57 +000022020 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022021fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022022
22023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022024fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022025
22026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022027fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022028{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
22029echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
22030if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022031
22032cat >>confdefs.h <<_ACEOF
22033#define HAVE_STRUCT_STAT_ST_FLAGS 1
22034_ACEOF
22035
22036
22037fi
22038
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022039{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
22040echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022041if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022042 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022043else
22044 cat >conftest.$ac_ext <<_ACEOF
22045/* confdefs.h. */
22046_ACEOF
22047cat confdefs.h >>conftest.$ac_ext
22048cat >>conftest.$ac_ext <<_ACEOF
22049/* end confdefs.h. */
22050$ac_includes_default
22051int
22052main ()
22053{
22054static struct stat ac_aggr;
22055if (ac_aggr.st_gen)
22056return 0;
22057 ;
22058 return 0;
22059}
22060_ACEOF
22061rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022062if { (ac_try="$ac_compile"
22063case "(($ac_try" in
22064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22065 *) ac_try_echo=$ac_try;;
22066esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022068 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022069 ac_status=$?
22070 grep -v '^ *+' conftest.er1 >conftest.err
22071 rm -f conftest.er1
22072 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022074 (exit $ac_status); } && {
22075 test -z "$ac_c_werror_flag" ||
22076 test ! -s conftest.err
22077 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022078 ac_cv_member_struct_stat_st_gen=yes
22079else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022080 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022081sed 's/^/| /' conftest.$ac_ext >&5
22082
Martin v. Löwiseba40652007-08-30 20:10:57 +000022083 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022084/* confdefs.h. */
22085_ACEOF
22086cat confdefs.h >>conftest.$ac_ext
22087cat >>conftest.$ac_ext <<_ACEOF
22088/* end confdefs.h. */
22089$ac_includes_default
22090int
22091main ()
22092{
22093static struct stat ac_aggr;
22094if (sizeof ac_aggr.st_gen)
22095return 0;
22096 ;
22097 return 0;
22098}
22099_ACEOF
22100rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022101if { (ac_try="$ac_compile"
22102case "(($ac_try" in
22103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22104 *) ac_try_echo=$ac_try;;
22105esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022107 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022108 ac_status=$?
22109 grep -v '^ *+' conftest.er1 >conftest.err
22110 rm -f conftest.er1
22111 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022113 (exit $ac_status); } && {
22114 test -z "$ac_c_werror_flag" ||
22115 test ! -s conftest.err
22116 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022117 ac_cv_member_struct_stat_st_gen=yes
22118else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022119 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022120sed 's/^/| /' conftest.$ac_ext >&5
22121
Martin v. Löwiseba40652007-08-30 20:10:57 +000022122 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022123fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022124
22125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022126fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022127
22128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022129fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022130{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
22131echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
22132if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022133
22134cat >>confdefs.h <<_ACEOF
22135#define HAVE_STRUCT_STAT_ST_GEN 1
22136_ACEOF
22137
22138
22139fi
22140
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022141{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
22142echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022143if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022144 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022145else
22146 cat >conftest.$ac_ext <<_ACEOF
22147/* confdefs.h. */
22148_ACEOF
22149cat confdefs.h >>conftest.$ac_ext
22150cat >>conftest.$ac_ext <<_ACEOF
22151/* end confdefs.h. */
22152$ac_includes_default
22153int
22154main ()
22155{
22156static struct stat ac_aggr;
22157if (ac_aggr.st_birthtime)
22158return 0;
22159 ;
22160 return 0;
22161}
22162_ACEOF
22163rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022164if { (ac_try="$ac_compile"
22165case "(($ac_try" in
22166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22167 *) ac_try_echo=$ac_try;;
22168esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022170 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022171 ac_status=$?
22172 grep -v '^ *+' conftest.er1 >conftest.err
22173 rm -f conftest.er1
22174 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022176 (exit $ac_status); } && {
22177 test -z "$ac_c_werror_flag" ||
22178 test ! -s conftest.err
22179 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022180 ac_cv_member_struct_stat_st_birthtime=yes
22181else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022182 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022183sed 's/^/| /' conftest.$ac_ext >&5
22184
Martin v. Löwiseba40652007-08-30 20:10:57 +000022185 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022186/* confdefs.h. */
22187_ACEOF
22188cat confdefs.h >>conftest.$ac_ext
22189cat >>conftest.$ac_ext <<_ACEOF
22190/* end confdefs.h. */
22191$ac_includes_default
22192int
22193main ()
22194{
22195static struct stat ac_aggr;
22196if (sizeof ac_aggr.st_birthtime)
22197return 0;
22198 ;
22199 return 0;
22200}
22201_ACEOF
22202rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022203if { (ac_try="$ac_compile"
22204case "(($ac_try" in
22205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22206 *) ac_try_echo=$ac_try;;
22207esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022209 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022210 ac_status=$?
22211 grep -v '^ *+' conftest.er1 >conftest.err
22212 rm -f conftest.er1
22213 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022215 (exit $ac_status); } && {
22216 test -z "$ac_c_werror_flag" ||
22217 test ! -s conftest.err
22218 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022219 ac_cv_member_struct_stat_st_birthtime=yes
22220else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022221 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022222sed 's/^/| /' conftest.$ac_ext >&5
22223
Martin v. Löwiseba40652007-08-30 20:10:57 +000022224 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022225fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022226
22227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022228fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022229
22230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022231fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022232{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
22233echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
22234if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022235
22236cat >>confdefs.h <<_ACEOF
22237#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
22238_ACEOF
22239
22240
22241fi
22242
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022243{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
22244echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022245if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022246 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022247else
Martin v. Löwis11437992002-04-12 09:54:03 +000022248 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022249/* confdefs.h. */
22250_ACEOF
22251cat confdefs.h >>conftest.$ac_ext
22252cat >>conftest.$ac_ext <<_ACEOF
22253/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022254$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022255int
22256main ()
22257{
22258static struct stat ac_aggr;
22259if (ac_aggr.st_blocks)
22260return 0;
22261 ;
22262 return 0;
22263}
22264_ACEOF
22265rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022266if { (ac_try="$ac_compile"
22267case "(($ac_try" in
22268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22269 *) ac_try_echo=$ac_try;;
22270esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022271eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022272 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022273 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022274 grep -v '^ *+' conftest.er1 >conftest.err
22275 rm -f conftest.er1
22276 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022278 (exit $ac_status); } && {
22279 test -z "$ac_c_werror_flag" ||
22280 test ! -s conftest.err
22281 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022282 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000022283else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022284 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022285sed 's/^/| /' conftest.$ac_ext >&5
22286
Martin v. Löwiseba40652007-08-30 20:10:57 +000022287 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022288/* confdefs.h. */
22289_ACEOF
22290cat confdefs.h >>conftest.$ac_ext
22291cat >>conftest.$ac_ext <<_ACEOF
22292/* end confdefs.h. */
22293$ac_includes_default
22294int
22295main ()
22296{
22297static struct stat ac_aggr;
22298if (sizeof ac_aggr.st_blocks)
22299return 0;
22300 ;
22301 return 0;
22302}
22303_ACEOF
22304rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022305if { (ac_try="$ac_compile"
22306case "(($ac_try" in
22307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22308 *) ac_try_echo=$ac_try;;
22309esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022310eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022311 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000022312 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022313 grep -v '^ *+' conftest.er1 >conftest.err
22314 rm -f conftest.er1
22315 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022317 (exit $ac_status); } && {
22318 test -z "$ac_c_werror_flag" ||
22319 test ! -s conftest.err
22320 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022321 ac_cv_member_struct_stat_st_blocks=yes
22322else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022323 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022324sed 's/^/| /' conftest.$ac_ext >&5
22325
Martin v. Löwiseba40652007-08-30 20:10:57 +000022326 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000022327fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022328
22329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022330fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022331
22332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000022333fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022334{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
22335echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
22336if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000022337
Martin v. Löwis11437992002-04-12 09:54:03 +000022338cat >>confdefs.h <<_ACEOF
22339#define HAVE_STRUCT_STAT_ST_BLOCKS 1
22340_ACEOF
22341
22342
22343cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022344#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022345_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022346
22347else
Martin v. Löwiseba40652007-08-30 20:10:57 +000022348 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000022349 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022350 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
22351 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022352esac
22353
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022354fi
22355
Michael W. Hudson54241132001-12-07 15:38:26 +000022356
Martin v. Löwis11437992002-04-12 09:54:03 +000022357
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022358{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
22359echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022360if test "${ac_cv_header_time_altzone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022361 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022362else
Martin v. Löwis11437992002-04-12 09:54:03 +000022363 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022364/* confdefs.h. */
22365_ACEOF
22366cat confdefs.h >>conftest.$ac_ext
22367cat >>conftest.$ac_ext <<_ACEOF
22368/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022369#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022370int
22371main ()
22372{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022373return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000022374 ;
22375 return 0;
22376}
22377_ACEOF
22378rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022379if { (ac_try="$ac_compile"
22380case "(($ac_try" in
22381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22382 *) ac_try_echo=$ac_try;;
22383esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022384eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022385 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022386 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022387 grep -v '^ *+' conftest.er1 >conftest.err
22388 rm -f conftest.er1
22389 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022391 (exit $ac_status); } && {
22392 test -z "$ac_c_werror_flag" ||
22393 test ! -s conftest.err
22394 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022395 ac_cv_header_time_altzone=yes
22396else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022397 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022398sed 's/^/| /' conftest.$ac_ext >&5
22399
Martin v. Löwiseba40652007-08-30 20:10:57 +000022400 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022401fi
22402
Martin v. Löwiseba40652007-08-30 20:10:57 +000022403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22404fi
22405
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022406{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
22407echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022408if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022409
22410cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022411#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022412_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022413
22414fi
22415
Guido van Rossumda88dad1995-01-26 00:46:29 +000022416was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022417{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
22418echo $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 +000022419cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022420/* confdefs.h. */
22421_ACEOF
22422cat confdefs.h >>conftest.$ac_ext
22423cat >>conftest.$ac_ext <<_ACEOF
22424/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022425
22426#include <sys/types.h>
22427#include <sys/select.h>
22428#include <sys/time.h>
22429
Martin v. Löwis11437992002-04-12 09:54:03 +000022430int
22431main ()
22432{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022433;
Martin v. Löwis11437992002-04-12 09:54:03 +000022434 ;
22435 return 0;
22436}
22437_ACEOF
22438rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022439if { (ac_try="$ac_compile"
22440case "(($ac_try" in
22441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22442 *) ac_try_echo=$ac_try;;
22443esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022445 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022446 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022447 grep -v '^ *+' conftest.er1 >conftest.err
22448 rm -f conftest.er1
22449 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022451 (exit $ac_status); } && {
22452 test -z "$ac_c_werror_flag" ||
22453 test ! -s conftest.err
22454 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022455
22456
22457cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022458#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022459_ACEOF
22460
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022461 was_it_defined=yes
22462
Guido van Rossumf78abae1997-01-21 22:02:36 +000022463else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022464 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022465sed 's/^/| /' conftest.$ac_ext >&5
22466
Brett Cannon19fab762007-06-02 03:02:29 +000022467
Martin v. Löwiseba40652007-08-30 20:10:57 +000022468fi
22469
22470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022471{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
22472echo "${ECHO_T}$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022473
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022474{ echo "$as_me:$LINENO: checking for addrinfo" >&5
22475echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022476if test "${ac_cv_struct_addrinfo+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022477 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022478else
Martin v. Löwis11437992002-04-12 09:54:03 +000022479 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022480/* confdefs.h. */
22481_ACEOF
22482cat confdefs.h >>conftest.$ac_ext
22483cat >>conftest.$ac_ext <<_ACEOF
22484/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022485
22486# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022487int
22488main ()
22489{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022490struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000022491 ;
22492 return 0;
22493}
22494_ACEOF
22495rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022496if { (ac_try="$ac_compile"
22497case "(($ac_try" in
22498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22499 *) ac_try_echo=$ac_try;;
22500esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022502 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022503 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022504 grep -v '^ *+' conftest.er1 >conftest.err
22505 rm -f conftest.er1
22506 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022508 (exit $ac_status); } && {
22509 test -z "$ac_c_werror_flag" ||
22510 test ! -s conftest.err
22511 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022512 ac_cv_struct_addrinfo=yes
22513else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022514 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022515sed 's/^/| /' conftest.$ac_ext >&5
22516
Martin v. Löwiseba40652007-08-30 20:10:57 +000022517 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022518fi
22519
Martin v. Löwiseba40652007-08-30 20:10:57 +000022520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22521fi
22522
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022523{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
22524echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022525if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022526
22527cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022528#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022529_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022530
22531fi
22532
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022533{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
22534echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022535if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022536 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022537else
Martin v. Löwis11437992002-04-12 09:54:03 +000022538 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022539/* confdefs.h. */
22540_ACEOF
22541cat confdefs.h >>conftest.$ac_ext
22542cat >>conftest.$ac_ext <<_ACEOF
22543/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022544
22545# include <sys/types.h>
22546# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022547int
22548main ()
22549{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022550struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000022551 ;
22552 return 0;
22553}
22554_ACEOF
22555rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022556if { (ac_try="$ac_compile"
22557case "(($ac_try" in
22558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22559 *) ac_try_echo=$ac_try;;
22560esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022562 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022563 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022564 grep -v '^ *+' conftest.er1 >conftest.err
22565 rm -f conftest.er1
22566 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022568 (exit $ac_status); } && {
22569 test -z "$ac_c_werror_flag" ||
22570 test ! -s conftest.err
22571 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022572 ac_cv_struct_sockaddr_storage=yes
22573else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022574 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022575sed 's/^/| /' conftest.$ac_ext >&5
22576
Martin v. Löwiseba40652007-08-30 20:10:57 +000022577 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022578fi
22579
Martin v. Löwiseba40652007-08-30 20:10:57 +000022580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22581fi
22582
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022583{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
22584echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022585if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022586
22587cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022588#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022589_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022590
22591fi
22592
Guido van Rossum627b2d71993-12-24 10:39:16 +000022593# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000022594
Michael W. Hudson54241132001-12-07 15:38:26 +000022595
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022596{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
22597echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022598if test "${ac_cv_c_char_unsigned+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022599 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000022600else
Martin v. Löwis11437992002-04-12 09:54:03 +000022601 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022602/* confdefs.h. */
22603_ACEOF
22604cat confdefs.h >>conftest.$ac_ext
22605cat >>conftest.$ac_ext <<_ACEOF
22606/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022607$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022608int
22609main ()
22610{
22611static int test_array [1 - 2 * !(((char) -1) < 0)];
22612test_array [0] = 0
22613
22614 ;
22615 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000022616}
Martin v. Löwis11437992002-04-12 09:54:03 +000022617_ACEOF
22618rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022619if { (ac_try="$ac_compile"
22620case "(($ac_try" in
22621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22622 *) ac_try_echo=$ac_try;;
22623esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022625 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022626 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022627 grep -v '^ *+' conftest.er1 >conftest.err
22628 rm -f conftest.er1
22629 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022631 (exit $ac_status); } && {
22632 test -z "$ac_c_werror_flag" ||
22633 test ! -s conftest.err
22634 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022635 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022636else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022637 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022638sed 's/^/| /' conftest.$ac_ext >&5
22639
Martin v. Löwiseba40652007-08-30 20:10:57 +000022640 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022641fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022642
22643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022644fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022645{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
22646echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022647if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022648 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022649#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022650_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022651
22652fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000022653
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022654{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
22655echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022656if test "${ac_cv_c_const+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022657 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022658else
22659 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022660/* confdefs.h. */
22661_ACEOF
22662cat confdefs.h >>conftest.$ac_ext
22663cat >>conftest.$ac_ext <<_ACEOF
22664/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022665
Martin v. Löwis11437992002-04-12 09:54:03 +000022666int
22667main ()
22668{
22669/* FIXME: Include the comments suggested by Paul. */
22670#ifndef __cplusplus
22671 /* Ultrix mips cc rejects this. */
22672 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000022673 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022674 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022675 char const *const *pcpcc;
22676 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022677 /* NEC SVR4.0.2 mips cc rejects this. */
22678 struct point {int x, y;};
22679 static struct point const zero = {0,0};
22680 /* AIX XL C 1.02.0.0 rejects this.
22681 It does not let you subtract one const X* pointer from another in
22682 an arm of an if-expression whose if-part is not a constant
22683 expression */
22684 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000022685 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022686 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022687 ++pcpcc;
22688 ppc = (char**) pcpcc;
22689 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022690 { /* SCO 3.2v4 cc rejects this. */
22691 char *t;
22692 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022693
Martin v. Löwis11437992002-04-12 09:54:03 +000022694 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022695 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022696 }
22697 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22698 int x[] = {25, 17};
22699 const int *foo = &x[0];
22700 ++foo;
22701 }
22702 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22703 typedef const int *iptr;
22704 iptr p = 0;
22705 ++p;
22706 }
22707 { /* AIX XL C 1.02.0.0 rejects this saying
22708 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22709 struct s { int j; const int *ap[3]; };
22710 struct s *b; b->j = 5;
22711 }
22712 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22713 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022714 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022715 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022716 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022717#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022718
Martin v. Löwis11437992002-04-12 09:54:03 +000022719 ;
22720 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022721}
Martin v. Löwis11437992002-04-12 09:54:03 +000022722_ACEOF
22723rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022724if { (ac_try="$ac_compile"
22725case "(($ac_try" in
22726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22727 *) ac_try_echo=$ac_try;;
22728esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022730 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022731 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022732 grep -v '^ *+' conftest.er1 >conftest.err
22733 rm -f conftest.er1
22734 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022736 (exit $ac_status); } && {
22737 test -z "$ac_c_werror_flag" ||
22738 test ! -s conftest.err
22739 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022740 ac_cv_c_const=yes
22741else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022743sed 's/^/| /' conftest.$ac_ext >&5
22744
Martin v. Löwiseba40652007-08-30 20:10:57 +000022745 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022746fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022747
22748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022749fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022750{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22751echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022752if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022753
22754cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022755#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000022756_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022757
22758fi
22759
Michael W. Hudson54241132001-12-07 15:38:26 +000022760
Guido van Rossumda88dad1995-01-26 00:46:29 +000022761works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022762{ echo "$as_me:$LINENO: checking for working volatile" >&5
22763echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022764cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022765/* confdefs.h. */
22766_ACEOF
22767cat confdefs.h >>conftest.$ac_ext
22768cat >>conftest.$ac_ext <<_ACEOF
22769/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000022770
Martin v. Löwis11437992002-04-12 09:54:03 +000022771int
22772main ()
22773{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022774volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022775 ;
22776 return 0;
22777}
22778_ACEOF
22779rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022780if { (ac_try="$ac_compile"
22781case "(($ac_try" in
22782 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22783 *) ac_try_echo=$ac_try;;
22784esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022785eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022786 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022787 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022788 grep -v '^ *+' conftest.er1 >conftest.err
22789 rm -f conftest.er1
22790 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022792 (exit $ac_status); } && {
22793 test -z "$ac_c_werror_flag" ||
22794 test ! -s conftest.err
22795 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022796 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022797else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022798 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022799sed 's/^/| /' conftest.$ac_ext >&5
22800
Martin v. Löwis11437992002-04-12 09:54:03 +000022801
22802cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022803#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022804_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022805
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022806
Guido van Rossum627b2d71993-12-24 10:39:16 +000022807fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022808
22809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022810{ echo "$as_me:$LINENO: result: $works" >&5
22811echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022812
Guido van Rossumda88dad1995-01-26 00:46:29 +000022813works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022814{ echo "$as_me:$LINENO: checking for working signed char" >&5
22815echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022816cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022817/* confdefs.h. */
22818_ACEOF
22819cat confdefs.h >>conftest.$ac_ext
22820cat >>conftest.$ac_ext <<_ACEOF
22821/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022822
Martin v. Löwis11437992002-04-12 09:54:03 +000022823int
22824main ()
22825{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022826signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022827 ;
22828 return 0;
22829}
22830_ACEOF
22831rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022832if { (ac_try="$ac_compile"
22833case "(($ac_try" in
22834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22835 *) ac_try_echo=$ac_try;;
22836esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022838 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022839 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022840 grep -v '^ *+' conftest.er1 >conftest.err
22841 rm -f conftest.er1
22842 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022844 (exit $ac_status); } && {
22845 test -z "$ac_c_werror_flag" ||
22846 test ! -s conftest.err
22847 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022848 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022849else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022850 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022851sed 's/^/| /' conftest.$ac_ext >&5
22852
Martin v. Löwis11437992002-04-12 09:54:03 +000022853
22854cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022855#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022856_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022857
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022858
Guido van Rossum7f43da71994-08-01 12:15:30 +000022859fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022860
22861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022862{ echo "$as_me:$LINENO: result: $works" >&5
22863echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022864
Guido van Rossumda88dad1995-01-26 00:46:29 +000022865have_prototypes=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022866{ echo "$as_me:$LINENO: checking for prototypes" >&5
22867echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022868cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022869/* confdefs.h. */
22870_ACEOF
22871cat confdefs.h >>conftest.$ac_ext
22872cat >>conftest.$ac_ext <<_ACEOF
22873/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022874int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022875int
22876main ()
22877{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022878return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022879 ;
22880 return 0;
22881}
22882_ACEOF
22883rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022884if { (ac_try="$ac_compile"
22885case "(($ac_try" in
22886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22887 *) ac_try_echo=$ac_try;;
22888esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022890 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022891 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022892 grep -v '^ *+' conftest.er1 >conftest.err
22893 rm -f conftest.er1
22894 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022896 (exit $ac_status); } && {
22897 test -z "$ac_c_werror_flag" ||
22898 test ! -s conftest.err
22899 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022900
22901
22902cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022903#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022904_ACEOF
22905
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022906 have_prototypes=yes
22907
Guido van Rossumf78abae1997-01-21 22:02:36 +000022908else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022909 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022910sed 's/^/| /' conftest.$ac_ext >&5
22911
Martin v. Löwiseba40652007-08-30 20:10:57 +000022912
Guido van Rossum7f43da71994-08-01 12:15:30 +000022913fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022914
22915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022916{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22917echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022918
Guido van Rossumda88dad1995-01-26 00:46:29 +000022919works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022920{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22921echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022922cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022923/* confdefs.h. */
22924_ACEOF
22925cat confdefs.h >>conftest.$ac_ext
22926cat >>conftest.$ac_ext <<_ACEOF
22927/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022928
22929#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022930int foo(int x, ...) {
22931 va_list va;
22932 va_start(va, x);
22933 va_arg(va, int);
22934 va_arg(va, char *);
22935 va_arg(va, double);
22936 return 0;
22937}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022938
Martin v. Löwis11437992002-04-12 09:54:03 +000022939int
22940main ()
22941{
Guido van Rossum90eea071996-08-30 20:58:57 +000022942return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022943 ;
22944 return 0;
22945}
22946_ACEOF
22947rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022948if { (ac_try="$ac_compile"
22949case "(($ac_try" in
22950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22951 *) ac_try_echo=$ac_try;;
22952esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022954 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022955 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022956 grep -v '^ *+' conftest.er1 >conftest.err
22957 rm -f conftest.er1
22958 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022960 (exit $ac_status); } && {
22961 test -z "$ac_c_werror_flag" ||
22962 test ! -s conftest.err
22963 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022964
22965
22966cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022967#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022968_ACEOF
22969
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022970 works=yes
22971
Guido van Rossumf78abae1997-01-21 22:02:36 +000022972else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022973 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022974sed 's/^/| /' conftest.$ac_ext >&5
22975
Martin v. Löwiseba40652007-08-30 20:10:57 +000022976
Guido van Rossum627b2d71993-12-24 10:39:16 +000022977fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022978
22979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022980{ echo "$as_me:$LINENO: result: $works" >&5
22981echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022982
Martin v. Löwisd6320502004-08-12 13:45:08 +000022983# check for socketpair
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022984{ echo "$as_me:$LINENO: checking for socketpair" >&5
22985echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022986cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022987/* confdefs.h. */
22988_ACEOF
22989cat confdefs.h >>conftest.$ac_ext
22990cat >>conftest.$ac_ext <<_ACEOF
22991/* end confdefs.h. */
22992
22993#include <sys/types.h>
22994#include <sys/socket.h>
22995
22996int
22997main ()
22998{
22999void *x=socketpair
23000 ;
23001 return 0;
23002}
23003_ACEOF
23004rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023005if { (ac_try="$ac_compile"
23006case "(($ac_try" in
23007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23008 *) ac_try_echo=$ac_try;;
23009esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023010eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023011 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000023012 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023013 grep -v '^ *+' conftest.er1 >conftest.err
23014 rm -f conftest.er1
23015 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023017 (exit $ac_status); } && {
23018 test -z "$ac_c_werror_flag" ||
23019 test ! -s conftest.err
23020 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000023021
23022cat >>confdefs.h <<\_ACEOF
23023#define HAVE_SOCKETPAIR 1
23024_ACEOF
23025
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023026 { echo "$as_me:$LINENO: result: yes" >&5
23027echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000023028else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023029 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000023030sed 's/^/| /' conftest.$ac_ext >&5
23031
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023032 { echo "$as_me:$LINENO: result: no" >&5
23033echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000023034
23035fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023036
23037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000023038
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023039# check if sockaddr has sa_len member
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023040{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
23041echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023042cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023043/* confdefs.h. */
23044_ACEOF
23045cat confdefs.h >>conftest.$ac_ext
23046cat >>conftest.$ac_ext <<_ACEOF
23047/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023048#include <sys/types.h>
23049#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023050int
23051main ()
23052{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023053struct sockaddr x;
23054x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000023055 ;
23056 return 0;
23057}
23058_ACEOF
23059rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023060if { (ac_try="$ac_compile"
23061case "(($ac_try" in
23062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23063 *) ac_try_echo=$ac_try;;
23064esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023065eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023066 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023067 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023068 grep -v '^ *+' conftest.er1 >conftest.err
23069 rm -f conftest.er1
23070 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023072 (exit $ac_status); } && {
23073 test -z "$ac_c_werror_flag" ||
23074 test ! -s conftest.err
23075 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023076 { echo "$as_me:$LINENO: result: yes" >&5
23077echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023078
23079cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023080#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023081_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023082
23083else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023084 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023085sed 's/^/| /' conftest.$ac_ext >&5
23086
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023087 { echo "$as_me:$LINENO: result: no" >&5
23088echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023089fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023090
23091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023092
Guido van Rossumda88dad1995-01-26 00:46:29 +000023093va_list_is_array=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023094{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
23095echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023096cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023097/* confdefs.h. */
23098_ACEOF
23099cat confdefs.h >>conftest.$ac_ext
23100cat >>conftest.$ac_ext <<_ACEOF
23101/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023102
23103#ifdef HAVE_STDARG_PROTOTYPES
23104#include <stdarg.h>
23105#else
23106#include <varargs.h>
23107#endif
23108
Martin v. Löwis11437992002-04-12 09:54:03 +000023109int
23110main ()
23111{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023112va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000023113 ;
23114 return 0;
23115}
23116_ACEOF
23117rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023118if { (ac_try="$ac_compile"
23119case "(($ac_try" in
23120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23121 *) ac_try_echo=$ac_try;;
23122esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023124 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023125 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023126 grep -v '^ *+' conftest.er1 >conftest.err
23127 rm -f conftest.er1
23128 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023130 (exit $ac_status); } && {
23131 test -z "$ac_c_werror_flag" ||
23132 test ! -s conftest.err
23133 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023134 :
23135else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023136 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023137sed 's/^/| /' conftest.$ac_ext >&5
23138
Martin v. Löwis11437992002-04-12 09:54:03 +000023139
23140
23141cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023142#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023143_ACEOF
23144
Guido van Rossumda88dad1995-01-26 00:46:29 +000023145 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000023146
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023147fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023148
23149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023150{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
23151echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023152
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023153# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000023154
23155
23156
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023157{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
23158echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023159if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023160 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023161else
Martin v. Löwis11437992002-04-12 09:54:03 +000023162 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023163/* confdefs.h. */
23164_ACEOF
23165cat confdefs.h >>conftest.$ac_ext
23166cat >>conftest.$ac_ext <<_ACEOF
23167/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023168/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
23169 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23170#define gethostbyname_r innocuous_gethostbyname_r
23171
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023172/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023173 which can conflict with char gethostbyname_r (); below.
23174 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023175 <limits.h> exists even on freestanding compilers. */
23176
23177#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023178# include <limits.h>
23179#else
23180# include <assert.h>
23181#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023182
23183#undef gethostbyname_r
23184
Martin v. Löwiseba40652007-08-30 20:10:57 +000023185/* Override any GCC internal prototype to avoid an error.
23186 Use char because int might match the return type of a GCC
23187 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023188#ifdef __cplusplus
23189extern "C"
23190#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023191char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023192/* The GNU C library defines this for functions which it implements
23193 to always fail with ENOSYS. Some functions are actually named
23194 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023195#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023196choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023197#endif
23198
Skip Montanaro6dead952003-09-25 14:50:04 +000023199int
23200main ()
23201{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023202return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023203 ;
23204 return 0;
23205}
23206_ACEOF
23207rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023208if { (ac_try="$ac_link"
23209case "(($ac_try" in
23210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23211 *) ac_try_echo=$ac_try;;
23212esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023214 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023215 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023216 grep -v '^ *+' conftest.er1 >conftest.err
23217 rm -f conftest.er1
23218 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023220 (exit $ac_status); } && {
23221 test -z "$ac_c_werror_flag" ||
23222 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023223 } && test -s conftest$ac_exeext &&
23224 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023225 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023226else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023227 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023228sed 's/^/| /' conftest.$ac_ext >&5
23229
Martin v. Löwiseba40652007-08-30 20:10:57 +000023230 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023231fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023232
23233rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023234 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023235fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023236{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
23237echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
23238if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023239
Martin v. Löwis11437992002-04-12 09:54:03 +000023240 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023241#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023242_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023243
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023244 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
23245echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023246 OLD_CFLAGS=$CFLAGS
23247 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023248 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023249/* confdefs.h. */
23250_ACEOF
23251cat confdefs.h >>conftest.$ac_ext
23252cat >>conftest.$ac_ext <<_ACEOF
23253/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023254
23255# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023256
Martin v. Löwis11437992002-04-12 09:54:03 +000023257int
23258main ()
23259{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023260
23261 char *name;
23262 struct hostent *he, *res;
23263 char buffer[2048];
23264 int buflen = 2048;
23265 int h_errnop;
23266
23267 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000023268
23269 ;
23270 return 0;
23271}
23272_ACEOF
23273rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023274if { (ac_try="$ac_compile"
23275case "(($ac_try" in
23276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23277 *) ac_try_echo=$ac_try;;
23278esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023280 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023281 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023282 grep -v '^ *+' conftest.er1 >conftest.err
23283 rm -f conftest.er1
23284 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023286 (exit $ac_status); } && {
23287 test -z "$ac_c_werror_flag" ||
23288 test ! -s conftest.err
23289 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023290
23291 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023292#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023293_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023294
Martin v. Löwis11437992002-04-12 09:54:03 +000023295
23296cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023297#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023298_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023299
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023300 { echo "$as_me:$LINENO: result: yes" >&5
23301echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023302
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023303else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023304 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023305sed 's/^/| /' conftest.$ac_ext >&5
23306
Martin v. Löwis11437992002-04-12 09:54:03 +000023307
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023308 { echo "$as_me:$LINENO: result: no" >&5
23309echo "${ECHO_T}no" >&6; }
23310 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
23311echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023312 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023313/* confdefs.h. */
23314_ACEOF
23315cat confdefs.h >>conftest.$ac_ext
23316cat >>conftest.$ac_ext <<_ACEOF
23317/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023318
23319# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023320
Martin v. Löwis11437992002-04-12 09:54:03 +000023321int
23322main ()
23323{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023324
23325 char *name;
23326 struct hostent *he;
23327 char buffer[2048];
23328 int buflen = 2048;
23329 int h_errnop;
23330
23331 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000023332
23333 ;
23334 return 0;
23335}
23336_ACEOF
23337rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023338if { (ac_try="$ac_compile"
23339case "(($ac_try" in
23340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23341 *) ac_try_echo=$ac_try;;
23342esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023344 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023345 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023346 grep -v '^ *+' conftest.er1 >conftest.err
23347 rm -f conftest.er1
23348 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023350 (exit $ac_status); } && {
23351 test -z "$ac_c_werror_flag" ||
23352 test ! -s conftest.err
23353 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023354
23355 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023356#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023357_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023358
Martin v. Löwis11437992002-04-12 09:54:03 +000023359
23360cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023361#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023362_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023363
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023364 { echo "$as_me:$LINENO: result: yes" >&5
23365echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023366
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023367else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023368 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023369sed 's/^/| /' conftest.$ac_ext >&5
23370
Martin v. Löwis11437992002-04-12 09:54:03 +000023371
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023372 { echo "$as_me:$LINENO: result: no" >&5
23373echo "${ECHO_T}no" >&6; }
23374 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
23375echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023376 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023377/* confdefs.h. */
23378_ACEOF
23379cat confdefs.h >>conftest.$ac_ext
23380cat >>conftest.$ac_ext <<_ACEOF
23381/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023382
23383# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023384
Martin v. Löwis11437992002-04-12 09:54:03 +000023385int
23386main ()
23387{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023388
23389 char *name;
23390 struct hostent *he;
23391 struct hostent_data data;
23392
23393 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000023394
23395 ;
23396 return 0;
23397}
23398_ACEOF
23399rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023400if { (ac_try="$ac_compile"
23401case "(($ac_try" in
23402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23403 *) ac_try_echo=$ac_try;;
23404esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023405eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023406 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023407 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023408 grep -v '^ *+' conftest.er1 >conftest.err
23409 rm -f conftest.er1
23410 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023412 (exit $ac_status); } && {
23413 test -z "$ac_c_werror_flag" ||
23414 test ! -s conftest.err
23415 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023416
23417 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023418#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023419_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023420
Martin v. Löwis11437992002-04-12 09:54:03 +000023421
23422cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023423#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023424_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023425
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023426 { echo "$as_me:$LINENO: result: yes" >&5
23427echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023428
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023429else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023430 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023431sed 's/^/| /' conftest.$ac_ext >&5
23432
Martin v. Löwis11437992002-04-12 09:54:03 +000023433
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023434 { echo "$as_me:$LINENO: result: no" >&5
23435echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023436
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023437fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023438
23439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023440
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023441fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023442
23443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023444
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023445fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023446
23447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023448 CFLAGS=$OLD_CFLAGS
23449
23450else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023451
Martin v. Löwis11437992002-04-12 09:54:03 +000023452
23453for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000023454do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023455as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23456{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23457echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023458if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023459 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023460else
Martin v. Löwis11437992002-04-12 09:54:03 +000023461 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023462/* confdefs.h. */
23463_ACEOF
23464cat confdefs.h >>conftest.$ac_ext
23465cat >>conftest.$ac_ext <<_ACEOF
23466/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023467/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23468 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23469#define $ac_func innocuous_$ac_func
23470
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023471/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023472 which can conflict with char $ac_func (); below.
23473 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023474 <limits.h> exists even on freestanding compilers. */
23475
23476#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023477# include <limits.h>
23478#else
23479# include <assert.h>
23480#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023481
23482#undef $ac_func
23483
Martin v. Löwiseba40652007-08-30 20:10:57 +000023484/* Override any GCC internal prototype to avoid an error.
23485 Use char because int might match the return type of a GCC
23486 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023487#ifdef __cplusplus
23488extern "C"
23489#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023490char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023491/* The GNU C library defines this for functions which it implements
23492 to always fail with ENOSYS. Some functions are actually named
23493 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023494#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023495choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023496#endif
23497
Skip Montanaro6dead952003-09-25 14:50:04 +000023498int
23499main ()
23500{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023501return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023502 ;
23503 return 0;
23504}
23505_ACEOF
23506rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023507if { (ac_try="$ac_link"
23508case "(($ac_try" in
23509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23510 *) ac_try_echo=$ac_try;;
23511esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023513 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023514 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023515 grep -v '^ *+' conftest.er1 >conftest.err
23516 rm -f conftest.er1
23517 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023519 (exit $ac_status); } && {
23520 test -z "$ac_c_werror_flag" ||
23521 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023522 } && test -s conftest$ac_exeext &&
23523 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023524 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000023525else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023526 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023527sed 's/^/| /' conftest.$ac_ext >&5
23528
Martin v. Löwiseba40652007-08-30 20:10:57 +000023529 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000023530fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023531
23532rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023533 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000023534fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023535ac_res=`eval echo '${'$as_ac_var'}'`
23536 { echo "$as_me:$LINENO: result: $ac_res" >&5
23537echo "${ECHO_T}$ac_res" >&6; }
23538if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023539 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023540#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023541_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023542
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023543fi
Thomas Wouters3a584202000-08-05 23:28:51 +000023544done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023545
Michael W. Hudson54241132001-12-07 15:38:26 +000023546
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023547fi
23548
Michael W. Hudson54241132001-12-07 15:38:26 +000023549
23550
23551
23552
23553
23554
Guido van Rossum627b2d71993-12-24 10:39:16 +000023555# checks for system services
23556# (none yet)
23557
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023558# Linux requires this for correct f.p. operations
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023559{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
23560echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023561if test "${ac_cv_func___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023562 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023563else
Martin v. Löwis11437992002-04-12 09:54:03 +000023564 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023565/* confdefs.h. */
23566_ACEOF
23567cat confdefs.h >>conftest.$ac_ext
23568cat >>conftest.$ac_ext <<_ACEOF
23569/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023570/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
23571 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23572#define __fpu_control innocuous___fpu_control
23573
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023574/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023575 which can conflict with char __fpu_control (); below.
23576 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023577 <limits.h> exists even on freestanding compilers. */
23578
23579#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023580# include <limits.h>
23581#else
23582# include <assert.h>
23583#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023584
23585#undef __fpu_control
23586
Martin v. Löwiseba40652007-08-30 20:10:57 +000023587/* Override any GCC internal prototype to avoid an error.
23588 Use char because int might match the return type of a GCC
23589 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023590#ifdef __cplusplus
23591extern "C"
23592#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023593char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023594/* The GNU C library defines this for functions which it implements
23595 to always fail with ENOSYS. Some functions are actually named
23596 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023597#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023598choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023599#endif
23600
Skip Montanaro6dead952003-09-25 14:50:04 +000023601int
23602main ()
23603{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023604return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023605 ;
23606 return 0;
23607}
23608_ACEOF
23609rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023610if { (ac_try="$ac_link"
23611case "(($ac_try" in
23612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23613 *) ac_try_echo=$ac_try;;
23614esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023616 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023617 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023618 grep -v '^ *+' conftest.er1 >conftest.err
23619 rm -f conftest.er1
23620 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023622 (exit $ac_status); } && {
23623 test -z "$ac_c_werror_flag" ||
23624 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023625 } && test -s conftest$ac_exeext &&
23626 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023627 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023628else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023629 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023630sed 's/^/| /' conftest.$ac_ext >&5
23631
Martin v. Löwiseba40652007-08-30 20:10:57 +000023632 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023633fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023634
23635rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023636 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023637fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023638{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
23639echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
23640if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023641 :
23642else
Martin v. Löwis11437992002-04-12 09:54:03 +000023643
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023644{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
23645echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023646if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023647 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023648else
Martin v. Löwis11437992002-04-12 09:54:03 +000023649 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023650LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023651cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023652/* confdefs.h. */
23653_ACEOF
23654cat confdefs.h >>conftest.$ac_ext
23655cat >>conftest.$ac_ext <<_ACEOF
23656/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023657
Martin v. Löwiseba40652007-08-30 20:10:57 +000023658/* Override any GCC internal prototype to avoid an error.
23659 Use char because int might match the return type of a GCC
23660 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023661#ifdef __cplusplus
23662extern "C"
23663#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023664char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023665int
23666main ()
23667{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023668return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023669 ;
23670 return 0;
23671}
23672_ACEOF
23673rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023674if { (ac_try="$ac_link"
23675case "(($ac_try" in
23676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23677 *) ac_try_echo=$ac_try;;
23678esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023680 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023681 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023682 grep -v '^ *+' conftest.er1 >conftest.err
23683 rm -f conftest.er1
23684 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023686 (exit $ac_status); } && {
23687 test -z "$ac_c_werror_flag" ||
23688 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023689 } && test -s conftest$ac_exeext &&
23690 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023691 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023692else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023693 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023694sed 's/^/| /' conftest.$ac_ext >&5
23695
Martin v. Löwiseba40652007-08-30 20:10:57 +000023696 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023697fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023698
23699rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023700 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023701LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023702fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023703{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23704echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
23705if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023706 cat >>confdefs.h <<_ACEOF
23707#define HAVE_LIBIEEE 1
23708_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023709
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023710 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023711
Guido van Rossum627b2d71993-12-24 10:39:16 +000023712fi
23713
Michael W. Hudson54241132001-12-07 15:38:26 +000023714
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023715fi
23716
Michael W. Hudson54241132001-12-07 15:38:26 +000023717
Guido van Rossum7f253911997-05-09 02:42:48 +000023718# Check for --with-fpectl
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023719{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23720echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023721
Martin v. Löwiseba40652007-08-30 20:10:57 +000023722# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023723if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023724 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023725if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023726then
23727
23728cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023729#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023730_ACEOF
23731
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023732 { echo "$as_me:$LINENO: result: yes" >&5
23733echo "${ECHO_T}yes" >&6; }
23734else { echo "$as_me:$LINENO: result: no" >&5
23735echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023736fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023737else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023738 { echo "$as_me:$LINENO: result: no" >&5
23739echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023740fi
23741
Guido van Rossum7f253911997-05-09 02:42:48 +000023742
Guido van Rossum7f43da71994-08-01 12:15:30 +000023743# check for --with-libm=...
23744
Guido van Rossum563e7081996-09-10 18:20:48 +000023745case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023746Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000023747BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023748*) LIBM=-lm
23749esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023750{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23751echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023752
Martin v. Löwiseba40652007-08-30 20:10:57 +000023753# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023754if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023755 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023756if test "$withval" = no
23757then LIBM=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023758 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
23759echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023760elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023761then LIBM=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023762 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23763echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
23764else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23765echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023766 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023767fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023768else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023769 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23770echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023771fi
23772
Guido van Rossum7f43da71994-08-01 12:15:30 +000023773
23774# check for --with-libc=...
23775
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023776{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23777echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023778
Martin v. Löwiseba40652007-08-30 20:10:57 +000023779# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023780if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023781 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023782if test "$withval" = no
23783then LIBC=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023784 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
23785echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023786elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023787then LIBC=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023788 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23789echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23790else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23791echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023792 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023793fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023794else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023795 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23796echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023797fi
23798
Guido van Rossum7f43da71994-08-01 12:15:30 +000023799
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023800# **************************************************
23801# * Check for various properties of floating point *
23802# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000023803
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023804{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
23805echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
23806if test "${ac_cv_little_endian_double+set}" = set; then
23807 echo $ECHO_N "(cached) $ECHO_C" >&6
23808else
23809
23810if test "$cross_compiling" = yes; then
23811 ac_cv_little_endian_double=no
23812else
23813 cat >conftest.$ac_ext <<_ACEOF
23814/* confdefs.h. */
23815_ACEOF
23816cat confdefs.h >>conftest.$ac_ext
23817cat >>conftest.$ac_ext <<_ACEOF
23818/* end confdefs.h. */
23819
23820#include <string.h>
23821int main() {
23822 double x = 9006104071832581.0;
23823 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
23824 return 0;
23825 else
23826 return 1;
23827}
23828
23829_ACEOF
23830rm -f conftest$ac_exeext
23831if { (ac_try="$ac_link"
23832case "(($ac_try" in
23833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23834 *) ac_try_echo=$ac_try;;
23835esac
23836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23837 (eval "$ac_link") 2>&5
23838 ac_status=$?
23839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23840 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23841 { (case "(($ac_try" in
23842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23843 *) ac_try_echo=$ac_try;;
23844esac
23845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23846 (eval "$ac_try") 2>&5
23847 ac_status=$?
23848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23849 (exit $ac_status); }; }; then
23850 ac_cv_little_endian_double=yes
23851else
23852 echo "$as_me: program exited with status $ac_status" >&5
23853echo "$as_me: failed program was:" >&5
23854sed 's/^/| /' conftest.$ac_ext >&5
23855
23856( exit $ac_status )
23857ac_cv_little_endian_double=no
23858fi
23859rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23860fi
23861
23862
23863fi
23864
23865{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
23866echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
23867if test "$ac_cv_little_endian_double" = yes
23868then
23869
23870cat >>confdefs.h <<\_ACEOF
23871#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
23872_ACEOF
23873
23874fi
23875
23876{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
23877echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
23878if test "${ac_cv_big_endian_double+set}" = set; then
23879 echo $ECHO_N "(cached) $ECHO_C" >&6
23880else
23881
23882if test "$cross_compiling" = yes; then
23883 ac_cv_big_endian_double=no
23884else
23885 cat >conftest.$ac_ext <<_ACEOF
23886/* confdefs.h. */
23887_ACEOF
23888cat confdefs.h >>conftest.$ac_ext
23889cat >>conftest.$ac_ext <<_ACEOF
23890/* end confdefs.h. */
23891
23892#include <string.h>
23893int main() {
23894 double x = 9006104071832581.0;
23895 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
23896 return 0;
23897 else
23898 return 1;
23899}
23900
23901_ACEOF
23902rm -f conftest$ac_exeext
23903if { (ac_try="$ac_link"
23904case "(($ac_try" in
23905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23906 *) ac_try_echo=$ac_try;;
23907esac
23908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23909 (eval "$ac_link") 2>&5
23910 ac_status=$?
23911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23912 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23913 { (case "(($ac_try" in
23914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23915 *) ac_try_echo=$ac_try;;
23916esac
23917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23918 (eval "$ac_try") 2>&5
23919 ac_status=$?
23920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23921 (exit $ac_status); }; }; then
23922 ac_cv_big_endian_double=yes
23923else
23924 echo "$as_me: program exited with status $ac_status" >&5
23925echo "$as_me: failed program was:" >&5
23926sed 's/^/| /' conftest.$ac_ext >&5
23927
23928( exit $ac_status )
23929ac_cv_big_endian_double=no
23930fi
23931rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23932fi
23933
23934
23935fi
23936
23937{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23938echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
23939if test "$ac_cv_big_endian_double" = yes
23940then
23941
23942cat >>confdefs.h <<\_ACEOF
23943#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23944_ACEOF
23945
23946fi
23947
23948# Some ARM platforms use a mixed-endian representation for doubles.
23949# While Python doesn't currently have full support for these platforms
23950# (see e.g., issue 1762561), we can at least make sure that float <-> string
23951# conversions work.
23952{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23953echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
23954if test "${ac_cv_mixed_endian_double+set}" = set; then
23955 echo $ECHO_N "(cached) $ECHO_C" >&6
23956else
23957
23958if test "$cross_compiling" = yes; then
23959 ac_cv_mixed_endian_double=no
23960else
23961 cat >conftest.$ac_ext <<_ACEOF
23962/* confdefs.h. */
23963_ACEOF
23964cat confdefs.h >>conftest.$ac_ext
23965cat >>conftest.$ac_ext <<_ACEOF
23966/* end confdefs.h. */
23967
23968#include <string.h>
23969int main() {
23970 double x = 9006104071832581.0;
23971 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23972 return 0;
23973 else
23974 return 1;
23975}
23976
23977_ACEOF
23978rm -f conftest$ac_exeext
23979if { (ac_try="$ac_link"
23980case "(($ac_try" in
23981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23982 *) ac_try_echo=$ac_try;;
23983esac
23984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23985 (eval "$ac_link") 2>&5
23986 ac_status=$?
23987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23988 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23989 { (case "(($ac_try" in
23990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23991 *) ac_try_echo=$ac_try;;
23992esac
23993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23994 (eval "$ac_try") 2>&5
23995 ac_status=$?
23996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23997 (exit $ac_status); }; }; then
23998 ac_cv_mixed_endian_double=yes
23999else
24000 echo "$as_me: program exited with status $ac_status" >&5
24001echo "$as_me: failed program was:" >&5
24002sed 's/^/| /' conftest.$ac_ext >&5
24003
24004( exit $ac_status )
24005ac_cv_mixed_endian_double=no
24006fi
24007rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24008fi
24009
24010
24011fi
24012
24013{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
24014echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
24015if test "$ac_cv_mixed_endian_double" = yes
24016then
24017
24018cat >>confdefs.h <<\_ACEOF
24019#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
24020_ACEOF
24021
24022fi
24023
24024# The short float repr introduced in Python 3.1 requires the
24025# correctly-rounded string <-> double conversion functions from
24026# Python/dtoa.c, which in turn require that the FPU uses 53-bit
24027# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000024028# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024029# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000024030
24031# This inline assembler syntax may also work for suncc and icc,
24032# so we try it on all platforms.
24033
24034{ echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024035echo $ECHO_N "checking whether we can use gcc inline assembler to get and set x87 control word... $ECHO_C" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000024036cat >conftest.$ac_ext <<_ACEOF
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024037/* confdefs.h. */
24038_ACEOF
24039cat confdefs.h >>conftest.$ac_ext
24040cat >>conftest.$ac_ext <<_ACEOF
24041/* end confdefs.h. */
24042
24043int
24044main ()
24045{
24046
Mark Dickinsona548dee2009-11-15 13:12:43 +000024047 unsigned short cw;
24048 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
24049 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024050
24051 ;
24052 return 0;
24053}
24054_ACEOF
24055rm -f conftest.$ac_objext
24056if { (ac_try="$ac_compile"
24057case "(($ac_try" in
24058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24059 *) ac_try_echo=$ac_try;;
24060esac
24061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24062 (eval "$ac_compile") 2>conftest.er1
24063 ac_status=$?
24064 grep -v '^ *+' conftest.er1 >conftest.err
24065 rm -f conftest.er1
24066 cat conftest.err >&5
24067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24068 (exit $ac_status); } && {
24069 test -z "$ac_c_werror_flag" ||
24070 test ! -s conftest.err
24071 } && test -s conftest.$ac_objext; then
24072 have_gcc_asm_for_x87=yes
24073else
24074 echo "$as_me: failed program was:" >&5
24075sed 's/^/| /' conftest.$ac_ext >&5
24076
24077 have_gcc_asm_for_x87=no
24078fi
24079
24080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsona548dee2009-11-15 13:12:43 +000024081{ echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024082echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000024083if test "$have_gcc_asm_for_x87" = yes
24084then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024085
24086cat >>confdefs.h <<\_ACEOF
24087#define HAVE_GCC_ASM_FOR_X87 1
24088_ACEOF
24089
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024090fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000024091
Mark Dickinson04b27232009-01-04 12:29:36 +000024092# Detect whether system arithmetic is subject to x87-style double
24093# rounding issues. The result of this test has little meaning on non
24094# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
24095# mode is round-to-nearest and double rounding issues are present, and
24096# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024097{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
24098echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000024099# $BASECFLAGS may affect the result
24100ac_save_cc="$CC"
24101CC="$CC $BASECFLAGS"
Mark Dickinson04b27232009-01-04 12:29:36 +000024102if test "$cross_compiling" = yes; then
24103 ac_cv_x87_double_rounding=no
24104else
24105 cat >conftest.$ac_ext <<_ACEOF
24106/* confdefs.h. */
24107_ACEOF
24108cat confdefs.h >>conftest.$ac_ext
24109cat >>conftest.$ac_ext <<_ACEOF
24110/* end confdefs.h. */
24111
24112#include <stdlib.h>
24113#include <math.h>
24114int main() {
24115 volatile double x, y, z;
24116 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
24117 x = 0.99999999999999989; /* 1-2**-53 */
24118 y = 1./x;
24119 if (y != 1.)
24120 exit(0);
24121 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
24122 x = 1e16;
24123 y = 2.99999;
24124 z = x + y;
24125 if (z != 1e16+4.)
24126 exit(0);
24127 /* both tests show evidence of double rounding */
24128 exit(1);
24129}
24130
24131_ACEOF
24132rm -f conftest$ac_exeext
24133if { (ac_try="$ac_link"
24134case "(($ac_try" in
24135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24136 *) ac_try_echo=$ac_try;;
24137esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024139 (eval "$ac_link") 2>&5
24140 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024142 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24143 { (case "(($ac_try" in
24144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24145 *) ac_try_echo=$ac_try;;
24146esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024148 (eval "$ac_try") 2>&5
24149 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024151 (exit $ac_status); }; }; then
24152 ac_cv_x87_double_rounding=no
24153else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024154 echo "$as_me: program exited with status $ac_status" >&5
24155echo "$as_me: failed program was:" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024156sed 's/^/| /' conftest.$ac_ext >&5
24157
24158( exit $ac_status )
24159ac_cv_x87_double_rounding=yes
24160fi
24161rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24162fi
24163
24164
Mark Dickinson99abd142009-10-24 13:44:16 +000024165CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024166{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
24167echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000024168if test "$ac_cv_x87_double_rounding" = yes
24169then
24170
24171cat >>confdefs.h <<\_ACEOF
24172#define X87_DOUBLE_ROUNDING 1
24173_ACEOF
24174
24175fi
24176
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024177# ************************************
24178# * Check for mathematical functions *
24179# ************************************
24180
24181LIBS_SAVE=$LIBS
24182LIBS="$LIBS $LIBM"
24183
Mark Dickinson265d7382008-04-21 22:32:24 +000024184# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
24185# -0. on some architectures.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024186{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
24187echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000024188if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024189 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000024190else
24191
24192if test "$cross_compiling" = yes; then
24193 ac_cv_tanh_preserves_zero_sign=no
24194else
24195 cat >conftest.$ac_ext <<_ACEOF
24196/* confdefs.h. */
24197_ACEOF
24198cat confdefs.h >>conftest.$ac_ext
24199cat >>conftest.$ac_ext <<_ACEOF
24200/* end confdefs.h. */
24201
24202#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000024203#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000024204int main() {
24205 /* return 0 if either negative zeros don't exist
24206 on this platform or if negative zeros exist
24207 and tanh(-0.) == -0. */
24208 if (atan2(0., -1.) == atan2(-0., -1.) ||
24209 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
24210 else exit(1);
24211}
24212
24213_ACEOF
24214rm -f conftest$ac_exeext
24215if { (ac_try="$ac_link"
24216case "(($ac_try" in
24217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24218 *) ac_try_echo=$ac_try;;
24219esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024221 (eval "$ac_link") 2>&5
24222 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024224 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24225 { (case "(($ac_try" in
24226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24227 *) ac_try_echo=$ac_try;;
24228esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024230 (eval "$ac_try") 2>&5
24231 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024233 (exit $ac_status); }; }; then
24234 ac_cv_tanh_preserves_zero_sign=yes
24235else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024236 echo "$as_me: program exited with status $ac_status" >&5
24237echo "$as_me: failed program was:" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024238sed 's/^/| /' conftest.$ac_ext >&5
24239
24240( exit $ac_status )
24241ac_cv_tanh_preserves_zero_sign=no
24242fi
24243rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24244fi
24245
24246
24247fi
24248
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024249{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
24250echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000024251if test "$ac_cv_tanh_preserves_zero_sign" = yes
24252then
24253
24254cat >>confdefs.h <<\_ACEOF
24255#define TANH_PRESERVES_ZERO_SIGN 1
24256_ACEOF
24257
24258fi
24259
Martin v. Löwis11437992002-04-12 09:54:03 +000024260
Guido van Rossum2b3ac691996-08-30 15:18:41 +000024261
Michael W. Hudson54241132001-12-07 15:38:26 +000024262
Christian Heimes0a8143f2007-12-18 23:22:54 +000024263
24264
24265
24266
24267
Mark Dickinson8e5446f2009-04-18 14:41:37 +000024268
Mark Dickinson65898e02009-09-05 10:27:00 +000024269for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
24270do
24271as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24272{ echo "$as_me:$LINENO: checking for $ac_func" >&5
24273echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
24274if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
24275 echo $ECHO_N "(cached) $ECHO_C" >&6
24276else
24277 cat >conftest.$ac_ext <<_ACEOF
24278/* confdefs.h. */
24279_ACEOF
24280cat confdefs.h >>conftest.$ac_ext
24281cat >>conftest.$ac_ext <<_ACEOF
24282/* end confdefs.h. */
24283/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24284 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24285#define $ac_func innocuous_$ac_func
24286
24287/* System header to define __stub macros and hopefully few prototypes,
24288 which can conflict with char $ac_func (); below.
24289 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24290 <limits.h> exists even on freestanding compilers. */
24291
24292#ifdef __STDC__
24293# include <limits.h>
24294#else
24295# include <assert.h>
24296#endif
24297
24298#undef $ac_func
24299
24300/* Override any GCC internal prototype to avoid an error.
24301 Use char because int might match the return type of a GCC
24302 builtin and then its argument prototype would still apply. */
24303#ifdef __cplusplus
24304extern "C"
24305#endif
24306char $ac_func ();
24307/* The GNU C library defines this for functions which it implements
24308 to always fail with ENOSYS. Some functions are actually named
24309 something starting with __ and the normal name is an alias. */
24310#if defined __stub_$ac_func || defined __stub___$ac_func
24311choke me
24312#endif
24313
24314int
24315main ()
24316{
24317return $ac_func ();
24318 ;
24319 return 0;
24320}
24321_ACEOF
24322rm -f conftest.$ac_objext conftest$ac_exeext
24323if { (ac_try="$ac_link"
24324case "(($ac_try" in
24325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24326 *) ac_try_echo=$ac_try;;
24327esac
24328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24329 (eval "$ac_link") 2>conftest.er1
24330 ac_status=$?
24331 grep -v '^ *+' conftest.er1 >conftest.err
24332 rm -f conftest.er1
24333 cat conftest.err >&5
24334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24335 (exit $ac_status); } && {
24336 test -z "$ac_c_werror_flag" ||
24337 test ! -s conftest.err
24338 } && test -s conftest$ac_exeext &&
24339 $as_test_x conftest$ac_exeext; then
24340 eval "$as_ac_var=yes"
24341else
24342 echo "$as_me: failed program was:" >&5
24343sed 's/^/| /' conftest.$ac_ext >&5
24344
24345 eval "$as_ac_var=no"
24346fi
24347
24348rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24349 conftest$ac_exeext conftest.$ac_ext
24350fi
24351ac_res=`eval echo '${'$as_ac_var'}'`
24352 { echo "$as_me:$LINENO: result: $ac_res" >&5
24353echo "${ECHO_T}$ac_res" >&6; }
24354if test `eval echo '${'$as_ac_var'}'` = yes; then
24355 cat >>confdefs.h <<_ACEOF
24356#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24357_ACEOF
24358
24359fi
24360done
24361
24362
24363
24364
24365
24366
24367for ac_func in hypot lgamma log1p round tgamma
Christian Heimes0a8143f2007-12-18 23:22:54 +000024368do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024369as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24370{ echo "$as_me:$LINENO: checking for $ac_func" >&5
24371echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes0a8143f2007-12-18 23:22:54 +000024372if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024373 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes0a8143f2007-12-18 23:22:54 +000024374else
24375 cat >conftest.$ac_ext <<_ACEOF
24376/* confdefs.h. */
24377_ACEOF
24378cat confdefs.h >>conftest.$ac_ext
24379cat >>conftest.$ac_ext <<_ACEOF
24380/* end confdefs.h. */
24381/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24382 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24383#define $ac_func innocuous_$ac_func
24384
24385/* System header to define __stub macros and hopefully few prototypes,
24386 which can conflict with char $ac_func (); below.
24387 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24388 <limits.h> exists even on freestanding compilers. */
24389
24390#ifdef __STDC__
24391# include <limits.h>
24392#else
24393# include <assert.h>
24394#endif
24395
24396#undef $ac_func
24397
24398/* Override any GCC internal prototype to avoid an error.
24399 Use char because int might match the return type of a GCC
24400 builtin and then its argument prototype would still apply. */
24401#ifdef __cplusplus
24402extern "C"
24403#endif
24404char $ac_func ();
24405/* The GNU C library defines this for functions which it implements
24406 to always fail with ENOSYS. Some functions are actually named
24407 something starting with __ and the normal name is an alias. */
24408#if defined __stub_$ac_func || defined __stub___$ac_func
24409choke me
24410#endif
24411
24412int
24413main ()
24414{
24415return $ac_func ();
24416 ;
24417 return 0;
24418}
24419_ACEOF
24420rm -f conftest.$ac_objext conftest$ac_exeext
24421if { (ac_try="$ac_link"
24422case "(($ac_try" in
24423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24424 *) ac_try_echo=$ac_try;;
24425esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024427 (eval "$ac_link") 2>conftest.er1
24428 ac_status=$?
24429 grep -v '^ *+' conftest.er1 >conftest.err
24430 rm -f conftest.er1
24431 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024433 (exit $ac_status); } && {
24434 test -z "$ac_c_werror_flag" ||
24435 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024436 } && test -s conftest$ac_exeext &&
24437 $as_test_x conftest$ac_exeext; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000024438 eval "$as_ac_var=yes"
24439else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024440 echo "$as_me: failed program was:" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024441sed 's/^/| /' conftest.$ac_ext >&5
24442
24443 eval "$as_ac_var=no"
24444fi
24445
24446rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24447 conftest$ac_exeext conftest.$ac_ext
24448fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024449ac_res=`eval echo '${'$as_ac_var'}'`
24450 { echo "$as_me:$LINENO: result: $ac_res" >&5
24451echo "${ECHO_T}$ac_res" >&6; }
24452if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000024453 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024454#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000024455_ACEOF
24456
24457fi
24458done
24459
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024460{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
24461echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024462if test "${ac_cv_have_decl_isinf+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024463 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024464else
24465 cat >conftest.$ac_ext <<_ACEOF
24466/* confdefs.h. */
24467_ACEOF
24468cat confdefs.h >>conftest.$ac_ext
24469cat >>conftest.$ac_ext <<_ACEOF
24470/* end confdefs.h. */
24471#include <math.h>
24472
24473int
24474main ()
24475{
24476#ifndef isinf
24477 (void) isinf;
24478#endif
24479
24480 ;
24481 return 0;
24482}
24483_ACEOF
24484rm -f conftest.$ac_objext
24485if { (ac_try="$ac_compile"
24486case "(($ac_try" in
24487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24488 *) ac_try_echo=$ac_try;;
24489esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024491 (eval "$ac_compile") 2>conftest.er1
24492 ac_status=$?
24493 grep -v '^ *+' conftest.er1 >conftest.err
24494 rm -f conftest.er1
24495 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024497 (exit $ac_status); } && {
24498 test -z "$ac_c_werror_flag" ||
24499 test ! -s conftest.err
24500 } && test -s conftest.$ac_objext; then
24501 ac_cv_have_decl_isinf=yes
24502else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024503 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024504sed 's/^/| /' conftest.$ac_ext >&5
24505
24506 ac_cv_have_decl_isinf=no
24507fi
24508
24509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24510fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024511{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
24512echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
24513if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024514
24515cat >>confdefs.h <<_ACEOF
24516#define HAVE_DECL_ISINF 1
24517_ACEOF
24518
24519
24520else
24521 cat >>confdefs.h <<_ACEOF
24522#define HAVE_DECL_ISINF 0
24523_ACEOF
24524
24525
24526fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024527{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
24528echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024529if test "${ac_cv_have_decl_isnan+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024530 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024531else
24532 cat >conftest.$ac_ext <<_ACEOF
24533/* confdefs.h. */
24534_ACEOF
24535cat confdefs.h >>conftest.$ac_ext
24536cat >>conftest.$ac_ext <<_ACEOF
24537/* end confdefs.h. */
24538#include <math.h>
24539
24540int
24541main ()
24542{
24543#ifndef isnan
24544 (void) isnan;
24545#endif
24546
24547 ;
24548 return 0;
24549}
24550_ACEOF
24551rm -f conftest.$ac_objext
24552if { (ac_try="$ac_compile"
24553case "(($ac_try" in
24554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24555 *) ac_try_echo=$ac_try;;
24556esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024558 (eval "$ac_compile") 2>conftest.er1
24559 ac_status=$?
24560 grep -v '^ *+' conftest.er1 >conftest.err
24561 rm -f conftest.er1
24562 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024564 (exit $ac_status); } && {
24565 test -z "$ac_c_werror_flag" ||
24566 test ! -s conftest.err
24567 } && test -s conftest.$ac_objext; then
24568 ac_cv_have_decl_isnan=yes
24569else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024570 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024571sed 's/^/| /' conftest.$ac_ext >&5
24572
24573 ac_cv_have_decl_isnan=no
24574fi
24575
24576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24577fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024578{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
24579echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
24580if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024581
24582cat >>confdefs.h <<_ACEOF
24583#define HAVE_DECL_ISNAN 1
24584_ACEOF
24585
24586
24587else
24588 cat >>confdefs.h <<_ACEOF
24589#define HAVE_DECL_ISNAN 0
24590_ACEOF
24591
24592
24593fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024594{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
24595echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024596if test "${ac_cv_have_decl_isfinite+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024597 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024598else
24599 cat >conftest.$ac_ext <<_ACEOF
24600/* confdefs.h. */
24601_ACEOF
24602cat confdefs.h >>conftest.$ac_ext
24603cat >>conftest.$ac_ext <<_ACEOF
24604/* end confdefs.h. */
24605#include <math.h>
24606
24607int
24608main ()
24609{
24610#ifndef isfinite
24611 (void) isfinite;
24612#endif
24613
24614 ;
24615 return 0;
24616}
24617_ACEOF
24618rm -f conftest.$ac_objext
24619if { (ac_try="$ac_compile"
24620case "(($ac_try" in
24621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24622 *) ac_try_echo=$ac_try;;
24623esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024625 (eval "$ac_compile") 2>conftest.er1
24626 ac_status=$?
24627 grep -v '^ *+' conftest.er1 >conftest.err
24628 rm -f conftest.er1
24629 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024631 (exit $ac_status); } && {
24632 test -z "$ac_c_werror_flag" ||
24633 test ! -s conftest.err
24634 } && test -s conftest.$ac_objext; then
24635 ac_cv_have_decl_isfinite=yes
24636else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024637 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024638sed 's/^/| /' conftest.$ac_ext >&5
24639
24640 ac_cv_have_decl_isfinite=no
24641fi
24642
24643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24644fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024645{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
24646echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
24647if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024648
24649cat >>confdefs.h <<_ACEOF
24650#define HAVE_DECL_ISFINITE 1
24651_ACEOF
24652
24653
24654else
24655 cat >>confdefs.h <<_ACEOF
24656#define HAVE_DECL_ISFINITE 0
24657_ACEOF
24658
24659
24660fi
24661
24662
Christian Heimes0a8143f2007-12-18 23:22:54 +000024663
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000024664LIBS=$LIBS_SAVE
24665
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024666# For multiprocessing module, check that sem_open
24667# actually works. For FreeBSD versions <= 7.2,
24668# the kernel module that provides POSIX semaphores
24669# isn't loaded by default, so an attempt to call
24670# sem_open results in a 'Signal 12' error.
24671{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
24672echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
24673if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
24674 echo $ECHO_N "(cached) $ECHO_C" >&6
24675else
24676 if test "$cross_compiling" = yes; then
24677 ac_cv_posix_semaphores_enabled=yes
24678else
24679 cat >conftest.$ac_ext <<_ACEOF
24680/* confdefs.h. */
24681_ACEOF
24682cat confdefs.h >>conftest.$ac_ext
24683cat >>conftest.$ac_ext <<_ACEOF
24684/* end confdefs.h. */
24685
24686#include <unistd.h>
24687#include <fcntl.h>
24688#include <stdio.h>
24689#include <semaphore.h>
24690#include <sys/stat.h>
24691
24692int main(void) {
24693 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
24694 if (a == SEM_FAILED) {
24695 perror("sem_open");
24696 return 1;
24697 }
24698 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024699 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024700 return 0;
24701}
24702
24703_ACEOF
24704rm -f conftest$ac_exeext
24705if { (ac_try="$ac_link"
24706case "(($ac_try" in
24707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24708 *) ac_try_echo=$ac_try;;
24709esac
24710eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24711 (eval "$ac_link") 2>&5
24712 ac_status=$?
24713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24714 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24715 { (case "(($ac_try" in
24716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24717 *) ac_try_echo=$ac_try;;
24718esac
24719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24720 (eval "$ac_try") 2>&5
24721 ac_status=$?
24722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24723 (exit $ac_status); }; }; then
24724 ac_cv_posix_semaphores_enabled=yes
24725else
24726 echo "$as_me: program exited with status $ac_status" >&5
24727echo "$as_me: failed program was:" >&5
24728sed 's/^/| /' conftest.$ac_ext >&5
24729
24730( exit $ac_status )
24731ac_cv_posix_semaphores_enabled=no
24732fi
24733rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24734fi
24735
24736
24737
24738fi
24739
24740{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
24741echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
24742if test $ac_cv_posix_semaphores_enabled = no
24743then
24744
24745cat >>confdefs.h <<\_ACEOF
24746#define POSIX_SEMAPHORES_NOT_ENABLED 1
24747_ACEOF
24748
24749fi
24750
24751# Multiprocessing check for broken sem_getvalue
24752{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
24753echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
24754if test "${ac_cv_broken_sem_getvalue+set}" = set; then
24755 echo $ECHO_N "(cached) $ECHO_C" >&6
24756else
24757 if test "$cross_compiling" = yes; then
24758 ac_cv_broken_sem_getvalue=yes
24759else
24760 cat >conftest.$ac_ext <<_ACEOF
24761/* confdefs.h. */
24762_ACEOF
24763cat confdefs.h >>conftest.$ac_ext
24764cat >>conftest.$ac_ext <<_ACEOF
24765/* end confdefs.h. */
24766
24767#include <unistd.h>
24768#include <fcntl.h>
24769#include <stdio.h>
24770#include <semaphore.h>
24771#include <sys/stat.h>
24772
24773int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024774 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024775 int count;
24776 int res;
24777 if(a==SEM_FAILED){
24778 perror("sem_open");
24779 return 1;
24780
24781 }
24782 res = sem_getvalue(a, &count);
24783 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024784 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024785 return res==-1 ? 1 : 0;
24786}
24787
24788_ACEOF
24789rm -f conftest$ac_exeext
24790if { (ac_try="$ac_link"
24791case "(($ac_try" in
24792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24793 *) ac_try_echo=$ac_try;;
24794esac
24795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24796 (eval "$ac_link") 2>&5
24797 ac_status=$?
24798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24799 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24800 { (case "(($ac_try" in
24801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24802 *) ac_try_echo=$ac_try;;
24803esac
24804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24805 (eval "$ac_try") 2>&5
24806 ac_status=$?
24807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24808 (exit $ac_status); }; }; then
24809 ac_cv_broken_sem_getvalue=no
24810else
24811 echo "$as_me: program exited with status $ac_status" >&5
24812echo "$as_me: failed program was:" >&5
24813sed 's/^/| /' conftest.$ac_ext >&5
24814
24815( exit $ac_status )
24816ac_cv_broken_sem_getvalue=yes
24817fi
24818rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24819fi
24820
24821
24822
24823fi
24824
24825{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
24826echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
24827if test $ac_cv_broken_sem_getvalue = yes
24828then
24829
24830cat >>confdefs.h <<\_ACEOF
24831#define HAVE_BROKEN_SEM_GETVALUE 1
24832_ACEOF
24833
24834fi
24835
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024836# determine what size digit to use for Python's longs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024837{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
24838echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024839# Check whether --enable-big-digits was given.
24840if test "${enable_big_digits+set}" = set; then
24841 enableval=$enable_big_digits; case $enable_big_digits in
24842yes)
24843 enable_big_digits=30 ;;
24844no)
24845 enable_big_digits=15 ;;
2484615|30)
24847 ;;
24848*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024849 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
24850echo "$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 +000024851 { (exit 1); exit 1; }; } ;;
24852esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024853{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
24854echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024855
24856cat >>confdefs.h <<_ACEOF
24857#define PYLONG_BITS_IN_DIGIT $enable_big_digits
24858_ACEOF
24859
24860
24861else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024862 { echo "$as_me:$LINENO: result: no value specified" >&5
24863echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024864fi
24865
24866
Guido van Rossumef2255b2000-03-10 22:30:29 +000024867# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000024868if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024869 { echo "$as_me:$LINENO: checking for wchar.h" >&5
24870echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024871if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024872 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024873fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024874{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24875echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024876else
Martin v. Löwis11437992002-04-12 09:54:03 +000024877 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024878{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
24879echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024880cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024881/* confdefs.h. */
24882_ACEOF
24883cat confdefs.h >>conftest.$ac_ext
24884cat >>conftest.$ac_ext <<_ACEOF
24885/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024886$ac_includes_default
24887#include <wchar.h>
24888_ACEOF
24889rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024890if { (ac_try="$ac_compile"
24891case "(($ac_try" in
24892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24893 *) ac_try_echo=$ac_try;;
24894esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024896 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024897 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024898 grep -v '^ *+' conftest.er1 >conftest.err
24899 rm -f conftest.er1
24900 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024902 (exit $ac_status); } && {
24903 test -z "$ac_c_werror_flag" ||
24904 test ! -s conftest.err
24905 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024906 ac_header_compiler=yes
24907else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024908 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024909sed 's/^/| /' conftest.$ac_ext >&5
24910
Martin v. Löwiseba40652007-08-30 20:10:57 +000024911 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000024912fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024913
24914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024915{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24916echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024917
24918# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024919{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
24920echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024921cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024922/* confdefs.h. */
24923_ACEOF
24924cat confdefs.h >>conftest.$ac_ext
24925cat >>conftest.$ac_ext <<_ACEOF
24926/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024927#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024928_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024929if { (ac_try="$ac_cpp conftest.$ac_ext"
24930case "(($ac_try" in
24931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24932 *) ac_try_echo=$ac_try;;
24933esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024935 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024936 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024937 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024938 rm -f conftest.er1
24939 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024941 (exit $ac_status); } >/dev/null && {
24942 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24943 test ! -s conftest.err
24944 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024945 ac_header_preproc=yes
24946else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024947 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024948sed 's/^/| /' conftest.$ac_ext >&5
24949
Martin v. Löwis11437992002-04-12 09:54:03 +000024950 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024951fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024952
Martin v. Löwis11437992002-04-12 09:54:03 +000024953rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024954{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24955echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024956
24957# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024958case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24959 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024960 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24961echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24962 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24963echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024964 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024965 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024966 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024967 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24968echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24969 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24970echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24971 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24972echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24973 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24974echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24975 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24976echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24977 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24978echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000024979 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000024980## -------------------------------------- ##
24981## Report this to http://bugs.python.org/ ##
24982## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024983_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000024984 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024985 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024986esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024987{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24988echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024989if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024990 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024991else
24992 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024993fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024994{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24995echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024996
24997fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024998if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024999
25000
25001cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000025002#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025003_ACEOF
25004
Martin v. Löwisc45929e2002-04-06 10:10:49 +000025005 wchar_h="yes"
25006
Guido van Rossumef2255b2000-03-10 22:30:29 +000025007else
Martin v. Löwis11437992002-04-12 09:54:03 +000025008 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000025009
25010fi
25011
Michael W. Hudson54241132001-12-07 15:38:26 +000025012
Martin v. Löwis11437992002-04-12 09:54:03 +000025013
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025014# determine wchar_t size
25015if test "$wchar_h" = yes
25016then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025017 { echo "$as_me:$LINENO: checking for wchar_t" >&5
25018echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
25019if test "${ac_cv_type_wchar_t+set}" = set; then
25020 echo $ECHO_N "(cached) $ECHO_C" >&6
25021else
25022 cat >conftest.$ac_ext <<_ACEOF
25023/* confdefs.h. */
25024_ACEOF
25025cat confdefs.h >>conftest.$ac_ext
25026cat >>conftest.$ac_ext <<_ACEOF
25027/* end confdefs.h. */
25028#include <wchar.h>
25029
25030typedef wchar_t ac__type_new_;
25031int
25032main ()
25033{
25034if ((ac__type_new_ *) 0)
25035 return 0;
25036if (sizeof (ac__type_new_))
25037 return 0;
25038 ;
25039 return 0;
25040}
25041_ACEOF
25042rm -f conftest.$ac_objext
25043if { (ac_try="$ac_compile"
25044case "(($ac_try" in
25045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25046 *) ac_try_echo=$ac_try;;
25047esac
25048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25049 (eval "$ac_compile") 2>conftest.er1
25050 ac_status=$?
25051 grep -v '^ *+' conftest.er1 >conftest.err
25052 rm -f conftest.er1
25053 cat conftest.err >&5
25054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25055 (exit $ac_status); } && {
25056 test -z "$ac_c_werror_flag" ||
25057 test ! -s conftest.err
25058 } && test -s conftest.$ac_objext; then
25059 ac_cv_type_wchar_t=yes
25060else
25061 echo "$as_me: failed program was:" >&5
25062sed 's/^/| /' conftest.$ac_ext >&5
25063
25064 ac_cv_type_wchar_t=no
25065fi
25066
25067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25068fi
25069{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
25070echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
25071
25072# The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000025073# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
25074# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
25075# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025076{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
25077echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025078if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025079 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000025080else
Martin v. Löwis11437992002-04-12 09:54:03 +000025081 if test "$cross_compiling" = yes; then
25082 # Depending upon the size, compute the lo and hi bounds.
25083cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025084/* confdefs.h. */
25085_ACEOF
25086cat confdefs.h >>conftest.$ac_ext
25087cat >>conftest.$ac_ext <<_ACEOF
25088/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025089#include <wchar.h>
25090
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025091 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025092int
25093main ()
25094{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025095static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025096test_array [0] = 0
25097
25098 ;
25099 return 0;
25100}
25101_ACEOF
25102rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025103if { (ac_try="$ac_compile"
25104case "(($ac_try" in
25105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25106 *) ac_try_echo=$ac_try;;
25107esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025109 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025110 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025111 grep -v '^ *+' conftest.er1 >conftest.err
25112 rm -f conftest.er1
25113 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025115 (exit $ac_status); } && {
25116 test -z "$ac_c_werror_flag" ||
25117 test ! -s conftest.err
25118 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025119 ac_lo=0 ac_mid=0
25120 while :; do
25121 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025122/* confdefs.h. */
25123_ACEOF
25124cat confdefs.h >>conftest.$ac_ext
25125cat >>conftest.$ac_ext <<_ACEOF
25126/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025127#include <wchar.h>
25128
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025129 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025130int
25131main ()
25132{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025133static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025134test_array [0] = 0
25135
25136 ;
25137 return 0;
25138}
25139_ACEOF
25140rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025141if { (ac_try="$ac_compile"
25142case "(($ac_try" in
25143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25144 *) ac_try_echo=$ac_try;;
25145esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025147 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025148 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025149 grep -v '^ *+' conftest.er1 >conftest.err
25150 rm -f conftest.er1
25151 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025153 (exit $ac_status); } && {
25154 test -z "$ac_c_werror_flag" ||
25155 test ! -s conftest.err
25156 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025157 ac_hi=$ac_mid; break
25158else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025159 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025160sed 's/^/| /' conftest.$ac_ext >&5
25161
Martin v. Löwiseba40652007-08-30 20:10:57 +000025162 ac_lo=`expr $ac_mid + 1`
25163 if test $ac_lo -le $ac_mid; then
25164 ac_lo= ac_hi=
25165 break
25166 fi
25167 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000025168fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025169
25170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025171 done
25172else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025173 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025174sed 's/^/| /' conftest.$ac_ext >&5
25175
Martin v. Löwiseba40652007-08-30 20:10:57 +000025176 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025177/* confdefs.h. */
25178_ACEOF
25179cat confdefs.h >>conftest.$ac_ext
25180cat >>conftest.$ac_ext <<_ACEOF
25181/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025182#include <wchar.h>
25183
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025184 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025185int
25186main ()
25187{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025188static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025189test_array [0] = 0
25190
25191 ;
25192 return 0;
25193}
25194_ACEOF
25195rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025196if { (ac_try="$ac_compile"
25197case "(($ac_try" in
25198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25199 *) ac_try_echo=$ac_try;;
25200esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025202 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025203 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025204 grep -v '^ *+' conftest.er1 >conftest.err
25205 rm -f conftest.er1
25206 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025208 (exit $ac_status); } && {
25209 test -z "$ac_c_werror_flag" ||
25210 test ! -s conftest.err
25211 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025212 ac_hi=-1 ac_mid=-1
25213 while :; do
25214 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025215/* confdefs.h. */
25216_ACEOF
25217cat confdefs.h >>conftest.$ac_ext
25218cat >>conftest.$ac_ext <<_ACEOF
25219/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025220#include <wchar.h>
25221
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025222 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025223int
25224main ()
25225{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025226static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025227test_array [0] = 0
25228
25229 ;
25230 return 0;
25231}
25232_ACEOF
25233rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025234if { (ac_try="$ac_compile"
25235case "(($ac_try" in
25236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25237 *) ac_try_echo=$ac_try;;
25238esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025240 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025241 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025242 grep -v '^ *+' conftest.er1 >conftest.err
25243 rm -f conftest.er1
25244 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025246 (exit $ac_status); } && {
25247 test -z "$ac_c_werror_flag" ||
25248 test ! -s conftest.err
25249 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025250 ac_lo=$ac_mid; break
25251else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025252 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025253sed 's/^/| /' conftest.$ac_ext >&5
25254
Martin v. Löwiseba40652007-08-30 20:10:57 +000025255 ac_hi=`expr '(' $ac_mid ')' - 1`
25256 if test $ac_mid -le $ac_hi; then
25257 ac_lo= ac_hi=
25258 break
25259 fi
25260 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000025261fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025262
25263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025264 done
25265else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025266 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025267sed 's/^/| /' conftest.$ac_ext >&5
25268
Martin v. Löwiseba40652007-08-30 20:10:57 +000025269 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000025270fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025271
25272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025273fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025274
25275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025276# Binary search between lo and hi bounds.
25277while test "x$ac_lo" != "x$ac_hi"; do
25278 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25279 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025280/* confdefs.h. */
25281_ACEOF
25282cat confdefs.h >>conftest.$ac_ext
25283cat >>conftest.$ac_ext <<_ACEOF
25284/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025285#include <wchar.h>
25286
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025287 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025288int
25289main ()
25290{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025291static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025292test_array [0] = 0
25293
25294 ;
25295 return 0;
25296}
25297_ACEOF
25298rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025299if { (ac_try="$ac_compile"
25300case "(($ac_try" in
25301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25302 *) ac_try_echo=$ac_try;;
25303esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025305 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025306 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025307 grep -v '^ *+' conftest.er1 >conftest.err
25308 rm -f conftest.er1
25309 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025311 (exit $ac_status); } && {
25312 test -z "$ac_c_werror_flag" ||
25313 test ! -s conftest.err
25314 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025315 ac_hi=$ac_mid
25316else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025317 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025318sed 's/^/| /' conftest.$ac_ext >&5
25319
Martin v. Löwiseba40652007-08-30 20:10:57 +000025320 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000025321fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025322
25323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025324done
25325case $ac_lo in
25326?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025327'') if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025328 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025329See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025330echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025331See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025332 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025333 else
25334 ac_cv_sizeof_wchar_t=0
25335 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025336esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025337else
Martin v. Löwis11437992002-04-12 09:54:03 +000025338 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025339/* confdefs.h. */
25340_ACEOF
25341cat confdefs.h >>conftest.$ac_ext
25342cat >>conftest.$ac_ext <<_ACEOF
25343/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025344#include <wchar.h>
25345
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025346 typedef wchar_t ac__type_sizeof_;
25347static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
25348static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000025349#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025350#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025351int
25352main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025353{
Martin v. Löwis11437992002-04-12 09:54:03 +000025354
25355 FILE *f = fopen ("conftest.val", "w");
25356 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000025357 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025358 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000025359 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000025360 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025361 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000025362 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025363 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000025364 }
25365 else
25366 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000025367 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025368 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000025369 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025370 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000025371 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025372 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000025373
25374 ;
25375 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025376}
Martin v. Löwis11437992002-04-12 09:54:03 +000025377_ACEOF
25378rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025379if { (ac_try="$ac_link"
25380case "(($ac_try" in
25381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25382 *) ac_try_echo=$ac_try;;
25383esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025384eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025385 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025386 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025388 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025389 { (case "(($ac_try" in
25390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25391 *) ac_try_echo=$ac_try;;
25392esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025394 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025395 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025397 (exit $ac_status); }; }; then
25398 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000025399else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025400 echo "$as_me: program exited with status $ac_status" >&5
25401echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025402sed 's/^/| /' conftest.$ac_ext >&5
25403
Martin v. Löwis11437992002-04-12 09:54:03 +000025404( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000025405if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025406 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025407See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025408echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025409See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025410 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025411 else
25412 ac_cv_sizeof_wchar_t=0
25413 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025414fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025415rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025416fi
25417rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000025418fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025419{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
25420echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025421
25422
25423
Martin v. Löwis11437992002-04-12 09:54:03 +000025424cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025425#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025426_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025427
Michael W. Hudson54241132001-12-07 15:38:26 +000025428
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025429fi
25430
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025431{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
25432echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025433have_ucs4_tcl=no
25434cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025435/* confdefs.h. */
25436_ACEOF
25437cat confdefs.h >>conftest.$ac_ext
25438cat >>conftest.$ac_ext <<_ACEOF
25439/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025440
25441#include <tcl.h>
25442#if TCL_UTF_MAX != 6
25443# error "NOT UCS4_TCL"
25444#endif
25445int
25446main ()
25447{
25448
25449 ;
25450 return 0;
25451}
25452_ACEOF
25453rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025454if { (ac_try="$ac_compile"
25455case "(($ac_try" in
25456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25457 *) ac_try_echo=$ac_try;;
25458esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025460 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025461 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025462 grep -v '^ *+' conftest.er1 >conftest.err
25463 rm -f conftest.er1
25464 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025466 (exit $ac_status); } && {
25467 test -z "$ac_c_werror_flag" ||
25468 test ! -s conftest.err
25469 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025470
25471
25472cat >>confdefs.h <<\_ACEOF
25473#define HAVE_UCS4_TCL 1
25474_ACEOF
25475
25476 have_ucs4_tcl=yes
25477
25478else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025479 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025480sed 's/^/| /' conftest.$ac_ext >&5
25481
Martin v. Löwiseba40652007-08-30 20:10:57 +000025482
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025483fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025484
25485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025486{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
25487echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025488
Skip Montanaro6dead952003-09-25 14:50:04 +000025489# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025490if test "$wchar_h" = yes
25491then
25492 # check whether wchar_t is signed or not
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025493 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
25494echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025495 if test "${ac_cv_wchar_t_signed+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025496 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025497else
25498
25499 if test "$cross_compiling" = yes; then
25500 ac_cv_wchar_t_signed=yes
25501else
25502 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025503/* confdefs.h. */
25504_ACEOF
25505cat confdefs.h >>conftest.$ac_ext
25506cat >>conftest.$ac_ext <<_ACEOF
25507/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025508
25509 #include <wchar.h>
25510 int main()
25511 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000025512 /* Success: exit code 0 */
25513 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025514 }
25515
25516_ACEOF
25517rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025518if { (ac_try="$ac_link"
25519case "(($ac_try" in
25520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25521 *) ac_try_echo=$ac_try;;
25522esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025524 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025525 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025527 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025528 { (case "(($ac_try" in
25529 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25530 *) ac_try_echo=$ac_try;;
25531esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025532eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025533 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025534 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025536 (exit $ac_status); }; }; then
25537 ac_cv_wchar_t_signed=yes
25538else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025539 echo "$as_me: program exited with status $ac_status" >&5
25540echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025541sed 's/^/| /' conftest.$ac_ext >&5
25542
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025543( exit $ac_status )
25544ac_cv_wchar_t_signed=no
25545fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025546rm -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 +000025547fi
25548
Martin v. Löwiseba40652007-08-30 20:10:57 +000025549
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025550fi
25551
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025552 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
25553echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025554fi
25555
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025556{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
25557echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025558# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025559if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025560 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025561else
25562 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000025563fi
25564
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025565
25566if test $enable_unicode = yes
25567then
Martin v. Löwisfd917792001-06-27 20:22:04 +000025568 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025569 case "$have_ucs4_tcl" in
25570 yes) enable_unicode="ucs4"
25571 ;;
25572 *) enable_unicode="ucs2"
25573 ;;
25574 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025575fi
25576
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025577
25578
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025579case "$enable_unicode" in
25580ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000025581 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025582#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000025583_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025584
25585 ;;
25586ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000025587 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025588#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000025589_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025590
25591 ;;
Benjamin Peterson8b650542010-02-27 00:11:42 +000025592*) { { echo "$as_me:$LINENO: error: invalid value for --enable-unicode. Use either ucs2 or ucs4 (lowercase)." >&5
25593echo "$as_me: error: invalid value for --enable-unicode. Use either ucs2 or ucs4 (lowercase)." >&2;}
25594 { (exit 1); exit 1; }; } ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025595esac
25596
Michael W. Hudson54241132001-12-07 15:38:26 +000025597
Martin v. Löwis11437992002-04-12 09:54:03 +000025598
25599
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025600
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025601if test "$enable_unicode" = "no"
25602then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000025603 UNICODE_OBJS=""
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025604 { echo "$as_me:$LINENO: result: not used" >&5
25605echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025606else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000025607 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000025608
25609cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025610#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025611_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025612
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025613
25614 # wchar_t is only usable if it maps to an unsigned type
25615 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000025616 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025617 then
25618 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025619
Martin v. Löwis11437992002-04-12 09:54:03 +000025620cat >>confdefs.h <<\_ACEOF
25621#define HAVE_USABLE_WCHAR_T 1
25622_ACEOF
25623
25624 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025625#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025626_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025627
25628 elif test "$ac_cv_sizeof_short" = "$unicode_size"
25629 then
25630 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000025631 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025632#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000025633_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025634
25635 elif test "$ac_cv_sizeof_long" = "$unicode_size"
25636 then
25637 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000025638 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025639#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000025640_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025641
25642 else
25643 PY_UNICODE_TYPE="no type found"
25644 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025645 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
25646echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025647fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000025648
25649# check for endianness
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025650{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
25651echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025652if test "${ac_cv_c_bigendian+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025653 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000025654else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025655 # See if sys/param.h defines the BYTE_ORDER macro.
25656cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025657/* confdefs.h. */
25658_ACEOF
25659cat confdefs.h >>conftest.$ac_ext
25660cat >>conftest.$ac_ext <<_ACEOF
25661/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025662#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025663#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025664
Martin v. Löwis11437992002-04-12 09:54:03 +000025665int
25666main ()
25667{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025668#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
25669 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
25670 bogus endian macros
25671#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025672
25673 ;
25674 return 0;
25675}
25676_ACEOF
25677rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025678if { (ac_try="$ac_compile"
25679case "(($ac_try" in
25680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25681 *) ac_try_echo=$ac_try;;
25682esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025683eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025684 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025685 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025686 grep -v '^ *+' conftest.er1 >conftest.err
25687 rm -f conftest.er1
25688 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025690 (exit $ac_status); } && {
25691 test -z "$ac_c_werror_flag" ||
25692 test ! -s conftest.err
25693 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025694 # It does; now see whether it defined to BIG_ENDIAN or not.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025695cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025696/* confdefs.h. */
25697_ACEOF
25698cat confdefs.h >>conftest.$ac_ext
25699cat >>conftest.$ac_ext <<_ACEOF
25700/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025701#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025702#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025703
Martin v. Löwis11437992002-04-12 09:54:03 +000025704int
25705main ()
25706{
Guido van Rossumef2255b2000-03-10 22:30:29 +000025707#if BYTE_ORDER != BIG_ENDIAN
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025708 not big endian
25709#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025710
25711 ;
25712 return 0;
25713}
25714_ACEOF
25715rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025716if { (ac_try="$ac_compile"
25717case "(($ac_try" in
25718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25719 *) ac_try_echo=$ac_try;;
25720esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025722 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025723 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025724 grep -v '^ *+' conftest.er1 >conftest.err
25725 rm -f conftest.er1
25726 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025728 (exit $ac_status); } && {
25729 test -z "$ac_c_werror_flag" ||
25730 test ! -s conftest.err
25731 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025732 ac_cv_c_bigendian=yes
25733else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025734 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025735sed 's/^/| /' conftest.$ac_ext >&5
25736
Martin v. Löwiseba40652007-08-30 20:10:57 +000025737 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000025738fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025739
25740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000025741else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025743sed 's/^/| /' conftest.$ac_ext >&5
25744
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025745 # It does not; compile a test program.
25746if test "$cross_compiling" = yes; then
25747 # try to guess the endianness by grepping values into an object file
25748 ac_cv_c_bigendian=unknown
25749 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025750/* confdefs.h. */
25751_ACEOF
25752cat confdefs.h >>conftest.$ac_ext
25753cat >>conftest.$ac_ext <<_ACEOF
25754/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025755short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
25756short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
25757void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
25758short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
25759short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
25760void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025761int
25762main ()
25763{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025764 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025765 ;
25766 return 0;
25767}
25768_ACEOF
25769rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025770if { (ac_try="$ac_compile"
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_compile") 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
25785 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025786 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025787 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025788fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025789if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
25790 if test "$ac_cv_c_bigendian" = unknown; then
25791 ac_cv_c_bigendian=no
25792 else
25793 # finding both strings is unlikely to happen, but who knows?
25794 ac_cv_c_bigendian=unknown
25795 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025796fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025797else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025798 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025799sed 's/^/| /' conftest.$ac_ext >&5
25800
Martin v. Löwiseba40652007-08-30 20:10:57 +000025801
Martin v. Löwis11437992002-04-12 09:54:03 +000025802fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025803
25804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025805else
25806 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025807/* confdefs.h. */
25808_ACEOF
25809cat confdefs.h >>conftest.$ac_ext
25810cat >>conftest.$ac_ext <<_ACEOF
25811/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000025812$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000025813int
25814main ()
25815{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025816
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025817 /* Are we little or big endian? From Harbison&Steele. */
25818 union
25819 {
25820 long int l;
25821 char c[sizeof (long int)];
25822 } u;
25823 u.l = 1;
25824 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025825
25826 ;
25827 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025828}
Martin v. Löwis11437992002-04-12 09:54:03 +000025829_ACEOF
25830rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025831if { (ac_try="$ac_link"
25832case "(($ac_try" in
25833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25834 *) ac_try_echo=$ac_try;;
25835esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025837 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025838 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025840 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025841 { (case "(($ac_try" in
25842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25843 *) ac_try_echo=$ac_try;;
25844esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025846 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025847 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025849 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025850 ac_cv_c_bigendian=no
25851else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025852 echo "$as_me: program exited with status $ac_status" >&5
25853echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025854sed 's/^/| /' conftest.$ac_ext >&5
25855
Martin v. Löwis11437992002-04-12 09:54:03 +000025856( exit $ac_status )
25857ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000025858fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025859rm -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 +000025860fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025861
25862
Martin v. Löwis11437992002-04-12 09:54:03 +000025863fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025864
25865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25866fi
25867{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
25868echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
25869case $ac_cv_c_bigendian in
25870 yes)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025871
25872cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025873#define WORDS_BIGENDIAN 1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025874_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025875 ;;
25876 no)
25877 ;;
25878 *)
25879 { { echo "$as_me:$LINENO: error: unknown endianness
25880presetting ac_cv_c_bigendian=no (or yes) will help" >&5
25881echo "$as_me: error: unknown endianness
25882presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025883 { (exit 1); exit 1; }; } ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025884esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000025885
Michael W. Hudson54241132001-12-07 15:38:26 +000025886
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025887# Check whether right shifting a negative integer extends the sign bit
25888# or fills with zeros (like the Cray J90, according to Tim Peters).
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025889{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
25890echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025891if test "${ac_cv_rshift_extends_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025892 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000025893else
Martin v. Löwis11437992002-04-12 09:54:03 +000025894
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025895if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025896 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025897else
Martin v. Löwis11437992002-04-12 09:54:03 +000025898 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025899/* confdefs.h. */
25900_ACEOF
25901cat confdefs.h >>conftest.$ac_ext
25902cat >>conftest.$ac_ext <<_ACEOF
25903/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025904
25905int main()
25906{
Vladimir Marangozova6180282000-07-12 05:05:06 +000025907 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025908}
25909
Martin v. Löwis11437992002-04-12 09:54:03 +000025910_ACEOF
25911rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025912if { (ac_try="$ac_link"
25913case "(($ac_try" in
25914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25915 *) ac_try_echo=$ac_try;;
25916esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025918 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025919 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025921 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025922 { (case "(($ac_try" in
25923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25924 *) ac_try_echo=$ac_try;;
25925esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025926eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025927 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025928 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025930 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000025931 ac_cv_rshift_extends_sign=yes
25932else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025933 echo "$as_me: program exited with status $ac_status" >&5
25934echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025935sed 's/^/| /' conftest.$ac_ext >&5
25936
Martin v. Löwis11437992002-04-12 09:54:03 +000025937( exit $ac_status )
25938ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000025939fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025940rm -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 +000025941fi
25942
Martin v. Löwiseba40652007-08-30 20:10:57 +000025943
25944fi
25945
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025946{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25947echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025948if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025949then
Martin v. Löwis11437992002-04-12 09:54:03 +000025950
25951cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025952#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025953_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025954
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025955fi
25956
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025957# check for getc_unlocked and related locking functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025958{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25959echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025960if test "${ac_cv_have_getc_unlocked+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025961 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025962else
Martin v. Löwis11437992002-04-12 09:54:03 +000025963
25964cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025965/* confdefs.h. */
25966_ACEOF
25967cat confdefs.h >>conftest.$ac_ext
25968cat >>conftest.$ac_ext <<_ACEOF
25969/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025970#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025971int
25972main ()
25973{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025974
25975 FILE *f = fopen("/dev/null", "r");
25976 flockfile(f);
25977 getc_unlocked(f);
25978 funlockfile(f);
25979
Martin v. Löwis11437992002-04-12 09:54:03 +000025980 ;
25981 return 0;
25982}
25983_ACEOF
25984rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025985if { (ac_try="$ac_link"
25986case "(($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_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025992 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025993 grep -v '^ *+' conftest.er1 >conftest.err
25994 rm -f conftest.er1
25995 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025997 (exit $ac_status); } && {
25998 test -z "$ac_c_werror_flag" ||
25999 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026000 } && test -s conftest$ac_exeext &&
26001 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026002 ac_cv_have_getc_unlocked=yes
26003else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026004 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026005sed 's/^/| /' conftest.$ac_ext >&5
26006
Martin v. Löwiseba40652007-08-30 20:10:57 +000026007 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026008fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026009
26010rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026011 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026012fi
26013
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026014{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
26015echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026016if test "$ac_cv_have_getc_unlocked" = yes
26017then
Martin v. Löwis11437992002-04-12 09:54:03 +000026018
26019cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026020#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026021_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026022
26023fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000026024
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026025# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000026026# save the value of LIBS so we don't actually link Python with readline
26027LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026028
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026029# On some systems we need to link readline to a termcap compatible
26030# library. NOTE: Keep the precedence of listed libraries synchronised
26031# with setup.py.
26032py_cv_lib_readline=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026033{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
26034echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026035for py_libtermcap in "" ncursesw ncurses curses termcap; do
26036 if test -z "$py_libtermcap"; then
26037 READLINE_LIBS="-lreadline"
26038 else
26039 READLINE_LIBS="-lreadline -l$py_libtermcap"
26040 fi
26041 LIBS="$READLINE_LIBS $LIBS_no_readline"
26042 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026043/* confdefs.h. */
26044_ACEOF
26045cat confdefs.h >>conftest.$ac_ext
26046cat >>conftest.$ac_ext <<_ACEOF
26047/* end confdefs.h. */
26048
Martin v. Löwiseba40652007-08-30 20:10:57 +000026049/* Override any GCC internal prototype to avoid an error.
26050 Use char because int might match the return type of a GCC
26051 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026052#ifdef __cplusplus
26053extern "C"
26054#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026055char readline ();
26056int
26057main ()
26058{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026059return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026060 ;
26061 return 0;
26062}
26063_ACEOF
26064rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026065if { (ac_try="$ac_link"
26066case "(($ac_try" in
26067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26068 *) ac_try_echo=$ac_try;;
26069esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026071 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026072 ac_status=$?
26073 grep -v '^ *+' conftest.er1 >conftest.err
26074 rm -f conftest.er1
26075 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026077 (exit $ac_status); } && {
26078 test -z "$ac_c_werror_flag" ||
26079 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026080 } && test -s conftest$ac_exeext &&
26081 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026082 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026083else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026084 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026085sed 's/^/| /' conftest.$ac_ext >&5
26086
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026087
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026088fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026089
26090rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026091 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026092 if test $py_cv_lib_readline = yes; then
26093 break
26094 fi
26095done
26096# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
26097#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000026098if test $py_cv_lib_readline = no; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026099 { echo "$as_me:$LINENO: result: none" >&5
26100echo "${ECHO_T}none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026101else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026102 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
26103echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026104
26105cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026106#define HAVE_LIBREADLINE 1
26107_ACEOF
26108
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026109fi
26110
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026111# check for readline 2.1
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026112{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
26113echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026114if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026115 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026116else
26117 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026118LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026119cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026120/* confdefs.h. */
26121_ACEOF
26122cat confdefs.h >>conftest.$ac_ext
26123cat >>conftest.$ac_ext <<_ACEOF
26124/* end confdefs.h. */
26125
Martin v. Löwiseba40652007-08-30 20:10:57 +000026126/* Override any GCC internal prototype to avoid an error.
26127 Use char because int might match the return type of a GCC
26128 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026129#ifdef __cplusplus
26130extern "C"
26131#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026132char rl_callback_handler_install ();
26133int
26134main ()
26135{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026136return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026137 ;
26138 return 0;
26139}
26140_ACEOF
26141rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026142if { (ac_try="$ac_link"
26143case "(($ac_try" in
26144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26145 *) ac_try_echo=$ac_try;;
26146esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026148 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026149 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026150 grep -v '^ *+' conftest.er1 >conftest.err
26151 rm -f conftest.er1
26152 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026154 (exit $ac_status); } && {
26155 test -z "$ac_c_werror_flag" ||
26156 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026157 } && test -s conftest$ac_exeext &&
26158 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026159 ac_cv_lib_readline_rl_callback_handler_install=yes
26160else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026161 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026162sed 's/^/| /' conftest.$ac_ext >&5
26163
Martin v. Löwiseba40652007-08-30 20:10:57 +000026164 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026165fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026166
26167rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026168 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026169LIBS=$ac_check_lib_save_LIBS
26170fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026171{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
26172echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
26173if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026174
26175cat >>confdefs.h <<\_ACEOF
26176#define HAVE_RL_CALLBACK 1
26177_ACEOF
26178
26179fi
26180
26181
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026182# check for readline 2.2
26183cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026184/* confdefs.h. */
26185_ACEOF
26186cat confdefs.h >>conftest.$ac_ext
26187cat >>conftest.$ac_ext <<_ACEOF
26188/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026189#include <readline/readline.h>
26190_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026191if { (ac_try="$ac_cpp conftest.$ac_ext"
26192case "(($ac_try" in
26193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26194 *) ac_try_echo=$ac_try;;
26195esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026197 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026198 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000026199 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026200 rm -f conftest.er1
26201 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026203 (exit $ac_status); } >/dev/null && {
26204 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26205 test ! -s conftest.err
26206 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026207 have_readline=yes
26208else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026209 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026210sed 's/^/| /' conftest.$ac_ext >&5
26211
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026212 have_readline=no
26213fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026214
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026215rm -f conftest.err conftest.$ac_ext
26216if test $have_readline = yes
26217then
26218 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026219/* confdefs.h. */
26220_ACEOF
26221cat confdefs.h >>conftest.$ac_ext
26222cat >>conftest.$ac_ext <<_ACEOF
26223/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026224#include <readline/readline.h>
26225
26226_ACEOF
26227if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000026228 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026229
26230cat >>confdefs.h <<\_ACEOF
26231#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
26232_ACEOF
26233
26234fi
Ronald Oussoren75912852010-04-08 08:13:31 +000026235rm -f -r conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000026236
26237 cat >conftest.$ac_ext <<_ACEOF
26238/* confdefs.h. */
26239_ACEOF
26240cat confdefs.h >>conftest.$ac_ext
26241cat >>conftest.$ac_ext <<_ACEOF
26242/* end confdefs.h. */
26243#include <readline/readline.h>
26244
26245_ACEOF
26246if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26247 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
26248
26249cat >>confdefs.h <<\_ACEOF
26250#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
26251_ACEOF
26252
26253fi
Ronald Oussoren75912852010-04-08 08:13:31 +000026254rm -f -r conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026255
26256fi
26257
Martin v. Löwis0daad592001-09-30 21:09:59 +000026258# check for readline 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026259{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
26260echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026261if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026262 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000026263else
Martin v. Löwis11437992002-04-12 09:54:03 +000026264 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026265LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000026266cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026267/* confdefs.h. */
26268_ACEOF
26269cat confdefs.h >>conftest.$ac_ext
26270cat >>conftest.$ac_ext <<_ACEOF
26271/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026272
Martin v. Löwiseba40652007-08-30 20:10:57 +000026273/* Override any GCC internal prototype to avoid an error.
26274 Use char because int might match the return type of a GCC
26275 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026276#ifdef __cplusplus
26277extern "C"
26278#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000026279char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026280int
26281main ()
26282{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026283return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026284 ;
26285 return 0;
26286}
26287_ACEOF
26288rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026289if { (ac_try="$ac_link"
26290case "(($ac_try" in
26291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26292 *) ac_try_echo=$ac_try;;
26293esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026295 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026296 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026297 grep -v '^ *+' conftest.er1 >conftest.err
26298 rm -f conftest.er1
26299 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026301 (exit $ac_status); } && {
26302 test -z "$ac_c_werror_flag" ||
26303 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026304 } && test -s conftest$ac_exeext &&
26305 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026306 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000026307else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026308 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026309sed 's/^/| /' conftest.$ac_ext >&5
26310
Martin v. Löwiseba40652007-08-30 20:10:57 +000026311 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000026312fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026313
26314rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026315 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026316LIBS=$ac_check_lib_save_LIBS
26317fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026318{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
26319echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
26320if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000026321
Martin v. Löwis11437992002-04-12 09:54:03 +000026322cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000026323#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026324_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000026325
Martin v. Löwis0daad592001-09-30 21:09:59 +000026326fi
26327
Michael W. Hudson54241132001-12-07 15:38:26 +000026328
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026329# also in 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026330{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
26331echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026332if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026333 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026334else
26335 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026336LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026337cat >conftest.$ac_ext <<_ACEOF
26338/* confdefs.h. */
26339_ACEOF
26340cat confdefs.h >>conftest.$ac_ext
26341cat >>conftest.$ac_ext <<_ACEOF
26342/* end confdefs.h. */
26343
26344/* Override any GCC internal prototype to avoid an error.
26345 Use char because int might match the return type of a GCC
26346 builtin and then its argument prototype would still apply. */
26347#ifdef __cplusplus
26348extern "C"
26349#endif
26350char rl_completion_display_matches_hook ();
26351int
26352main ()
26353{
26354return rl_completion_display_matches_hook ();
26355 ;
26356 return 0;
26357}
26358_ACEOF
26359rm -f conftest.$ac_objext conftest$ac_exeext
26360if { (ac_try="$ac_link"
26361case "(($ac_try" in
26362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26363 *) ac_try_echo=$ac_try;;
26364esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026366 (eval "$ac_link") 2>conftest.er1
26367 ac_status=$?
26368 grep -v '^ *+' conftest.er1 >conftest.err
26369 rm -f conftest.er1
26370 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026372 (exit $ac_status); } && {
26373 test -z "$ac_c_werror_flag" ||
26374 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026375 } && test -s conftest$ac_exeext &&
26376 $as_test_x conftest$ac_exeext; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026377 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
26378else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026379 echo "$as_me: failed program was:" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026380sed 's/^/| /' conftest.$ac_ext >&5
26381
26382 ac_cv_lib_readline_rl_completion_display_matches_hook=no
26383fi
26384
26385rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26386 conftest$ac_exeext conftest.$ac_ext
26387LIBS=$ac_check_lib_save_LIBS
26388fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026389{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
26390echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
26391if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026392
26393cat >>confdefs.h <<\_ACEOF
26394#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
26395_ACEOF
26396
26397fi
26398
26399
Martin v. Löwis0daad592001-09-30 21:09:59 +000026400# check for readline 4.2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026401{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
26402echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026403if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026404 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000026405else
Martin v. Löwis11437992002-04-12 09:54:03 +000026406 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026407LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000026408cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026409/* confdefs.h. */
26410_ACEOF
26411cat confdefs.h >>conftest.$ac_ext
26412cat >>conftest.$ac_ext <<_ACEOF
26413/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026414
Martin v. Löwiseba40652007-08-30 20:10:57 +000026415/* Override any GCC internal prototype to avoid an error.
26416 Use char because int might match the return type of a GCC
26417 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026418#ifdef __cplusplus
26419extern "C"
26420#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000026421char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026422int
26423main ()
26424{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026425return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026426 ;
26427 return 0;
26428}
26429_ACEOF
26430rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026431if { (ac_try="$ac_link"
26432case "(($ac_try" in
26433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26434 *) ac_try_echo=$ac_try;;
26435esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026437 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026438 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026439 grep -v '^ *+' conftest.er1 >conftest.err
26440 rm -f conftest.er1
26441 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026443 (exit $ac_status); } && {
26444 test -z "$ac_c_werror_flag" ||
26445 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026446 } && test -s conftest$ac_exeext &&
26447 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026448 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000026449else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026450 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026451sed 's/^/| /' conftest.$ac_ext >&5
26452
Martin v. Löwiseba40652007-08-30 20:10:57 +000026453 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000026454fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026455
26456rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026457 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026458LIBS=$ac_check_lib_save_LIBS
26459fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026460{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
26461echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
26462if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000026463
Martin v. Löwis11437992002-04-12 09:54:03 +000026464cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000026465#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026466_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000026467
Guido van Rossum353ae582001-07-10 16:45:32 +000026468fi
26469
Jack Jansendd19cf82001-12-06 22:36:17 +000026470
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026471# also in readline 4.2
26472cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026473/* confdefs.h. */
26474_ACEOF
26475cat confdefs.h >>conftest.$ac_ext
26476cat >>conftest.$ac_ext <<_ACEOF
26477/* end confdefs.h. */
26478#include <readline/readline.h>
26479_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026480if { (ac_try="$ac_cpp conftest.$ac_ext"
26481case "(($ac_try" in
26482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26483 *) ac_try_echo=$ac_try;;
26484esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026486 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026487 ac_status=$?
26488 grep -v '^ *+' conftest.er1 >conftest.err
26489 rm -f conftest.er1
26490 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026492 (exit $ac_status); } >/dev/null && {
26493 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26494 test ! -s conftest.err
26495 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026496 have_readline=yes
26497else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026498 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026499sed 's/^/| /' conftest.$ac_ext >&5
26500
26501 have_readline=no
26502fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026503
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026504rm -f conftest.err conftest.$ac_ext
26505if test $have_readline = yes
26506then
26507 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026508/* confdefs.h. */
26509_ACEOF
26510cat confdefs.h >>conftest.$ac_ext
26511cat >>conftest.$ac_ext <<_ACEOF
26512/* end confdefs.h. */
26513#include <readline/readline.h>
26514
26515_ACEOF
26516if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26517 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
26518
26519cat >>confdefs.h <<\_ACEOF
26520#define HAVE_RL_CATCH_SIGNAL 1
26521_ACEOF
26522
26523fi
Ronald Oussoren75912852010-04-08 08:13:31 +000026524rm -f -r conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026525
26526fi
26527
Martin v. Löwis82bca632006-02-10 20:49:30 +000026528# End of readline checks: restore LIBS
26529LIBS=$LIBS_no_readline
26530
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026531{ echo "$as_me:$LINENO: checking for broken nice()" >&5
26532echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026533if test "${ac_cv_broken_nice+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026534 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000026535else
Martin v. Löwis11437992002-04-12 09:54:03 +000026536
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026537if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000026538 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026539else
Martin v. Löwis11437992002-04-12 09:54:03 +000026540 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026541/* confdefs.h. */
26542_ACEOF
26543cat confdefs.h >>conftest.$ac_ext
26544cat >>conftest.$ac_ext <<_ACEOF
26545/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026546
26547int main()
26548{
26549 int val1 = nice(1);
26550 if (val1 != -1 && val1 == nice(2))
26551 exit(0);
26552 exit(1);
26553}
26554
Martin v. Löwis11437992002-04-12 09:54:03 +000026555_ACEOF
26556rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026557if { (ac_try="$ac_link"
26558case "(($ac_try" in
26559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26560 *) ac_try_echo=$ac_try;;
26561esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026562eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026563 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026564 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026566 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026567 { (case "(($ac_try" in
26568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26569 *) ac_try_echo=$ac_try;;
26570esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026572 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026573 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026575 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026576 ac_cv_broken_nice=yes
26577else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026578 echo "$as_me: program exited with status $ac_status" >&5
26579echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026580sed 's/^/| /' conftest.$ac_ext >&5
26581
Martin v. Löwis11437992002-04-12 09:54:03 +000026582( exit $ac_status )
26583ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026584fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026585rm -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 +000026586fi
26587
Martin v. Löwiseba40652007-08-30 20:10:57 +000026588
26589fi
26590
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026591{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
26592echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026593if test "$ac_cv_broken_nice" = yes
26594then
Martin v. Löwis11437992002-04-12 09:54:03 +000026595
26596cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026597#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026598_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026599
26600fi
26601
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026602{ echo "$as_me:$LINENO: checking for broken poll()" >&5
26603echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026604if test "${ac_cv_broken_poll+set}" = set; then
26605 echo $ECHO_N "(cached) $ECHO_C" >&6
26606else
26607 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026608 ac_cv_broken_poll=no
26609else
26610 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026611/* confdefs.h. */
26612_ACEOF
26613cat confdefs.h >>conftest.$ac_ext
26614cat >>conftest.$ac_ext <<_ACEOF
26615/* end confdefs.h. */
26616
26617#include <poll.h>
26618
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026619int main()
26620{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026621 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026622 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026623
26624 close (42);
26625
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026626 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026627 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026628 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026629 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026630 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026631 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026632 return 1;
26633}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026634
26635_ACEOF
26636rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026637if { (ac_try="$ac_link"
26638case "(($ac_try" in
26639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26640 *) ac_try_echo=$ac_try;;
26641esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026643 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026644 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026646 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026647 { (case "(($ac_try" in
26648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26649 *) ac_try_echo=$ac_try;;
26650esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026652 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026653 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026655 (exit $ac_status); }; }; then
26656 ac_cv_broken_poll=yes
26657else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026658 echo "$as_me: program exited with status $ac_status" >&5
26659echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026660sed 's/^/| /' conftest.$ac_ext >&5
26661
26662( exit $ac_status )
26663ac_cv_broken_poll=no
26664fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026665rm -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 +000026666fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026667
26668
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026669fi
26670
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026671{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
26672echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026673if test "$ac_cv_broken_poll" = yes
26674then
26675
26676cat >>confdefs.h <<\_ACEOF
26677#define HAVE_BROKEN_POLL 1
26678_ACEOF
26679
26680fi
26681
Brett Cannon43802422005-02-10 20:48:03 +000026682# 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 +000026683# (which is not required by ISO C or UNIX spec) and/or if we support
26684# tzname[]
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026685{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
26686echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026687if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026688 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026689else
26690 cat >conftest.$ac_ext <<_ACEOF
26691/* confdefs.h. */
26692_ACEOF
26693cat confdefs.h >>conftest.$ac_ext
26694cat >>conftest.$ac_ext <<_ACEOF
26695/* end confdefs.h. */
26696#include <sys/types.h>
26697#include <$ac_cv_struct_tm>
26698
26699
26700int
26701main ()
26702{
26703static struct tm ac_aggr;
26704if (ac_aggr.tm_zone)
26705return 0;
26706 ;
26707 return 0;
26708}
26709_ACEOF
26710rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026711if { (ac_try="$ac_compile"
26712case "(($ac_try" in
26713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26714 *) ac_try_echo=$ac_try;;
26715esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026717 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026718 ac_status=$?
26719 grep -v '^ *+' conftest.er1 >conftest.err
26720 rm -f conftest.er1
26721 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026723 (exit $ac_status); } && {
26724 test -z "$ac_c_werror_flag" ||
26725 test ! -s conftest.err
26726 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026727 ac_cv_member_struct_tm_tm_zone=yes
26728else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026729 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026730sed 's/^/| /' conftest.$ac_ext >&5
26731
Martin v. Löwiseba40652007-08-30 20:10:57 +000026732 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000026733/* confdefs.h. */
26734_ACEOF
26735cat confdefs.h >>conftest.$ac_ext
26736cat >>conftest.$ac_ext <<_ACEOF
26737/* end confdefs.h. */
26738#include <sys/types.h>
26739#include <$ac_cv_struct_tm>
26740
26741
26742int
26743main ()
26744{
26745static struct tm ac_aggr;
26746if (sizeof ac_aggr.tm_zone)
26747return 0;
26748 ;
26749 return 0;
26750}
26751_ACEOF
26752rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026753if { (ac_try="$ac_compile"
26754case "(($ac_try" in
26755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26756 *) ac_try_echo=$ac_try;;
26757esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026758eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026759 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026760 ac_status=$?
26761 grep -v '^ *+' conftest.er1 >conftest.err
26762 rm -f conftest.er1
26763 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026765 (exit $ac_status); } && {
26766 test -z "$ac_c_werror_flag" ||
26767 test ! -s conftest.err
26768 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026769 ac_cv_member_struct_tm_tm_zone=yes
26770else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026771 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026772sed 's/^/| /' conftest.$ac_ext >&5
26773
Martin v. Löwiseba40652007-08-30 20:10:57 +000026774 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000026775fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026776
26777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026778fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026779
26780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026781fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026782{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
26783echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
26784if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000026785
26786cat >>confdefs.h <<_ACEOF
26787#define HAVE_STRUCT_TM_TM_ZONE 1
26788_ACEOF
26789
26790
26791fi
26792
26793if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
26794
26795cat >>confdefs.h <<\_ACEOF
26796#define HAVE_TM_ZONE 1
26797_ACEOF
26798
26799else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026800 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
26801echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000026802if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026803 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000026804else
26805 cat >conftest.$ac_ext <<_ACEOF
26806/* confdefs.h. */
26807_ACEOF
26808cat confdefs.h >>conftest.$ac_ext
26809cat >>conftest.$ac_ext <<_ACEOF
26810/* end confdefs.h. */
26811#include <time.h>
26812
26813int
26814main ()
26815{
26816#ifndef tzname
26817 (void) tzname;
26818#endif
26819
26820 ;
26821 return 0;
26822}
26823_ACEOF
26824rm -f conftest.$ac_objext
26825if { (ac_try="$ac_compile"
26826case "(($ac_try" in
26827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26828 *) ac_try_echo=$ac_try;;
26829esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026831 (eval "$ac_compile") 2>conftest.er1
26832 ac_status=$?
26833 grep -v '^ *+' conftest.er1 >conftest.err
26834 rm -f conftest.er1
26835 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026837 (exit $ac_status); } && {
26838 test -z "$ac_c_werror_flag" ||
26839 test ! -s conftest.err
26840 } && test -s conftest.$ac_objext; then
26841 ac_cv_have_decl_tzname=yes
26842else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026843 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026844sed 's/^/| /' conftest.$ac_ext >&5
26845
26846 ac_cv_have_decl_tzname=no
26847fi
26848
26849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26850fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026851{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
26852echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
26853if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000026854
26855cat >>confdefs.h <<_ACEOF
26856#define HAVE_DECL_TZNAME 1
26857_ACEOF
26858
26859
26860else
26861 cat >>confdefs.h <<_ACEOF
26862#define HAVE_DECL_TZNAME 0
26863_ACEOF
26864
26865
26866fi
26867
26868
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026869 { echo "$as_me:$LINENO: checking for tzname" >&5
26870echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026871if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026872 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026873else
26874 cat >conftest.$ac_ext <<_ACEOF
26875/* confdefs.h. */
26876_ACEOF
26877cat confdefs.h >>conftest.$ac_ext
26878cat >>conftest.$ac_ext <<_ACEOF
26879/* end confdefs.h. */
26880#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000026881#if !HAVE_DECL_TZNAME
26882extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000026883#endif
26884
26885int
26886main ()
26887{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026888return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000026889 ;
26890 return 0;
26891}
26892_ACEOF
26893rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026894if { (ac_try="$ac_link"
26895case "(($ac_try" in
26896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26897 *) ac_try_echo=$ac_try;;
26898esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026900 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026901 ac_status=$?
26902 grep -v '^ *+' conftest.er1 >conftest.err
26903 rm -f conftest.er1
26904 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026906 (exit $ac_status); } && {
26907 test -z "$ac_c_werror_flag" ||
26908 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026909 } && test -s conftest$ac_exeext &&
26910 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000026911 ac_cv_var_tzname=yes
26912else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026913 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026914sed 's/^/| /' conftest.$ac_ext >&5
26915
Martin v. Löwiseba40652007-08-30 20:10:57 +000026916 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000026917fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026918
26919rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000026920 conftest$ac_exeext conftest.$ac_ext
26921fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026922{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
26923echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026924 if test $ac_cv_var_tzname = yes; then
26925
26926cat >>confdefs.h <<\_ACEOF
26927#define HAVE_TZNAME 1
26928_ACEOF
26929
26930 fi
26931fi
26932
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026933
Martin v. Löwis1d459062005-03-14 21:23:33 +000026934# check tzset(3) exists and works like we expect it to
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026935{ echo "$as_me:$LINENO: checking for working tzset()" >&5
26936echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026937if test "${ac_cv_working_tzset+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026938 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026939else
26940
26941if test "$cross_compiling" = yes; then
26942 ac_cv_working_tzset=no
26943else
26944 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026945/* confdefs.h. */
26946_ACEOF
26947cat confdefs.h >>conftest.$ac_ext
26948cat >>conftest.$ac_ext <<_ACEOF
26949/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026950
26951#include <stdlib.h>
26952#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000026953#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000026954
26955#if HAVE_TZNAME
26956extern char *tzname[];
26957#endif
26958
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026959int main()
26960{
Brett Cannon18367812003-09-19 00:59:16 +000026961 /* Note that we need to ensure that not only does tzset(3)
26962 do 'something' with localtime, but it works as documented
26963 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000026964 This includes making sure that tzname is set properly if
26965 tm->tm_zone does not exist since it is the alternative way
26966 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000026967
26968 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000026969 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000026970 */
26971
Martin v. Löwis1d459062005-03-14 21:23:33 +000026972 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000026973 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
26974
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026975 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026976 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026977 if (localtime(&groundhogday)->tm_hour != 0)
26978 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026979#if HAVE_TZNAME
26980 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26981 if (strcmp(tzname[0], "UTC") ||
26982 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26983 exit(1);
26984#endif
Brett Cannon18367812003-09-19 00:59:16 +000026985
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026986 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026987 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026988 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026989 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026990#if HAVE_TZNAME
26991 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26992 exit(1);
26993#endif
Brett Cannon18367812003-09-19 00:59:16 +000026994
26995 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26996 tzset();
26997 if (localtime(&groundhogday)->tm_hour != 11)
26998 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026999#if HAVE_TZNAME
27000 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
27001 exit(1);
27002#endif
27003
27004#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000027005 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
27006 exit(1);
27007 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
27008 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000027009#endif
Brett Cannon18367812003-09-19 00:59:16 +000027010
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027011 exit(0);
27012}
27013
27014_ACEOF
27015rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027016if { (ac_try="$ac_link"
27017case "(($ac_try" in
27018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27019 *) ac_try_echo=$ac_try;;
27020esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027022 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027023 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027025 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027026 { (case "(($ac_try" in
27027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27028 *) ac_try_echo=$ac_try;;
27029esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027031 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027032 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027034 (exit $ac_status); }; }; then
27035 ac_cv_working_tzset=yes
27036else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027037 echo "$as_me: program exited with status $ac_status" >&5
27038echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027039sed 's/^/| /' conftest.$ac_ext >&5
27040
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027041( exit $ac_status )
27042ac_cv_working_tzset=no
27043fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027044rm -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 +000027045fi
27046
Martin v. Löwiseba40652007-08-30 20:10:57 +000027047
27048fi
27049
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027050{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
27051echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027052if test "$ac_cv_working_tzset" = yes
27053then
27054
27055cat >>confdefs.h <<\_ACEOF
27056#define HAVE_WORKING_TZSET 1
27057_ACEOF
27058
27059fi
27060
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027061# Look for subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027062{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
27063echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027064if test "${ac_cv_stat_tv_nsec+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027065 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027066else
27067 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027068/* confdefs.h. */
27069_ACEOF
27070cat confdefs.h >>conftest.$ac_ext
27071cat >>conftest.$ac_ext <<_ACEOF
27072/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027073#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027074int
27075main ()
27076{
27077
27078struct stat st;
27079st.st_mtim.tv_nsec = 1;
27080
27081 ;
27082 return 0;
27083}
27084_ACEOF
27085rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027086if { (ac_try="$ac_compile"
27087case "(($ac_try" in
27088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27089 *) ac_try_echo=$ac_try;;
27090esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027092 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027093 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027094 grep -v '^ *+' conftest.er1 >conftest.err
27095 rm -f conftest.er1
27096 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027098 (exit $ac_status); } && {
27099 test -z "$ac_c_werror_flag" ||
27100 test ! -s conftest.err
27101 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000027102 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027103else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027104 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027105sed 's/^/| /' conftest.$ac_ext >&5
27106
Martin v. Löwiseba40652007-08-30 20:10:57 +000027107 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027108fi
27109
Martin v. Löwiseba40652007-08-30 20:10:57 +000027110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27111fi
27112
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027113{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
27114echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027115if test "$ac_cv_stat_tv_nsec" = yes
27116then
27117
27118cat >>confdefs.h <<\_ACEOF
27119#define HAVE_STAT_TV_NSEC 1
27120_ACEOF
27121
27122fi
27123
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027124# Look for BSD style subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027125{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
27126echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027127if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027128 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027129else
27130 cat >conftest.$ac_ext <<_ACEOF
27131/* confdefs.h. */
27132_ACEOF
27133cat confdefs.h >>conftest.$ac_ext
27134cat >>conftest.$ac_ext <<_ACEOF
27135/* end confdefs.h. */
27136#include <sys/stat.h>
27137int
27138main ()
27139{
27140
27141struct stat st;
27142st.st_mtimespec.tv_nsec = 1;
27143
27144 ;
27145 return 0;
27146}
27147_ACEOF
27148rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027149if { (ac_try="$ac_compile"
27150case "(($ac_try" in
27151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27152 *) ac_try_echo=$ac_try;;
27153esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027155 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027156 ac_status=$?
27157 grep -v '^ *+' conftest.er1 >conftest.err
27158 rm -f conftest.er1
27159 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027161 (exit $ac_status); } && {
27162 test -z "$ac_c_werror_flag" ||
27163 test ! -s conftest.err
27164 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027165 ac_cv_stat_tv_nsec2=yes
27166else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027167 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027168sed 's/^/| /' conftest.$ac_ext >&5
27169
Martin v. Löwiseba40652007-08-30 20:10:57 +000027170 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027171fi
27172
Martin v. Löwiseba40652007-08-30 20:10:57 +000027173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27174fi
27175
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027176{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
27177echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027178if test "$ac_cv_stat_tv_nsec2" = yes
27179then
27180
27181cat >>confdefs.h <<\_ACEOF
27182#define HAVE_STAT_TV_NSEC2 1
27183_ACEOF
27184
27185fi
27186
Jack Jansen666b1e72001-10-31 12:11:48 +000027187# On HP/UX 11.0, mvwdelch is a block with a return statement
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027188{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
27189echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027190if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027191 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000027192else
Martin v. Löwis11437992002-04-12 09:54:03 +000027193 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027194/* confdefs.h. */
27195_ACEOF
27196cat confdefs.h >>conftest.$ac_ext
27197cat >>conftest.$ac_ext <<_ACEOF
27198/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000027199#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000027200int
27201main ()
27202{
Jack Jansen666b1e72001-10-31 12:11:48 +000027203
27204 int rtn;
27205 rtn = mvwdelch(0,0,0);
27206
Martin v. Löwis11437992002-04-12 09:54:03 +000027207 ;
27208 return 0;
27209}
27210_ACEOF
27211rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027212if { (ac_try="$ac_compile"
27213case "(($ac_try" in
27214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27215 *) ac_try_echo=$ac_try;;
27216esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027218 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027219 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027220 grep -v '^ *+' conftest.er1 >conftest.err
27221 rm -f conftest.er1
27222 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027224 (exit $ac_status); } && {
27225 test -z "$ac_c_werror_flag" ||
27226 test ! -s conftest.err
27227 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000027228 ac_cv_mvwdelch_is_expression=yes
27229else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027230 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027231sed 's/^/| /' conftest.$ac_ext >&5
27232
Martin v. Löwiseba40652007-08-30 20:10:57 +000027233 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000027234fi
27235
Martin v. Löwiseba40652007-08-30 20:10:57 +000027236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27237fi
27238
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027239{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
27240echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000027241
27242if test "$ac_cv_mvwdelch_is_expression" = yes
27243then
Martin v. Löwis11437992002-04-12 09:54:03 +000027244
27245cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027246#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000027247_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027248
27249fi
27250
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027251{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
27252echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027253if test "${ac_cv_window_has_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027254 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000027255else
Martin v. Löwis11437992002-04-12 09:54:03 +000027256 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027257/* confdefs.h. */
27258_ACEOF
27259cat confdefs.h >>conftest.$ac_ext
27260cat >>conftest.$ac_ext <<_ACEOF
27261/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000027262#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000027263int
27264main ()
27265{
Jack Jansen666b1e72001-10-31 12:11:48 +000027266
27267 WINDOW *w;
27268 w->_flags = 0;
27269
Martin v. Löwis11437992002-04-12 09:54:03 +000027270 ;
27271 return 0;
27272}
27273_ACEOF
27274rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027275if { (ac_try="$ac_compile"
27276case "(($ac_try" in
27277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27278 *) ac_try_echo=$ac_try;;
27279esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027281 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027282 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027283 grep -v '^ *+' conftest.er1 >conftest.err
27284 rm -f conftest.er1
27285 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027287 (exit $ac_status); } && {
27288 test -z "$ac_c_werror_flag" ||
27289 test ! -s conftest.err
27290 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000027291 ac_cv_window_has_flags=yes
27292else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027293 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027294sed 's/^/| /' conftest.$ac_ext >&5
27295
Martin v. Löwiseba40652007-08-30 20:10:57 +000027296 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000027297fi
27298
Martin v. Löwiseba40652007-08-30 20:10:57 +000027299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27300fi
27301
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027302{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
27303echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027304
Jack Jansen666b1e72001-10-31 12:11:48 +000027305
27306if test "$ac_cv_window_has_flags" = yes
27307then
Martin v. Löwis11437992002-04-12 09:54:03 +000027308
27309cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027310#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000027311_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027312
27313fi
27314
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027315{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
27316echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027317cat >conftest.$ac_ext <<_ACEOF
27318/* confdefs.h. */
27319_ACEOF
27320cat confdefs.h >>conftest.$ac_ext
27321cat >>conftest.$ac_ext <<_ACEOF
27322/* end confdefs.h. */
27323#include <curses.h>
27324int
27325main ()
27326{
27327void *x=is_term_resized
27328 ;
27329 return 0;
27330}
27331_ACEOF
27332rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027333if { (ac_try="$ac_compile"
27334case "(($ac_try" in
27335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27336 *) ac_try_echo=$ac_try;;
27337esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027339 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027340 ac_status=$?
27341 grep -v '^ *+' conftest.er1 >conftest.err
27342 rm -f conftest.er1
27343 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027345 (exit $ac_status); } && {
27346 test -z "$ac_c_werror_flag" ||
27347 test ! -s conftest.err
27348 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027349
27350cat >>confdefs.h <<\_ACEOF
27351#define HAVE_CURSES_IS_TERM_RESIZED 1
27352_ACEOF
27353
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027354 { echo "$as_me:$LINENO: result: yes" >&5
27355echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027356else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027357 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027358sed 's/^/| /' conftest.$ac_ext >&5
27359
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027360 { echo "$as_me:$LINENO: result: no" >&5
27361echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027362
27363fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027364
Martin v. Löwiseba40652007-08-30 20:10:57 +000027365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27366
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027367{ echo "$as_me:$LINENO: checking for resize_term" >&5
27368echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027369cat >conftest.$ac_ext <<_ACEOF
27370/* confdefs.h. */
27371_ACEOF
27372cat confdefs.h >>conftest.$ac_ext
27373cat >>conftest.$ac_ext <<_ACEOF
27374/* end confdefs.h. */
27375#include <curses.h>
27376int
27377main ()
27378{
27379void *x=resize_term
27380 ;
27381 return 0;
27382}
27383_ACEOF
27384rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027385if { (ac_try="$ac_compile"
27386case "(($ac_try" in
27387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27388 *) ac_try_echo=$ac_try;;
27389esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027390eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027391 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027392 ac_status=$?
27393 grep -v '^ *+' conftest.er1 >conftest.err
27394 rm -f conftest.er1
27395 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027397 (exit $ac_status); } && {
27398 test -z "$ac_c_werror_flag" ||
27399 test ! -s conftest.err
27400 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027401
27402cat >>confdefs.h <<\_ACEOF
27403#define HAVE_CURSES_RESIZE_TERM 1
27404_ACEOF
27405
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027406 { echo "$as_me:$LINENO: result: yes" >&5
27407echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027408else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027409 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027410sed 's/^/| /' conftest.$ac_ext >&5
27411
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027412 { echo "$as_me:$LINENO: result: no" >&5
27413echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027414
27415fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027416
Martin v. Löwiseba40652007-08-30 20:10:57 +000027417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27418
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027419{ echo "$as_me:$LINENO: checking for resizeterm" >&5
27420echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027421cat >conftest.$ac_ext <<_ACEOF
27422/* confdefs.h. */
27423_ACEOF
27424cat confdefs.h >>conftest.$ac_ext
27425cat >>conftest.$ac_ext <<_ACEOF
27426/* end confdefs.h. */
27427#include <curses.h>
27428int
27429main ()
27430{
27431void *x=resizeterm
27432 ;
27433 return 0;
27434}
27435_ACEOF
27436rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027437if { (ac_try="$ac_compile"
27438case "(($ac_try" in
27439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27440 *) ac_try_echo=$ac_try;;
27441esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027443 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027444 ac_status=$?
27445 grep -v '^ *+' conftest.er1 >conftest.err
27446 rm -f conftest.er1
27447 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027449 (exit $ac_status); } && {
27450 test -z "$ac_c_werror_flag" ||
27451 test ! -s conftest.err
27452 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027453
27454cat >>confdefs.h <<\_ACEOF
27455#define HAVE_CURSES_RESIZETERM 1
27456_ACEOF
27457
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027458 { echo "$as_me:$LINENO: result: yes" >&5
27459echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027460else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027461 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027462sed 's/^/| /' conftest.$ac_ext >&5
27463
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027464 { echo "$as_me:$LINENO: result: no" >&5
27465echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027466
27467fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027468
Martin v. Löwiseba40652007-08-30 20:10:57 +000027469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27470
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027471{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
27472echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027473
27474if test -r /dev/ptmx
27475then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027476 { echo "$as_me:$LINENO: result: yes" >&5
27477echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000027478
27479cat >>confdefs.h <<\_ACEOF
27480#define HAVE_DEV_PTMX 1
27481_ACEOF
27482
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027483else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027484 { echo "$as_me:$LINENO: result: no" >&5
27485echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000027486fi
27487
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027488{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
27489echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027490
27491if test -r /dev/ptc
27492then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027493 { echo "$as_me:$LINENO: result: yes" >&5
27494echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027495
27496cat >>confdefs.h <<\_ACEOF
27497#define HAVE_DEV_PTC 1
27498_ACEOF
27499
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027500else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027501 { echo "$as_me:$LINENO: result: no" >&5
27502echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027503fi
27504
Mark Dickinson82864d12009-11-15 16:18:58 +000027505if test "$have_long_long" = yes
27506then
27507 { echo "$as_me:$LINENO: checking for %lld and %llu printf() format support" >&5
27508echo $ECHO_N "checking for %lld and %llu printf() format support... $ECHO_C" >&6; }
27509 if test "${ac_cv_have_long_long_format+set}" = set; then
27510 echo $ECHO_N "(cached) $ECHO_C" >&6
27511else
27512 if test "$cross_compiling" = yes; then
27513 ac_cv_have_long_long_format=no
27514else
27515 cat >conftest.$ac_ext <<_ACEOF
27516/* confdefs.h. */
27517_ACEOF
27518cat confdefs.h >>conftest.$ac_ext
27519cat >>conftest.$ac_ext <<_ACEOF
27520/* end confdefs.h. */
27521
27522 #include <stdio.h>
27523 #include <stddef.h>
27524 #include <string.h>
27525
27526 #ifdef HAVE_SYS_TYPES_H
27527 #include <sys/types.h>
27528 #endif
27529
27530 int main()
27531 {
27532 char buffer[256];
27533
27534 if (sprintf(buffer, "%lld", (long long)123) < 0)
27535 return 1;
27536 if (strcmp(buffer, "123"))
27537 return 1;
27538
27539 if (sprintf(buffer, "%lld", (long long)-123) < 0)
27540 return 1;
27541 if (strcmp(buffer, "-123"))
27542 return 1;
27543
27544 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
27545 return 1;
27546 if (strcmp(buffer, "123"))
27547 return 1;
27548
27549 return 0;
27550 }
27551
27552_ACEOF
27553rm -f conftest$ac_exeext
27554if { (ac_try="$ac_link"
27555case "(($ac_try" in
27556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27557 *) ac_try_echo=$ac_try;;
27558esac
27559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27560 (eval "$ac_link") 2>&5
27561 ac_status=$?
27562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27563 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27564 { (case "(($ac_try" in
27565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27566 *) ac_try_echo=$ac_try;;
27567esac
27568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27569 (eval "$ac_try") 2>&5
27570 ac_status=$?
27571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27572 (exit $ac_status); }; }; then
27573 ac_cv_have_long_long_format=yes
27574else
27575 echo "$as_me: program exited with status $ac_status" >&5
27576echo "$as_me: failed program was:" >&5
27577sed 's/^/| /' conftest.$ac_ext >&5
27578
27579( exit $ac_status )
27580ac_cv_have_long_long_format=no
27581fi
27582rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27583fi
27584
27585
27586
27587fi
27588
27589 { echo "$as_me:$LINENO: result: $ac_cv_have_long_long_format" >&5
27590echo "${ECHO_T}$ac_cv_have_long_long_format" >&6; }
27591fi
27592
Mark Dickinson5ce84742009-12-31 20:48:04 +000027593if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000027594then
27595
27596cat >>confdefs.h <<\_ACEOF
27597#define PY_FORMAT_LONG_LONG "ll"
27598_ACEOF
27599
27600fi
27601
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000027602if test $ac_sys_system = Darwin
27603then
27604 LIBS="$LIBS -framework CoreFoundation"
27605fi
27606
Mark Dickinson82864d12009-11-15 16:18:58 +000027607
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027608{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
27609echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027610if test "${ac_cv_have_size_t_format+set}" = set; then
27611 echo $ECHO_N "(cached) $ECHO_C" >&6
27612else
27613 if test "$cross_compiling" = yes; then
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000027614 ac_cv_have_size_t_format="cross -- assuming yes"
27615
Brett Cannon09d12362006-05-11 05:11:33 +000027616else
27617 cat >conftest.$ac_ext <<_ACEOF
27618/* confdefs.h. */
27619_ACEOF
27620cat confdefs.h >>conftest.$ac_ext
27621cat >>conftest.$ac_ext <<_ACEOF
27622/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027623
Brett Cannon09d12362006-05-11 05:11:33 +000027624#include <stdio.h>
27625#include <stddef.h>
27626#include <string.h>
27627
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000027628#ifdef HAVE_SYS_TYPES_H
27629#include <sys/types.h>
27630#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000027631
27632#ifdef HAVE_SSIZE_T
27633typedef ssize_t Py_ssize_t;
27634#elif SIZEOF_VOID_P == SIZEOF_LONG
27635typedef long Py_ssize_t;
27636#else
27637typedef int Py_ssize_t;
27638#endif
Brett Cannon09d12362006-05-11 05:11:33 +000027639
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000027640int main()
27641{
27642 char buffer[256];
27643
Brett Cannon09d12362006-05-11 05:11:33 +000027644 if(sprintf(buffer, "%zd", (size_t)123) < 0)
27645 return 1;
27646
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000027647 if (strcmp(buffer, "123"))
27648 return 1;
27649
27650 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
27651 return 1;
27652
27653 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000027654 return 1;
27655
27656 return 0;
27657}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027658
Brett Cannon09d12362006-05-11 05:11:33 +000027659_ACEOF
27660rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027661if { (ac_try="$ac_link"
27662case "(($ac_try" in
27663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27664 *) ac_try_echo=$ac_try;;
27665esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027667 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000027668 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000027670 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027671 { (case "(($ac_try" in
27672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27673 *) ac_try_echo=$ac_try;;
27674esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027676 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000027677 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000027679 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027680 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027681else
27682 echo "$as_me: program exited with status $ac_status" >&5
27683echo "$as_me: failed program was:" >&5
27684sed 's/^/| /' conftest.$ac_ext >&5
27685
27686( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027687ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027688fi
27689rm -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 +000027690fi
27691
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027692
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027693fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027694{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
27695echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000027696if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027697
27698cat >>confdefs.h <<\_ACEOF
27699#define PY_FORMAT_SIZE_T "z"
27700_ACEOF
27701
27702fi
27703
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027704{ echo "$as_me:$LINENO: checking for socklen_t" >&5
27705echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027706if test "${ac_cv_type_socklen_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027707 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000027708else
Martin v. Löwis11437992002-04-12 09:54:03 +000027709 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027710/* confdefs.h. */
27711_ACEOF
27712cat confdefs.h >>conftest.$ac_ext
27713cat >>conftest.$ac_ext <<_ACEOF
27714/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000027715
27716#ifdef HAVE_SYS_TYPES_H
27717#include <sys/types.h>
27718#endif
27719#ifdef HAVE_SYS_SOCKET_H
27720#include <sys/socket.h>
27721#endif
27722
27723
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027724typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000027725int
27726main ()
27727{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027728if ((ac__type_new_ *) 0)
27729 return 0;
27730if (sizeof (ac__type_new_))
27731 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000027732 ;
27733 return 0;
27734}
27735_ACEOF
27736rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027737if { (ac_try="$ac_compile"
27738case "(($ac_try" in
27739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27740 *) ac_try_echo=$ac_try;;
27741esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027742eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027743 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027744 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027745 grep -v '^ *+' conftest.er1 >conftest.err
27746 rm -f conftest.er1
27747 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027749 (exit $ac_status); } && {
27750 test -z "$ac_c_werror_flag" ||
27751 test ! -s conftest.err
27752 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027753 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000027754else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027755 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027756sed 's/^/| /' conftest.$ac_ext >&5
27757
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027758 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000027759fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027760
27761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000027762fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027763{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
27764echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
27765if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027766 :
27767else
Guido van Rossum95713eb2000-05-18 20:53:31 +000027768
Martin v. Löwis01c04012002-11-11 14:58:44 +000027769cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027770#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000027771_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027772
27773fi
27774
Michael W. Hudson54241132001-12-07 15:38:26 +000027775
Michael W. Hudson54241132001-12-07 15:38:26 +000027776
27777
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000027778for h in `(cd $srcdir;echo Python/thread_*.h)`
27779do
27780 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
27781done
27782
Michael W. Hudson54241132001-12-07 15:38:26 +000027783
Neal Norwitzd24499d2005-12-18 21:36:39 +000027784SRCDIRS="Parser Grammar Objects Python Modules Mac"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027785{ echo "$as_me:$LINENO: checking for build directories" >&5
27786echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027787for dir in $SRCDIRS; do
27788 if test ! -d $dir; then
27789 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000027790 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027791done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027792{ echo "$as_me:$LINENO: result: done" >&5
27793echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000027794
Guido van Rossum627b2d71993-12-24 10:39:16 +000027795# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000027796ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000027797
Martin v. Löwis11437992002-04-12 09:54:03 +000027798cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027799# This file is a shell script that caches the results of configure
27800# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000027801# scripts and configure runs, see configure's option --config-cache.
27802# It is not useful on other systems. If it contains results you don't
27803# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027804#
Martin v. Löwis11437992002-04-12 09:54:03 +000027805# config.status only pays attention to the cache file if you give it
27806# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027807#
Skip Montanaro6dead952003-09-25 14:50:04 +000027808# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000027809# loading this file, other *unset* `ac_cv_foo' will be assigned the
27810# following values.
27811
27812_ACEOF
27813
Guido van Rossumf78abae1997-01-21 22:02:36 +000027814# The following way of writing the cache mishandles newlines in values,
27815# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027816# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027817# Ultrix sh set writes to stderr and can't be redirected directly,
27818# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027819(
27820 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27821 eval ac_val=\$$ac_var
27822 case $ac_val in #(
27823 *${as_nl}*)
27824 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027825 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
27826echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027827 esac
27828 case $ac_var in #(
27829 _ | IFS | as_nl) ;; #(
27830 *) $as_unset $ac_var ;;
27831 esac ;;
27832 esac
27833 done
27834
Martin v. Löwis11437992002-04-12 09:54:03 +000027835 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027836 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27837 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000027838 # `set' does not quote correctly, so add quotes (double-quote
27839 # substitution turns \\\\ into \\, and sed turns \\ into \).
27840 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027841 "s/'/'\\\\''/g;
27842 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027843 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000027844 *)
27845 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027846 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027847 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027848 esac |
27849 sort
27850) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027851 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000027852 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027853 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000027854 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027855 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27856 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000027857 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27858 :end' >>confcache
27859if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27860 if test -w "$cache_file"; then
27861 test "x$cache_file" != "x/dev/null" &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027862 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
27863echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027864 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027865 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027866 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27867echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027868 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027869fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027870rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027871
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027872test "x$prefix" = xNONE && prefix=$ac_default_prefix
27873# Let make expand exec_prefix.
27874test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027875
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027876DEFS=-DHAVE_CONFIG_H
27877
Skip Montanaro6dead952003-09-25 14:50:04 +000027878ac_libobjs=
27879ac_ltlibobjs=
27880for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27881 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027882 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027883 ac_i=`echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000027884 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27885 # will be set to the directory where LIBOBJS objects are built.
27886 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27887 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027888done
27889LIBOBJS=$ac_libobjs
27890
27891LTLIBOBJS=$ac_ltlibobjs
27892
27893
Martin v. Löwis11437992002-04-12 09:54:03 +000027894
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027895: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000027896ac_clean_files_save=$ac_clean_files
27897ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027898{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27899echo "$as_me: creating $CONFIG_STATUS" >&6;}
27900cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027901#! $SHELL
27902# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027903# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027904# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027905# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027906
Martin v. Löwis11437992002-04-12 09:54:03 +000027907debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027908ac_cs_recheck=false
27909ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027910SHELL=\${CONFIG_SHELL-$SHELL}
27911_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027912
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027913cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027914## --------------------- ##
27915## M4sh Initialization. ##
27916## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027917
Martin v. Löwiseba40652007-08-30 20:10:57 +000027918# Be more Bourne compatible
27919DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027920if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27921 emulate sh
27922 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027923 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027924 # is contrary to our usage. Disable this feature.
27925 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027926 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000027927else
Martin v. Löwiseba40652007-08-30 20:10:57 +000027928 case `(set -o) 2>/dev/null` in
27929 *posix*) set -o posix ;;
27930esac
27931
Martin v. Löwis11437992002-04-12 09:54:03 +000027932fi
Michael W. Hudson54241132001-12-07 15:38:26 +000027933
Skip Montanaro6dead952003-09-25 14:50:04 +000027934
Martin v. Löwis11437992002-04-12 09:54:03 +000027935
27936
Martin v. Löwiseba40652007-08-30 20:10:57 +000027937# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027938# Avoid depending upon Character Ranges.
27939as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27940as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27941as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27942as_cr_digits='0123456789'
27943as_cr_alnum=$as_cr_Letters$as_cr_digits
27944
27945# The user is always right.
27946if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027947 echo "#! /bin/sh" >conf$$.sh
27948 echo "exit 0" >>conf$$.sh
27949 chmod +x conf$$.sh
27950 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27951 PATH_SEPARATOR=';'
27952 else
27953 PATH_SEPARATOR=:
27954 fi
27955 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027956fi
27957
Martin v. Löwiseba40652007-08-30 20:10:57 +000027958# Support unset when possible.
27959if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27960 as_unset=unset
27961else
27962 as_unset=false
27963fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027964
Martin v. Löwiseba40652007-08-30 20:10:57 +000027965
27966# IFS
27967# We need space, tab and new line, in precisely that order. Quoting is
27968# there to prevent editors from complaining about space-tab.
27969# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27970# splitting by setting IFS to empty value.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027971as_nl='
27972'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027973IFS=" "" $as_nl"
27974
27975# Find who we are. Look in the path if we contain no directory separator.
27976case $0 in
27977 *[\\/]* ) as_myself=$0 ;;
27978 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000027979for as_dir in $PATH
27980do
27981 IFS=$as_save_IFS
27982 test -z "$as_dir" && as_dir=.
27983 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27984done
Martin v. Löwiseba40652007-08-30 20:10:57 +000027985IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000027986
Martin v. Löwiseba40652007-08-30 20:10:57 +000027987 ;;
27988esac
27989# We did not find ourselves, most probably we were run as `sh COMMAND'
27990# in which case we are not to be found in the path.
27991if test "x$as_myself" = x; then
27992 as_myself=$0
27993fi
27994if test ! -f "$as_myself"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027995 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +000027996 { (exit 1); exit 1; }
27997fi
27998
27999# Work around bugs in pre-3.0 UWIN ksh.
28000for as_var in ENV MAIL MAILPATH
28001do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
28002done
28003PS1='$ '
28004PS2='> '
28005PS4='+ '
28006
28007# NLS nuisances.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028008for as_var in \
28009 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
28010 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
28011 LC_TELEPHONE LC_TIME
28012do
28013 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
28014 eval $as_var=C; export $as_var
28015 else
28016 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
28017 fi
28018done
Martin v. Löwiseba40652007-08-30 20:10:57 +000028019
28020# Required to use basename.
28021if expr a : '\(a\)' >/dev/null 2>&1 &&
28022 test "X`expr 00001 : '.*\(...\)'`" = X001; then
28023 as_expr=expr
28024else
28025 as_expr=false
28026fi
28027
28028if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
28029 as_basename=basename
28030else
28031 as_basename=false
28032fi
28033
28034
28035# Name of the executable.
28036as_me=`$as_basename -- "$0" ||
28037$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
28038 X"$0" : 'X\(//\)$' \| \
28039 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028040echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028041 sed '/^.*\/\([^/][^/]*\)\/*$/{
28042 s//\1/
28043 q
28044 }
28045 /^X\/\(\/\/\)$/{
28046 s//\1/
28047 q
28048 }
28049 /^X\/\(\/\).*/{
28050 s//\1/
28051 q
28052 }
28053 s/.*/./; q'`
28054
28055# CDPATH.
28056$as_unset CDPATH
28057
28058
28059
Martin v. Löwis11437992002-04-12 09:54:03 +000028060 as_lineno_1=$LINENO
28061 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000028062 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000028063 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000028064
Martin v. Löwis11437992002-04-12 09:54:03 +000028065 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
28066 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000028067 # line-number line after each line using $LINENO; the second 'sed'
28068 # does the real work. The second script uses 'N' to pair each
28069 # line-number line with the line containing $LINENO, and appends
28070 # trailing '-' during substitution so that $LINENO is not a special
28071 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000028072 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000028073 # scripts with optimization help from Paolo Bonzini. Blame Lee
28074 # E. McMahon (1931-1989) for sed's syntax. :-)
28075 sed -n '
28076 p
28077 /[$]LINENO/=
28078 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000028079 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000028080 s/[$]LINENO.*/&-/
28081 t lineno
28082 b
28083 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000028084 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000028085 :loop
28086 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000028087 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000028088 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000028089 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000028090 chmod +x "$as_me.lineno" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028091 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028092 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000028093
Martin v. Löwis11437992002-04-12 09:54:03 +000028094 # Don't try to exec as it changes $[0], causing all sort of problems
28095 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000028096 # original and so on. Autoconf is especially sensitive to this).
28097 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000028098 # Exit status is that of the last command.
28099 exit
28100}
28101
28102
Martin v. Löwiseba40652007-08-30 20:10:57 +000028103if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
28104 as_dirname=dirname
28105else
28106 as_dirname=false
28107fi
28108
28109ECHO_C= ECHO_N= ECHO_T=
28110case `echo -n x` in
28111-n*)
28112 case `echo 'x\c'` in
28113 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
28114 *) ECHO_C='\c';;
28115 esac;;
28116*)
28117 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000028118esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028119
Martin v. Löwiseba40652007-08-30 20:10:57 +000028120if expr a : '\(a\)' >/dev/null 2>&1 &&
28121 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000028122 as_expr=expr
28123else
28124 as_expr=false
28125fi
28126
28127rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000028128if test -d conf$$.dir; then
28129 rm -f conf$$.dir/conf$$.file
28130else
28131 rm -f conf$$.dir
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028132 mkdir conf$$.dir
Martin v. Löwiseba40652007-08-30 20:10:57 +000028133fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028134echo >conf$$.file
28135if ln -s conf$$.file conf$$ 2>/dev/null; then
28136 as_ln_s='ln -s'
28137 # ... but there are two gotchas:
28138 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
28139 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
28140 # In both cases, we have to default to `cp -p'.
28141 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028142 as_ln_s='cp -p'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028143elif ln conf$$.file conf$$ 2>/dev/null; then
28144 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000028145else
28146 as_ln_s='cp -p'
28147fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000028148rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
28149rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000028150
Skip Montanaro6dead952003-09-25 14:50:04 +000028151if mkdir -p . 2>/dev/null; then
28152 as_mkdir_p=:
28153else
Skip Montanarof0d5f792004-08-15 14:08:23 +000028154 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000028155 as_mkdir_p=false
28156fi
28157
Martin v. Löwiseba40652007-08-30 20:10:57 +000028158if test -x / >/dev/null 2>&1; then
28159 as_test_x='test -x'
28160else
28161 if ls -dL / >/dev/null 2>&1; then
28162 as_ls_L_option=L
28163 else
28164 as_ls_L_option=
28165 fi
28166 as_test_x='
28167 eval sh -c '\''
28168 if test -d "$1"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028169 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000028170 else
28171 case $1 in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028172 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028173 esac;
28174 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
28175 ???[sx]*):;;*)false;;esac;fi
28176 '\'' sh
28177 '
28178fi
28179as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000028180
28181# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000028182as_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 +000028183
28184# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000028185as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000028186
28187
Martin v. Löwis11437992002-04-12 09:54:03 +000028188exec 6>&1
28189
Martin v. Löwiseba40652007-08-30 20:10:57 +000028190# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000028191# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000028192# values after options handling.
28193ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000028194This file was extended by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028195generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000028196
28197 CONFIG_FILES = $CONFIG_FILES
28198 CONFIG_HEADERS = $CONFIG_HEADERS
28199 CONFIG_LINKS = $CONFIG_LINKS
28200 CONFIG_COMMANDS = $CONFIG_COMMANDS
28201 $ $0 $@
28202
Martin v. Löwiseba40652007-08-30 20:10:57 +000028203on `(hostname || uname -n) 2>/dev/null | sed 1q`
28204"
28205
Martin v. Löwis11437992002-04-12 09:54:03 +000028206_ACEOF
28207
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028208cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028209# Files that config.status was made for.
Ronald Oussoren450d5612009-06-08 21:12:41 +000028210config_files="$ac_config_files"
28211config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000028212
Martin v. Löwiseba40652007-08-30 20:10:57 +000028213_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028214
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028215cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028216ac_cs_usage="\
28217\`$as_me' instantiates files from templates according to the
28218current configuration.
28219
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028220Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000028221
28222 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000028223 -V, --version print version number and configuration settings, then exit
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028224 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000028225 -d, --debug don't remove temporary files
28226 --recheck update $as_me by reconfiguring in the same conditions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028227 --file=FILE[:TEMPLATE]
28228 instantiate the configuration file FILE
28229 --header=FILE[:TEMPLATE]
28230 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000028231
28232Configuration files:
28233$config_files
28234
28235Configuration headers:
28236$config_headers
28237
28238Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000028239
Martin v. Löwiseba40652007-08-30 20:10:57 +000028240_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028241cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028242ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000028243python config.status 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028244configured by $0, generated by GNU Autoconf 2.61,
28245 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000028246
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028247Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000028248This config.status script is free software; the Free Software Foundation
28249gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000028250
28251ac_pwd='$ac_pwd'
28252srcdir='$srcdir'
28253INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000028254_ACEOF
28255
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028256cat >>$CONFIG_STATUS <<\_ACEOF
28257# If no file are specified by the user, then we need to provide default
28258# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000028259ac_need_defaults=:
28260while test $# != 0
28261do
28262 case $1 in
28263 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000028264 ac_option=`expr "X$1" : 'X\([^=]*\)='`
28265 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000028266 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000028267 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028268 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000028269 ac_option=$1
28270 ac_optarg=$2
28271 ac_shift=shift
28272 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028273 esac
28274
Skip Montanaro6dead952003-09-25 14:50:04 +000028275 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000028276 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000028277 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28278 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028279 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028280 echo "$ac_cs_version"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028281 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000028282 debug=: ;;
28283 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000028284 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028285 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000028286 ac_need_defaults=false;;
28287 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000028288 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028289 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000028290 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028291 --he | --h)
28292 # Conflict between --help and --header
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028293 { echo "$as_me: error: ambiguous option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000028294Try \`$0 --help' for more information." >&2
28295 { (exit 1); exit 1; }; };;
28296 --help | --hel | -h )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028297 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000028298 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
28299 | -silent | --silent | --silen | --sile | --sil | --si | --s)
28300 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028301
28302 # This is an error.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028303 -*) { echo "$as_me: error: unrecognized option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000028304Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028305 { (exit 1); exit 1; }; } ;;
28306
Martin v. Löwiseba40652007-08-30 20:10:57 +000028307 *) ac_config_targets="$ac_config_targets $1"
28308 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028309
28310 esac
28311 shift
28312done
28313
Skip Montanaro6dead952003-09-25 14:50:04 +000028314ac_configure_extra_args=
28315
28316if $ac_cs_silent; then
28317 exec 6>/dev/null
28318 ac_configure_extra_args="$ac_configure_extra_args --silent"
28319fi
28320
28321_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028322cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000028323if \$ac_cs_recheck; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028324 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
28325 CONFIG_SHELL=$SHELL
Martin v. Löwiseba40652007-08-30 20:10:57 +000028326 export CONFIG_SHELL
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028327 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000028328fi
28329
Martin v. Löwis11437992002-04-12 09:54:03 +000028330_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028331cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028332exec 5>>config.log
28333{
28334 echo
28335 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
28336## Running $as_me. ##
28337_ASBOX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028338 echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028339} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000028340
Martin v. Löwiseba40652007-08-30 20:10:57 +000028341_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028342cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028343_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028344
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028345cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028346
28347# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000028348for ac_config_target in $ac_config_targets
28349do
Martin v. Löwiseba40652007-08-30 20:10:57 +000028350 case $ac_config_target in
28351 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
28352 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
28353 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
28354 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000028355 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
28356 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028357 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
28358 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000028359 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028360
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028361 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
28362echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028363 { (exit 1); exit 1; }; };;
28364 esac
28365done
28366
Martin v. Löwiseba40652007-08-30 20:10:57 +000028367
Martin v. Löwis11437992002-04-12 09:54:03 +000028368# If the user did not use the arguments to specify the items to instantiate,
28369# then the envvar interface is used. Set only those that are not.
28370# We use the long form for the default assignment because of an extremely
28371# bizarre bug on SunOS 4.1.3.
28372if $ac_need_defaults; then
28373 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
28374 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
28375fi
28376
Skip Montanaro6dead952003-09-25 14:50:04 +000028377# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000028378# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000028379# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000028380# Hook for its removal unless debugging.
28381# Note that there is a small window in which the directory will not be cleaned:
28382# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000028383$debug ||
28384{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028385 tmp=
28386 trap 'exit_status=$?
28387 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
28388' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000028389 trap '{ (exit 1); exit 1; }' 1 2 13 15
28390}
Martin v. Löwis11437992002-04-12 09:54:03 +000028391# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000028392
Martin v. Löwis11437992002-04-12 09:54:03 +000028393{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028394 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000028395 test -n "$tmp" && test -d "$tmp"
28396} ||
28397{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028398 tmp=./conf$$-$RANDOM
28399 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000028400} ||
28401{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028402 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028403 { (exit 1); exit 1; }
28404}
28405
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028406#
28407# Set up the sed scripts for CONFIG_FILES section.
28408#
28409
28410# No need to generate the scripts if there are no CONFIG_FILES.
28411# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000028412if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000028413
28414_ACEOF
28415
Martin v. Löwiseba40652007-08-30 20:10:57 +000028416
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028417
Martin v. Löwiseba40652007-08-30 20:10:57 +000028418ac_delim='%!_!# '
28419for ac_last_try in false false false false false :; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028420 cat >conf$$subs.sed <<_ACEOF
28421SHELL!$SHELL$ac_delim
28422PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
28423PACKAGE_NAME!$PACKAGE_NAME$ac_delim
28424PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
28425PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
28426PACKAGE_STRING!$PACKAGE_STRING$ac_delim
28427PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
28428exec_prefix!$exec_prefix$ac_delim
28429prefix!$prefix$ac_delim
28430program_transform_name!$program_transform_name$ac_delim
28431bindir!$bindir$ac_delim
28432sbindir!$sbindir$ac_delim
28433libexecdir!$libexecdir$ac_delim
28434datarootdir!$datarootdir$ac_delim
28435datadir!$datadir$ac_delim
28436sysconfdir!$sysconfdir$ac_delim
28437sharedstatedir!$sharedstatedir$ac_delim
28438localstatedir!$localstatedir$ac_delim
28439includedir!$includedir$ac_delim
28440oldincludedir!$oldincludedir$ac_delim
28441docdir!$docdir$ac_delim
28442infodir!$infodir$ac_delim
28443htmldir!$htmldir$ac_delim
28444dvidir!$dvidir$ac_delim
28445pdfdir!$pdfdir$ac_delim
28446psdir!$psdir$ac_delim
28447libdir!$libdir$ac_delim
28448localedir!$localedir$ac_delim
28449mandir!$mandir$ac_delim
28450DEFS!$DEFS$ac_delim
28451ECHO_C!$ECHO_C$ac_delim
28452ECHO_N!$ECHO_N$ac_delim
28453ECHO_T!$ECHO_T$ac_delim
28454LIBS!$LIBS$ac_delim
28455build_alias!$build_alias$ac_delim
28456host_alias!$host_alias$ac_delim
28457target_alias!$target_alias$ac_delim
28458VERSION!$VERSION$ac_delim
28459SOVERSION!$SOVERSION$ac_delim
28460CONFIG_ARGS!$CONFIG_ARGS$ac_delim
28461UNIVERSALSDK!$UNIVERSALSDK$ac_delim
28462ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Ronald Oussoren92919a62009-12-24 13:30:58 +000028463LIPO_32BIT_FLAGS!$LIPO_32BIT_FLAGS$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028464PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
28465PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
28466PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
28467PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
28468PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
28469FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
28470FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
28471FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
28472FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
28473FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
28474MACHDEP!$MACHDEP$ac_delim
28475SGI_ABI!$SGI_ABI$ac_delim
28476EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
28477EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
28478CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
28479EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
28480CC!$CC$ac_delim
28481CFLAGS!$CFLAGS$ac_delim
28482LDFLAGS!$LDFLAGS$ac_delim
28483CPPFLAGS!$CPPFLAGS$ac_delim
28484ac_ct_CC!$ac_ct_CC$ac_delim
28485EXEEXT!$EXEEXT$ac_delim
28486OBJEXT!$OBJEXT$ac_delim
28487CXX!$CXX$ac_delim
28488MAINCC!$MAINCC$ac_delim
28489CPP!$CPP$ac_delim
28490GREP!$GREP$ac_delim
28491EGREP!$EGREP$ac_delim
28492BUILDEXEEXT!$BUILDEXEEXT$ac_delim
28493LIBRARY!$LIBRARY$ac_delim
28494LDLIBRARY!$LDLIBRARY$ac_delim
28495DLLLIBRARY!$DLLLIBRARY$ac_delim
28496BLDLIBRARY!$BLDLIBRARY$ac_delim
28497LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
28498INSTSONAME!$INSTSONAME$ac_delim
28499RUNSHARED!$RUNSHARED$ac_delim
28500LINKCC!$LINKCC$ac_delim
28501GNULD!$GNULD$ac_delim
28502RANLIB!$RANLIB$ac_delim
28503AR!$AR$ac_delim
28504ARFLAGS!$ARFLAGS$ac_delim
28505SVNVERSION!$SVNVERSION$ac_delim
28506INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
28507INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
28508INSTALL_DATA!$INSTALL_DATA$ac_delim
28509LN!$LN$ac_delim
28510OPT!$OPT$ac_delim
28511BASECFLAGS!$BASECFLAGS$ac_delim
28512UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
28513OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
28514LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
28515SO!$SO$ac_delim
28516LDSHARED!$LDSHARED$ac_delim
Ronald Oussoren75912852010-04-08 08:13:31 +000028517LDCXXSHARED!$LDCXXSHARED$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028518_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028519
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028520 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 +000028521 break
28522 elif $ac_last_try; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028523 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28524echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028525 { (exit 1); exit 1; }; }
28526 else
28527 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000028528 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000028529done
28530
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028531ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28532if test -n "$ac_eof"; then
28533 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28534 ac_eof=`expr $ac_eof + 1`
28535fi
28536
28537cat >>$CONFIG_STATUS <<_ACEOF
28538cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
28539/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000028540_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028541sed '
28542s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28543s/^/s,@/; s/!/@,|#_!!_#|/
28544:n
28545t n
28546s/'"$ac_delim"'$/,g/; t
28547s/$/\\/; p
28548N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28549' >>$CONFIG_STATUS <conf$$subs.sed
28550rm -f conf$$subs.sed
28551cat >>$CONFIG_STATUS <<_ACEOF
28552CEOF$ac_eof
Martin v. Löwiseba40652007-08-30 20:10:57 +000028553_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028554
28555
28556ac_delim='%!_!# '
28557for ac_last_try in false false false false false :; do
28558 cat >conf$$subs.sed <<_ACEOF
Ronald Oussoren75912852010-04-08 08:13:31 +000028559BLDSHARED!$BLDSHARED$ac_delim
Ronald Oussoren92919a62009-12-24 13:30:58 +000028560CCSHARED!$CCSHARED$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028561LINKFORSHARED!$LINKFORSHARED$ac_delim
28562CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
28563SHLIBS!$SHLIBS$ac_delim
Benjamin Peterson1c335e62010-01-01 15:16:29 +000028564PKG_CONFIG!$PKG_CONFIG$ac_delim
28565LIBFFI_INCLUDEDIR!$LIBFFI_INCLUDEDIR$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028566USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
28567SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
28568USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
28569LDLAST!$LDLAST$ac_delim
28570THREADOBJ!$THREADOBJ$ac_delim
28571DLINCLDIR!$DLINCLDIR$ac_delim
28572DYNLOADFILE!$DYNLOADFILE$ac_delim
28573MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
28574TRUE!$TRUE$ac_delim
28575LIBOBJS!$LIBOBJS$ac_delim
28576HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
28577HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
28578HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
28579HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
28580HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
28581LIBM!$LIBM$ac_delim
28582LIBC!$LIBC$ac_delim
28583UNICODE_OBJS!$UNICODE_OBJS$ac_delim
28584THREADHEADERS!$THREADHEADERS$ac_delim
28585SRCDIRS!$SRCDIRS$ac_delim
28586LTLIBOBJS!$LTLIBOBJS$ac_delim
28587_ACEOF
28588
Ronald Oussoren75912852010-04-08 08:13:31 +000028589 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 28; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028590 break
28591 elif $ac_last_try; then
28592 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28593echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028594 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028595 else
28596 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28597 fi
28598done
28599
28600ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28601if test -n "$ac_eof"; then
28602 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28603 ac_eof=`expr $ac_eof + 1`
28604fi
28605
28606cat >>$CONFIG_STATUS <<_ACEOF
28607cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
28608/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Martin v. Löwiseba40652007-08-30 20:10:57 +000028609_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028610sed '
28611s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28612s/^/s,@/; s/!/@,|#_!!_#|/
28613:n
28614t n
28615s/'"$ac_delim"'$/,g/; t
28616s/$/\\/; p
28617N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28618' >>$CONFIG_STATUS <conf$$subs.sed
28619rm -f conf$$subs.sed
28620cat >>$CONFIG_STATUS <<_ACEOF
28621:end
28622s/|#_!!_#|//g
28623CEOF$ac_eof
28624_ACEOF
28625
Martin v. Löwiseba40652007-08-30 20:10:57 +000028626
28627# VPATH may cause trouble with some makes, so we remove $(srcdir),
28628# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28629# trailing colons and then remove the whole line if VPATH becomes empty
28630# (actually we leave an empty line to preserve line numbers).
28631if test "x$srcdir" = x.; then
28632 ac_vpsub='/^[ ]*VPATH[ ]*=/{
28633s/:*\$(srcdir):*/:/
28634s/:*\${srcdir}:*/:/
28635s/:*@srcdir@:*/:/
28636s/^\([^=]*=[ ]*\):*/\1/
28637s/:*$//
28638s/^[^=]*=[ ]*$//
28639}'
28640fi
28641
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028642cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028643fi # test -n "$CONFIG_FILES"
28644
Martin v. Löwiseba40652007-08-30 20:10:57 +000028645
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028646for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Martin v. Löwiseba40652007-08-30 20:10:57 +000028647do
28648 case $ac_tag in
28649 :[FHLC]) ac_mode=$ac_tag; continue;;
28650 esac
28651 case $ac_mode$ac_tag in
28652 :[FHL]*:*);;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028653 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
28654echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028655 { (exit 1); exit 1; }; };;
28656 :[FH]-) ac_tag=-:-;;
28657 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28658 esac
28659 ac_save_IFS=$IFS
28660 IFS=:
28661 set x $ac_tag
28662 IFS=$ac_save_IFS
28663 shift
28664 ac_file=$1
28665 shift
28666
28667 case $ac_mode in
28668 :L) ac_source=$1;;
28669 :[FH])
28670 ac_file_inputs=
28671 for ac_f
28672 do
28673 case $ac_f in
28674 -) ac_f="$tmp/stdin";;
28675 *) # Look for the file first in the build tree, then in the source tree
28676 # (if the path is not absolute). The absolute path cannot be DOS-style,
28677 # because $ac_f cannot contain `:'.
28678 test -f "$ac_f" ||
28679 case $ac_f in
28680 [\\/$]*) false;;
28681 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28682 esac ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028683 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
28684echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028685 { (exit 1); exit 1; }; };;
28686 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028687 ac_file_inputs="$ac_file_inputs $ac_f"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028688 done
28689
28690 # Let's still pretend it is `configure' which instantiates (i.e., don't
28691 # use $as_me), people would be surprised to read:
28692 # /* config.h. Generated by config.status. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028693 configure_input="Generated from "`IFS=:
28694 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Martin v. Löwiseba40652007-08-30 20:10:57 +000028695 if test x"$ac_file" != x-; then
28696 configure_input="$ac_file. $configure_input"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028697 { echo "$as_me:$LINENO: creating $ac_file" >&5
28698echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028699 fi
28700
28701 case $ac_tag in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028702 *:-:* | *:-) cat >"$tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028703 esac
28704 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028705 esac
28706
Martin v. Löwiseba40652007-08-30 20:10:57 +000028707 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028708$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028709 X"$ac_file" : 'X\(//\)[^/]' \| \
28710 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000028711 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028712echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028713 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28714 s//\1/
28715 q
28716 }
28717 /^X\(\/\/\)[^/].*/{
28718 s//\1/
28719 q
28720 }
28721 /^X\(\/\/\)$/{
28722 s//\1/
28723 q
28724 }
28725 /^X\(\/\).*/{
28726 s//\1/
28727 q
28728 }
28729 s/.*/./; q'`
28730 { as_dir="$ac_dir"
28731 case $as_dir in #(
28732 -*) as_dir=./$as_dir;;
28733 esac
28734 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000028735 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000028736 while :; do
28737 case $as_dir in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028738 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Martin v. Löwiseba40652007-08-30 20:10:57 +000028739 *) as_qdir=$as_dir;;
28740 esac
28741 as_dirs="'$as_qdir' $as_dirs"
28742 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000028743$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028744 X"$as_dir" : 'X\(//\)[^/]' \| \
28745 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000028746 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028747echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028748 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28749 s//\1/
28750 q
28751 }
28752 /^X\(\/\/\)[^/].*/{
28753 s//\1/
28754 q
28755 }
28756 /^X\(\/\/\)$/{
28757 s//\1/
28758 q
28759 }
28760 /^X\(\/\).*/{
28761 s//\1/
28762 q
28763 }
28764 s/.*/./; q'`
28765 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000028766 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000028767 test -z "$as_dirs" || eval "mkdir $as_dirs"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028768 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
28769echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000028770 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028771 ac_builddir=.
28772
Martin v. Löwiseba40652007-08-30 20:10:57 +000028773case "$ac_dir" in
28774.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28775*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028776 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028777 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028778 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028779 case $ac_top_builddir_sub in
28780 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28781 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28782 esac ;;
28783esac
28784ac_abs_top_builddir=$ac_pwd
28785ac_abs_builddir=$ac_pwd$ac_dir_suffix
28786# for backward compatibility:
28787ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000028788
28789case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028790 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000028791 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000028792 ac_top_srcdir=$ac_top_builddir_sub
28793 ac_abs_top_srcdir=$ac_pwd ;;
28794 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000028795 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028796 ac_top_srcdir=$srcdir
28797 ac_abs_top_srcdir=$srcdir ;;
28798 *) # Relative name.
28799 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28800 ac_top_srcdir=$ac_top_build_prefix$srcdir
28801 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028802esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028803ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000028804
Martin v. Löwis11437992002-04-12 09:54:03 +000028805
Martin v. Löwiseba40652007-08-30 20:10:57 +000028806 case $ac_mode in
28807 :F)
28808 #
28809 # CONFIG_FILE
28810 #
Martin v. Löwis11437992002-04-12 09:54:03 +000028811
28812 case $INSTALL in
28813 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028814 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028815 esac
Brett Cannon19fab762007-06-02 03:02:29 +000028816_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028817
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028818cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028819# If the template does not know about datarootdir, expand it.
28820# FIXME: This hack should be removed a few years after 2.60.
28821ac_datarootdir_hack=; ac_datarootdir_seen=
28822
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028823case `sed -n '/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000028824 p
28825 q
28826}
28827/@datadir@/p
28828/@docdir@/p
28829/@infodir@/p
28830/@localedir@/p
28831/@mandir@/p
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028832' $ac_file_inputs` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028833*datarootdir*) ac_datarootdir_seen=yes;;
28834*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028835 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28836echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028837_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028838cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028839 ac_datarootdir_hack='
28840 s&@datadir@&$datadir&g
28841 s&@docdir@&$docdir&g
28842 s&@infodir@&$infodir&g
28843 s&@localedir@&$localedir&g
28844 s&@mandir@&$mandir&g
28845 s&\\\${datarootdir}&$datarootdir&g' ;;
28846esac
28847_ACEOF
28848
28849# Neutralize VPATH when `$srcdir' = `.'.
28850# Shell code in configure.ac might set extrasub.
28851# FIXME: do we really want to maintain this feature?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028852cat >>$CONFIG_STATUS <<_ACEOF
28853 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028854$extrasub
28855_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028856cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028857:t
28858/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028859s&@configure_input@&$configure_input&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000028860s&@top_builddir@&$ac_top_builddir_sub&;t t
28861s&@srcdir@&$ac_srcdir&;t t
28862s&@abs_srcdir@&$ac_abs_srcdir&;t t
28863s&@top_srcdir@&$ac_top_srcdir&;t t
28864s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28865s&@builddir@&$ac_builddir&;t t
28866s&@abs_builddir@&$ac_abs_builddir&;t t
28867s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28868s&@INSTALL@&$ac_INSTALL&;t t
28869$ac_datarootdir_hack
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028870" $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 +000028871
Martin v. Löwiseba40652007-08-30 20:10:57 +000028872test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28873 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28874 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028875 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028876which seems to be undefined. Please make sure it is defined." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028877echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028878which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028879
Martin v. Löwiseba40652007-08-30 20:10:57 +000028880 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028881 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028882 -) cat "$tmp/out"; rm -f "$tmp/out";;
28883 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
28884 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028885 ;;
28886 :H)
28887 #
28888 # CONFIG_HEADER
28889 #
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028890_ACEOF
28891
28892# Transform confdefs.h into a sed script `conftest.defines', that
28893# substitutes the proper values into config.h.in to produce config.h.
28894rm -f conftest.defines conftest.tail
28895# First, append a space to every undef/define line, to ease matching.
28896echo 's/$/ /' >conftest.defines
28897# Then, protect against being on the right side of a sed subst, or in
28898# an unquoted here document, in config.status. If some macros were
28899# called several times there might be several #defines for the same
28900# symbol, which is useless. But do not sort them, since the last
28901# AC_DEFINE must be honored.
28902ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28903# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
28904# NAME is the cpp macro being defined, VALUE is the value it is being given.
28905# PARAMS is the parameter list in the macro definition--in most cases, it's
28906# just an empty string.
28907ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
28908ac_dB='\\)[ (].*,\\1define\\2'
28909ac_dC=' '
28910ac_dD=' ,'
28911
28912uniq confdefs.h |
28913 sed -n '
28914 t rset
28915 :rset
28916 s/^[ ]*#[ ]*define[ ][ ]*//
28917 t ok
28918 d
28919 :ok
28920 s/[\\&,]/\\&/g
28921 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
28922 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
28923 ' >>conftest.defines
28924
28925# Remove the space that was appended to ease matching.
28926# Then replace #undef with comments. This is necessary, for
28927# example, in the case of _POSIX_SOURCE, which is predefined and required
28928# on some systems where configure will not decide to define it.
28929# (The regexp can be short, since the line contains either #define or #undef.)
28930echo 's/ $//
28931s,^[ #]*u.*,/* & */,' >>conftest.defines
28932
28933# Break up conftest.defines:
28934ac_max_sed_lines=50
28935
28936# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28937# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28938# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28939# et cetera.
28940ac_in='$ac_file_inputs'
28941ac_out='"$tmp/out1"'
28942ac_nxt='"$tmp/out2"'
28943
28944while :
28945do
28946 # Write a here document:
28947 cat >>$CONFIG_STATUS <<_ACEOF
28948 # First, check the format of the line:
28949 cat >"\$tmp/defines.sed" <<\\CEOF
28950/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
28951/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
28952b
28953:def
28954_ACEOF
28955 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
28956 echo 'CEOF
28957 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
28958 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
28959 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
28960 grep . conftest.tail >/dev/null || break
28961 rm -f conftest.defines
28962 mv conftest.tail conftest.defines
28963done
28964rm -f conftest.defines conftest.tail
28965
28966echo "ac_result=$ac_in" >>$CONFIG_STATUS
28967cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028968 if test x"$ac_file" != x-; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028969 echo "/* $configure_input */" >"$tmp/config.h"
28970 cat "$ac_result" >>"$tmp/config.h"
28971 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
28972 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28973echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028974 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028975 rm -f $ac_file
28976 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000028977 fi
28978 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028979 echo "/* $configure_input */"
28980 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000028981 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028982 rm -f "$tmp/out12"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028983 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000028984
Martin v. Löwiseba40652007-08-30 20:10:57 +000028985
28986 esac
28987
28988done # for ac_tag
28989
Guido van Rossum627b2d71993-12-24 10:39:16 +000028990
Martin v. Löwis11437992002-04-12 09:54:03 +000028991{ (exit 0); exit 0; }
28992_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028993chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000028994ac_clean_files=$ac_clean_files_save
28995
28996
28997# configure is writing to config.log, and then calls config.status.
28998# config.status does its own redirection, appending to config.log.
28999# Unfortunately, on DOS this fails, as config.log is still kept open
29000# by configure, so config.status won't be able to write to it; its
29001# output is simply discarded. So we exec the FD to /dev/null,
29002# effectively closing config.log, so it can be properly (re)opened and
29003# appended to by config.status. When coming back to configure, we
29004# need to make the FD available again.
29005if test "$no_create" != yes; then
29006 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000029007 ac_config_status_args=
29008 test "$silent" = yes &&
29009 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000029010 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000029011 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000029012 exec 5>>config.log
29013 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
29014 # would make configure fail if this is the last instruction.
29015 $ac_cs_success || { (exit 1); exit 1; }
29016fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000029017
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000029018
Martin v. Löwisf7afe952006-04-14 15:16:15 +000029019echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000029020if test ! -f Modules/Setup
29021then
29022 cp $srcdir/Modules/Setup.dist Modules/Setup
29023fi
29024
Martin v. Löwisf7afe952006-04-14 15:16:15 +000029025echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000029026if test ! -f Modules/Setup.local
29027then
29028 echo "# Edit this file for local setup changes" >Modules/Setup.local
29029fi
29030
29031echo "creating Makefile"
29032$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
29033 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000029034 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000029035
29036case $ac_sys_system in
29037BeOS)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000029038 { echo "$as_me:$LINENO: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000029039
29040 Support for BeOS is deprecated as of Python 2.6.
29041 See PEP 11 for the gory details.
29042 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000029043echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000029044
29045 Support for BeOS is deprecated as of Python 2.6.
29046 See PEP 11 for the gory details.
29047 " >&2;}
29048 ;;
29049*) ;;
29050esac
29051
Neil Schemenauerc761fc82001-02-19 04:50:49 +000029052mv config.c Modules