blob: 27fe217fd1ed1aae7af8cc348a08a7161907d798 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Mark Dickinson5ce84742009-12-31 20:48:04 +00002# From configure.in Revision: 77169 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004# Generated by GNU Autoconf 2.61 for python 2.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandl464432d2009-05-20 18:24:08 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Martin v. Löwiseba40652007-08-30 20:10:57 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Martin v. Löwiseba40652007-08-30 20:10:57 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000022 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000025else
Martin v. Löwiseba40652007-08-30 20:10:57 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
31
Skip Montanaro6dead952003-09-25 14:50:04 +000032
Martin v. Löwis11437992002-04-12 09:54:03 +000033
34
Martin v. Löwiseba40652007-08-30 20:10:57 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
49 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
53 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Martin v. Löwiseba40652007-08-30 20:10:57 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Martin v. Löwiseba40652007-08-30 20:10:57 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000069as_nl='
70'
Martin v. Löwiseba40652007-08-30 20:10:57 +000071IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Martin v. Löwiseba40652007-08-30 20:10:57 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Martin v. Löwiseba40652007-08-30 20:10:57 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000093 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +000094 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
115 fi
116done
Martin v. Löwiseba40652007-08-30 20:10:57 +0000117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000138echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +0000139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000164 if test $as_have_required = yes && (eval ":
Martin v. Löwiseba40652007-08-30 20:10:57 +0000165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Martin v. Löwiseba40652007-08-30 20:10:57 +0000247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Martin v. Löwiseba40652007-08-30 20:10:57 +0000268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Skip Montanaro89e975f2007-08-22 19:05:21 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaro89e975f2007-08-22 19:05:21 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Martin v. Löwiseba40652007-08-30 20:10:57 +0000351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
Martin v. Löwiseba40652007-08-30 20:10:57 +0000422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000456 chmod +x "$as_me.lineno" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Martin v. Löwiseba40652007-08-30 20:10:57 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000485
Martin v. Löwiseba40652007-08-30 20:10:57 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000498 mkdir conf$$.dir
Martin v. Löwiseba40652007-08-30 20:10:57 +0000499fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +0000511else
512 as_ln_s='cp -p'
513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Martin v. Löwiseba40652007-08-30 20:10:57 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000535 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +0000536 else
537 case $1 in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000538 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Martin v. Löwiseba40652007-08-30 20:10:57 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Martin v. Löwis174440b2008-10-03 08:59:41 +0000578PACKAGE_VERSION='2.7'
579PACKAGE_STRING='python 2.7'
Georg Brandl464432d2009-05-20 18:24:08 +0000580PACKAGE_BUGREPORT='http://bugs.python.org/'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000611#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000619ac_subst_vars='SHELL
Alexandre Vassalottia2db6872009-07-17 07:46:46 +0000620PATH_SEPARATOR
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
660ARCH_RUN_32BIT
Ronald Oussoren92919a62009-12-24 13:30:58 +0000661LIPO_32BIT_FLAGS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000662PYTHONFRAMEWORK
663PYTHONFRAMEWORKIDENTIFIER
664PYTHONFRAMEWORKDIR
665PYTHONFRAMEWORKPREFIX
666PYTHONFRAMEWORKINSTALLDIR
667FRAMEWORKINSTALLFIRST
668FRAMEWORKINSTALLLAST
669FRAMEWORKALTINSTALLFIRST
670FRAMEWORKALTINSTALLLAST
671FRAMEWORKUNIXTOOLSPREFIX
672MACHDEP
673SGI_ABI
674EXTRAPLATDIR
675EXTRAMACHDEPPATH
676CONFIGURE_MACOSX_DEPLOYMENT_TARGET
677EXPORT_MACOSX_DEPLOYMENT_TARGET
678CC
679CFLAGS
680LDFLAGS
681CPPFLAGS
682ac_ct_CC
683EXEEXT
684OBJEXT
685CXX
686MAINCC
687CPP
688GREP
689EGREP
690BUILDEXEEXT
691LIBRARY
692LDLIBRARY
693DLLLIBRARY
694BLDLIBRARY
695LDLIBRARYDIR
696INSTSONAME
697RUNSHARED
698LINKCC
699GNULD
700RANLIB
701AR
702ARFLAGS
703SVNVERSION
704INSTALL_PROGRAM
705INSTALL_SCRIPT
706INSTALL_DATA
707LN
708OPT
709BASECFLAGS
710UNIVERSAL_ARCH_FLAGS
711OTHER_LIBTOOL_OPT
712LIBTOOL_CRUFT
713SO
714LDSHARED
715BLDSHARED
716CCSHARED
717LINKFORSHARED
718CFLAGSFORSHARED
719SHLIBS
720USE_SIGNAL_MODULE
721SIGNAL_OBJS
722USE_THREAD_MODULE
723LDLAST
724THREADOBJ
725DLINCLDIR
726DYNLOADFILE
727MACHDEP_OBJS
728TRUE
729LIBOBJS
730HAVE_GETHOSTBYNAME_R_6_ARG
731HAVE_GETHOSTBYNAME_R_5_ARG
732HAVE_GETHOSTBYNAME_R_3_ARG
733HAVE_GETHOSTBYNAME_R
734HAVE_GETHOSTBYNAME
735LIBM
736LIBC
737UNICODE_OBJS
738THREADHEADERS
739SRCDIRS
740LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000741ac_subst_files=''
Martin v. Löwiseba40652007-08-30 20:10:57 +0000742 ac_precious_vars='build_alias
743host_alias
744target_alias
745CC
746CFLAGS
747LDFLAGS
748LIBS
749CPPFLAGS
750CPP'
751
Guido van Rossum627b2d71993-12-24 10:39:16 +0000752
Guido van Rossum7f43da71994-08-01 12:15:30 +0000753# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000754ac_init_help=
755ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000756# The variables have the same names as the options, with
757# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000758cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000759exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000760no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000761no_recursion=
762prefix=NONE
763program_prefix=NONE
764program_suffix=NONE
765program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000766silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000767site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000768srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000769verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000770x_includes=NONE
771x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000772
773# Installation directory options.
774# These are left unexpanded so users can "make install exec_prefix=/foo"
775# and all the variables that are supposed to be based on exec_prefix
776# by default will actually change.
777# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000778# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000779bindir='${exec_prefix}/bin'
780sbindir='${exec_prefix}/sbin'
781libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000782datarootdir='${prefix}/share'
783datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000784sysconfdir='${prefix}/etc'
785sharedstatedir='${prefix}/com'
786localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000787includedir='${prefix}/include'
788oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000789docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
790infodir='${datarootdir}/info'
791htmldir='${docdir}'
792dvidir='${docdir}'
793pdfdir='${docdir}'
794psdir='${docdir}'
795libdir='${exec_prefix}/lib'
796localedir='${datarootdir}/locale'
797mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000798
Guido van Rossum7f43da71994-08-01 12:15:30 +0000799ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000800ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000801for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000802do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803 # If the previous option needs an argument, assign it.
804 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000805 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000806 ac_prev=
807 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000808 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000809
Martin v. Löwiseba40652007-08-30 20:10:57 +0000810 case $ac_option in
811 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
812 *) ac_optarg=yes ;;
813 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000814
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000815 # Accept the important Cygnus configure options, so we can diagnose typos.
816
Martin v. Löwiseba40652007-08-30 20:10:57 +0000817 case $ac_dashdash$ac_option in
818 --)
819 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000820
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000821 -bindir | --bindir | --bindi | --bind | --bin | --bi)
822 ac_prev=bindir ;;
823 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000824 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000825
826 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000827 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000828 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000829 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000830
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000831 -cache-file | --cache-file | --cache-fil | --cache-fi \
832 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
833 ac_prev=cache_file ;;
834 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
835 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000836 cache_file=$ac_optarg ;;
837
838 --config-cache | -C)
839 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000840
Martin v. Löwiseba40652007-08-30 20:10:57 +0000841 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000842 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000843 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000844 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000845
Martin v. Löwiseba40652007-08-30 20:10:57 +0000846 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
847 | --dataroo | --dataro | --datar)
848 ac_prev=datarootdir ;;
849 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
850 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
851 datarootdir=$ac_optarg ;;
852
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853 -disable-* | --disable-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000854 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000855 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000856 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
857 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000858 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000859 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
860 eval enable_$ac_feature=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000861
862 -docdir | --docdir | --docdi | --doc | --do)
863 ac_prev=docdir ;;
864 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
865 docdir=$ac_optarg ;;
866
867 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
868 ac_prev=dvidir ;;
869 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
870 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871
872 -enable-* | --enable-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000873 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000875 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
876 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000877 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000878 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
879 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
882 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
883 | --exec | --exe | --ex)
884 ac_prev=exec_prefix ;;
885 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
886 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
887 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000888 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889
890 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000891 # Obsolete; use --with-gas.
892 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000893
Martin v. Löwis11437992002-04-12 09:54:03 +0000894 -help | --help | --hel | --he | -h)
895 ac_init_help=long ;;
896 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
897 ac_init_help=recursive ;;
898 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
899 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900
901 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000902 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000904 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905
Martin v. Löwiseba40652007-08-30 20:10:57 +0000906 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
907 ac_prev=htmldir ;;
908 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
909 | --ht=*)
910 htmldir=$ac_optarg ;;
911
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000912 -includedir | --includedir | --includedi | --included | --include \
913 | --includ | --inclu | --incl | --inc)
914 ac_prev=includedir ;;
915 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
916 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000917 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000918
919 -infodir | --infodir | --infodi | --infod | --info | --inf)
920 ac_prev=infodir ;;
921 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000922 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000923
924 -libdir | --libdir | --libdi | --libd)
925 ac_prev=libdir ;;
926 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000927 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000928
929 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
930 | --libexe | --libex | --libe)
931 ac_prev=libexecdir ;;
932 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
933 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000934 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935
Martin v. Löwiseba40652007-08-30 20:10:57 +0000936 -localedir | --localedir | --localedi | --localed | --locale)
937 ac_prev=localedir ;;
938 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
939 localedir=$ac_optarg ;;
940
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000941 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000942 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943 ac_prev=localstatedir ;;
944 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000945 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000946 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000947
948 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
949 ac_prev=mandir ;;
950 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000952
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000954 # Obsolete; use --without-fp.
955 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000956
957 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000958 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000959 no_create=yes ;;
960
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000961 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
962 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
963 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000964
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000965 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
966 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
967 | --oldin | --oldi | --old | --ol | --o)
968 ac_prev=oldincludedir ;;
969 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
970 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
971 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000972 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000973
Guido van Rossum7f43da71994-08-01 12:15:30 +0000974 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
975 ac_prev=prefix ;;
976 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000977 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000978
979 -program-prefix | --program-prefix | --program-prefi | --program-pref \
980 | --program-pre | --program-pr | --program-p)
981 ac_prev=program_prefix ;;
982 -program-prefix=* | --program-prefix=* | --program-prefi=* \
983 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000984 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000985
986 -program-suffix | --program-suffix | --program-suffi | --program-suff \
987 | --program-suf | --program-su | --program-s)
988 ac_prev=program_suffix ;;
989 -program-suffix=* | --program-suffix=* | --program-suffi=* \
990 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000991 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992
993 -program-transform-name | --program-transform-name \
994 | --program-transform-nam | --program-transform-na \
995 | --program-transform-n | --program-transform- \
996 | --program-transform | --program-transfor \
997 | --program-transfo | --program-transf \
998 | --program-trans | --program-tran \
999 | --progr-tra | --program-tr | --program-t)
1000 ac_prev=program_transform_name ;;
1001 -program-transform-name=* | --program-transform-name=* \
1002 | --program-transform-nam=* | --program-transform-na=* \
1003 | --program-transform-n=* | --program-transform-=* \
1004 | --program-transform=* | --program-transfor=* \
1005 | --program-transfo=* | --program-transf=* \
1006 | --program-trans=* | --program-tran=* \
1007 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001008 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009
Martin v. Löwiseba40652007-08-30 20:10:57 +00001010 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1011 ac_prev=pdfdir ;;
1012 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1013 pdfdir=$ac_optarg ;;
1014
1015 -psdir | --psdir | --psdi | --psd | --ps)
1016 ac_prev=psdir ;;
1017 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1018 psdir=$ac_optarg ;;
1019
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1021 | -silent | --silent | --silen | --sile | --sil)
1022 silent=yes ;;
1023
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001024 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1025 ac_prev=sbindir ;;
1026 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1027 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001029
1030 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1031 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1032 | --sharedst | --shareds | --shared | --share | --shar \
1033 | --sha | --sh)
1034 ac_prev=sharedstatedir ;;
1035 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1036 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1037 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1038 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001041 -site | --site | --sit)
1042 ac_prev=site ;;
1043 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001045
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1047 ac_prev=srcdir ;;
1048 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001049 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001050
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1052 | --syscon | --sysco | --sysc | --sys | --sy)
1053 ac_prev=sysconfdir ;;
1054 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1055 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001057
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001062
1063 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1064 verbose=yes ;;
1065
Martin v. Löwis11437992002-04-12 09:54:03 +00001066 -version | --version | --versio | --versi | --vers | -V)
1067 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001068
1069 -with-* | --with-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001070 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001071 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001072 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1073 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001075 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1076 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077
1078 -without-* | --without-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001079 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001080 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001081 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1082 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001084 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1085 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001087 --x)
1088 # Obsolete; use --with-x.
1089 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090
1091 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1092 | --x-incl | --x-inc | --x-in | --x-i)
1093 ac_prev=x_includes ;;
1094 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1095 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097
1098 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1099 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1100 ac_prev=x_libraries ;;
1101 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1102 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001105 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001106Try \`$0 --help' for more information." >&2
1107 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108 ;;
1109
Martin v. Löwis11437992002-04-12 09:54:03 +00001110 *=*)
1111 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1112 # Reject names that are not valid shell variable names.
1113 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001114 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001116 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 export $ac_envvar ;;
1118
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001119 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 # FIXME: should be removed in autoconf 3.0.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001121 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001122 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001123 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001125 ;;
1126
1127 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001128done
1129
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001131 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001132 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134fi
1135
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001136# Be sure to have absolute directory names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001137for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1138 datadir sysconfdir sharedstatedir localstatedir includedir \
1139 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1140 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001141do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001142 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001144 [\\/$]* | ?:[\\/]* ) continue;;
1145 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001147 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001148 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001149done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001150
Martin v. Löwis11437992002-04-12 09:54:03 +00001151# There might be people who depend on the old broken behavior: `$host'
1152# used to hold the argument of --host etc.
1153# FIXME: To remove some day.
1154build=$build_alias
1155host=$host_alias
1156target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001157
Martin v. Löwis11437992002-04-12 09:54:03 +00001158# FIXME: To remove some day.
1159if test "x$host_alias" != x; then
1160 if test "x$build_alias" = x; then
1161 cross_compiling=maybe
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001162 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 If a cross compiler is detected then cross compile mode will be used." >&2
1164 elif test "x$build_alias" != "x$host_alias"; then
1165 cross_compiling=yes
1166 fi
1167fi
1168
1169ac_tool_prefix=
1170test -n "$host_alias" && ac_tool_prefix=$host_alias-
1171
1172test "$silent" = yes && exec 6>/dev/null
1173
Guido van Rossum627b2d71993-12-24 10:39:16 +00001174
Martin v. Löwiseba40652007-08-30 20:10:57 +00001175ac_pwd=`pwd` && test -n "$ac_pwd" &&
1176ac_ls_di=`ls -di .` &&
1177ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001178 { echo "$as_me: error: Working directory cannot be determined" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001179 { (exit 1); exit 1; }; }
1180test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001181 { echo "$as_me: error: pwd does not report name of working directory" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001182 { (exit 1); exit 1; }; }
1183
1184
Guido van Rossum627b2d71993-12-24 10:39:16 +00001185# Find the source files, if location was not specified.
1186if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001188 # Try the directory containing this script, then the parent directory.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001189 ac_confdir=`$as_dirname -- "$0" ||
1190$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1191 X"$0" : 'X\(//\)[^/]' \| \
1192 X"$0" : 'X\(//\)$' \| \
1193 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1194echo X"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001195 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1196 s//\1/
1197 q
1198 }
1199 /^X\(\/\/\)[^/].*/{
1200 s//\1/
1201 q
1202 }
1203 /^X\(\/\/\)$/{
1204 s//\1/
1205 q
1206 }
1207 /^X\(\/\).*/{
1208 s//\1/
1209 q
1210 }
1211 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001212 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001213 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001214 srcdir=..
1215 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001216else
1217 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001218fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001219if test ! -r "$srcdir/$ac_unique_file"; then
1220 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001221 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001222 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001223fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001224ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1225ac_abs_confdir=`(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001226 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001227 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001228 pwd)`
1229# When building in place, set srcdir=.
1230if test "$ac_abs_confdir" = "$ac_pwd"; then
1231 srcdir=.
1232fi
1233# Remove unnecessary trailing slashes from srcdir.
1234# Double slashes in file names in object file debugging info
1235# mess up M-x gdb in Emacs.
1236case $srcdir in
1237*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1238esac
1239for ac_var in $ac_precious_vars; do
1240 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1241 eval ac_env_${ac_var}_value=\$${ac_var}
1242 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1243 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1244done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001245
Martin v. Löwis11437992002-04-12 09:54:03 +00001246#
1247# Report the --help message.
1248#
1249if test "$ac_init_help" = "long"; then
1250 # Omit some internal or obsolete options to make the list less imposing.
1251 # This message is too long to be a string in the A/UX 3.1 sh.
1252 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001253\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001254
1255Usage: $0 [OPTION]... [VAR=VALUE]...
1256
1257To assign environment variables (e.g., CC, CFLAGS...), specify them as
1258VAR=VALUE. See below for descriptions of some of the useful variables.
1259
1260Defaults for the options are specified in brackets.
1261
1262Configuration:
1263 -h, --help display this help and exit
1264 --help=short display options specific to this package
1265 --help=recursive display the short help of all the included packages
1266 -V, --version display version information and exit
1267 -q, --quiet, --silent do not print \`checking...' messages
1268 --cache-file=FILE cache test results in FILE [disabled]
1269 -C, --config-cache alias for \`--cache-file=config.cache'
1270 -n, --no-create do not create output files
1271 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1272
Martin v. Löwis11437992002-04-12 09:54:03 +00001273Installation directories:
1274 --prefix=PREFIX install architecture-independent files in PREFIX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001275 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001276 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001277 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001278
1279By default, \`make install' will install all the files in
1280\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1281an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1282for instance \`--prefix=\$HOME'.
1283
1284For better control, use the options below.
1285
1286Fine tuning of the installation directories:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001287 --bindir=DIR user executables [EPREFIX/bin]
1288 --sbindir=DIR system admin executables [EPREFIX/sbin]
1289 --libexecdir=DIR program executables [EPREFIX/libexec]
1290 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1291 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1292 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1293 --libdir=DIR object code libraries [EPREFIX/lib]
1294 --includedir=DIR C header files [PREFIX/include]
1295 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1296 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1297 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1298 --infodir=DIR info documentation [DATAROOTDIR/info]
1299 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1300 --mandir=DIR man documentation [DATAROOTDIR/man]
1301 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1302 --htmldir=DIR html documentation [DOCDIR]
1303 --dvidir=DIR dvi documentation [DOCDIR]
1304 --pdfdir=DIR pdf documentation [DOCDIR]
1305 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001306_ACEOF
1307
1308 cat <<\_ACEOF
1309_ACEOF
1310fi
1311
1312if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001313 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001314 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001315 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001316 cat <<\_ACEOF
1317
1318Optional Features:
1319 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1320 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001321 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001322 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001323 --enable-framework[=INSTALLDIR]
1324 Build (MacOSX|Darwin) framework
1325 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001326 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001327 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1328 --enable-ipv6 Enable ipv6 (with ipv4) support
1329 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001330 --enable-big-digits[=BITS]
1331 use big digits for Python longs [BITS=30]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001332 --enable-unicode[=ucs[24]]
1333 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001334
1335Optional Packages:
1336 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1337 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001338 --with-universal-archs=ARCH
1339 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001340 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001341 --with-framework-name=FRAMEWORK
1342 specify an alternate name of the framework built
1343 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001344 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001345 --with-cxx-main=<compiler>
1346 compile main() and link python executable with C++
1347 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001348 --with-suffix=.exe set executable suffix
1349 --with-pydebug build with Py_DEBUG defined
1350 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001351 --with-system-expat build pyexpat module using an installed expat
1352 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001353 --with-system-ffi build _ctypes module using an installed ffi library
Benjamin Peterson867475c2009-04-29 20:36:25 +00001354 --with-dbmliborder=db1:db2:...
1355 order to check db backends for dbm. Valid value is a
1356 colon separated string with the backend names
1357 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001358 --with-signal-module disable/enable signal module
1359 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1360 --with(out)-threads[=DIRECTORY]
1361 disable/enable thread support
1362 --with(out)-thread[=DIRECTORY]
1363 deprecated; use --with(out)-threads
1364 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001365 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001366 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001367 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001368 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001369 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001370 --with-fpectl enable SIGFPE catching
1371 --with-libm=STRING math library
1372 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001373
1374Some influential environment variables:
1375 CC C compiler command
1376 CFLAGS C compiler flags
1377 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1378 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001379 LIBS libraries to pass to the linker, e.g. -l<library>
1380 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1381 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001382 CPP C preprocessor
1383
1384Use these variables to override the choices made by `configure' or to help
1385it to find libraries and programs with nonstandard names/locations.
1386
Georg Brandl464432d2009-05-20 18:24:08 +00001387Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001388_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001389ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001390fi
1391
1392if test "$ac_init_help" = "recursive"; then
1393 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001394 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001395 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001396 ac_builddir=.
1397
Martin v. Löwiseba40652007-08-30 20:10:57 +00001398case "$ac_dir" in
1399.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1400*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001401 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001402 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001403 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001404 case $ac_top_builddir_sub in
1405 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1406 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1407 esac ;;
1408esac
1409ac_abs_top_builddir=$ac_pwd
1410ac_abs_builddir=$ac_pwd$ac_dir_suffix
1411# for backward compatibility:
1412ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001413
1414case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001415 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001416 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001417 ac_top_srcdir=$ac_top_builddir_sub
1418 ac_abs_top_srcdir=$ac_pwd ;;
1419 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001420 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001421 ac_top_srcdir=$srcdir
1422 ac_abs_top_srcdir=$srcdir ;;
1423 *) # Relative name.
1424 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1425 ac_top_srcdir=$ac_top_build_prefix$srcdir
1426 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001427esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001428ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001429
Martin v. Löwiseba40652007-08-30 20:10:57 +00001430 cd "$ac_dir" || { ac_status=$?; continue; }
1431 # Check for guested configure.
1432 if test -f "$ac_srcdir/configure.gnu"; then
1433 echo &&
1434 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1435 elif test -f "$ac_srcdir/configure"; then
1436 echo &&
1437 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001438 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001439 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001440 fi || ac_status=$?
1441 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001442 done
1443fi
1444
Martin v. Löwiseba40652007-08-30 20:10:57 +00001445test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001446if $ac_init_version; then
1447 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001448python configure 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001449generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001450
Martin v. Löwiseba40652007-08-30 20:10:57 +00001451Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014522002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001453This configure script is free software; the Free Software Foundation
1454gives unlimited permission to copy, distribute and modify it.
1455_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001456 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001457fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001458cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001459This file contains any messages produced by compilers while
1460running configure, to aid debugging if configure makes a mistake.
1461
Martin v. Löwis174440b2008-10-03 08:59:41 +00001462It was created by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001463generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001464
1465 $ $0 $@
1466
1467_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001468exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001469{
1470cat <<_ASUNAME
1471## --------- ##
1472## Platform. ##
1473## --------- ##
1474
1475hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1476uname -m = `(uname -m) 2>/dev/null || echo unknown`
1477uname -r = `(uname -r) 2>/dev/null || echo unknown`
1478uname -s = `(uname -s) 2>/dev/null || echo unknown`
1479uname -v = `(uname -v) 2>/dev/null || echo unknown`
1480
1481/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1482/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1483
1484/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1485/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1486/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001487/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001488/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1489/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1490/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1491
1492_ASUNAME
1493
1494as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1495for as_dir in $PATH
1496do
1497 IFS=$as_save_IFS
1498 test -z "$as_dir" && as_dir=.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001499 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001500done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001501IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001502
1503} >&5
1504
1505cat >&5 <<_ACEOF
1506
1507
1508## ----------- ##
1509## Core tests. ##
1510## ----------- ##
1511
1512_ACEOF
1513
1514
1515# Keep a trace of the command line.
1516# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001517# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001518# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001519# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001520ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001521ac_configure_args0=
1522ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001523ac_must_keep_next=false
1524for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001525do
Skip Montanaro6dead952003-09-25 14:50:04 +00001526 for ac_arg
1527 do
1528 case $ac_arg in
1529 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1530 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1531 | -silent | --silent | --silen | --sile | --sil)
1532 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001533 *\'*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001534 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001535 esac
1536 case $ac_pass in
1537 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1538 2)
1539 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1540 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001541 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001542 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001543 case $ac_arg in
1544 *=* | --config-cache | -C | -disable-* | --disable-* \
1545 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1546 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1547 | -with-* | --with-* | -without-* | --without-* | --x)
1548 case "$ac_configure_args0 " in
1549 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1550 esac
1551 ;;
1552 -* ) ac_must_keep_next=true ;;
1553 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001554 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001555 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001556 ;;
1557 esac
1558 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001559done
Skip Montanaro6dead952003-09-25 14:50:04 +00001560$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1561$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001562
1563# When interrupted or exit'd, cleanup temporary files, and complete
1564# config.log. We remove comments because anyway the quotes in there
1565# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001566# WARNING: Use '\'' to represent an apostrophe within the trap.
1567# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00001568trap 'exit_status=$?
1569 # Save into config.log some information that might help in debugging.
1570 {
1571 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001572
Martin v. Löwis11437992002-04-12 09:54:03 +00001573 cat <<\_ASBOX
1574## ---------------- ##
1575## Cache variables. ##
1576## ---------------- ##
1577_ASBOX
1578 echo
1579 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001580(
1581 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1582 eval ac_val=\$$ac_var
1583 case $ac_val in #(
1584 *${as_nl}*)
1585 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001586 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1587echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001588 esac
1589 case $ac_var in #(
1590 _ | IFS | as_nl) ;; #(
1591 *) $as_unset $ac_var ;;
1592 esac ;;
1593 esac
1594 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001595 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001596 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1597 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001598 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001599 "s/'\''/'\''\\\\'\'''\''/g;
1600 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1601 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001602 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001603 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001604 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001605 esac |
1606 sort
1607)
Martin v. Löwis11437992002-04-12 09:54:03 +00001608 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001609
1610 cat <<\_ASBOX
1611## ----------------- ##
1612## Output variables. ##
1613## ----------------- ##
1614_ASBOX
1615 echo
1616 for ac_var in $ac_subst_vars
1617 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001618 eval ac_val=\$$ac_var
1619 case $ac_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001620 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001621 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001622 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001623 done | sort
1624 echo
1625
1626 if test -n "$ac_subst_files"; then
1627 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001628## ------------------- ##
1629## File substitutions. ##
1630## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001631_ASBOX
1632 echo
1633 for ac_var in $ac_subst_files
1634 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001635 eval ac_val=\$$ac_var
1636 case $ac_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001637 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001638 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001639 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001640 done | sort
1641 echo
1642 fi
1643
Martin v. Löwis11437992002-04-12 09:54:03 +00001644 if test -s confdefs.h; then
1645 cat <<\_ASBOX
1646## ----------- ##
1647## confdefs.h. ##
1648## ----------- ##
1649_ASBOX
1650 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001651 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001652 echo
1653 fi
1654 test "$ac_signal" != 0 &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001655 echo "$as_me: caught signal $ac_signal"
1656 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001657 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001658 rm -f core *.core core.conftest.* &&
1659 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001660 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001661' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001662for ac_signal in 1 2 13 15; do
1663 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1664done
1665ac_signal=0
1666
1667# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001668rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001669
1670# Predefined preprocessor variables.
1671
1672cat >>confdefs.h <<_ACEOF
1673#define PACKAGE_NAME "$PACKAGE_NAME"
1674_ACEOF
1675
1676
1677cat >>confdefs.h <<_ACEOF
1678#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1679_ACEOF
1680
1681
1682cat >>confdefs.h <<_ACEOF
1683#define PACKAGE_VERSION "$PACKAGE_VERSION"
1684_ACEOF
1685
1686
1687cat >>confdefs.h <<_ACEOF
1688#define PACKAGE_STRING "$PACKAGE_STRING"
1689_ACEOF
1690
1691
1692cat >>confdefs.h <<_ACEOF
1693#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1694_ACEOF
1695
1696
1697# Let the site file select an alternate cache file if it wants to.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001698# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001699if test -n "$CONFIG_SITE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001700 set x "$CONFIG_SITE"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001701elif test "x$prefix" != xNONE; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001702 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001703else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001704 set x "$ac_default_prefix/share/config.site" \
1705 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001706fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001707shift
1708for ac_site_file
Martin v. Löwiseba40652007-08-30 20:10:57 +00001709do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001710 if test -r "$ac_site_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001711 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1712echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001713 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001714 . "$ac_site_file"
1715 fi
1716done
1717
1718if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001719 # Some versions of bash will fail to source /dev/null (special
1720 # files actually), so we avoid doing that.
1721 if test -f "$cache_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001722 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1723echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001724 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001725 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1726 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001727 esac
1728 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001729else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001730 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1731echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001732 >$cache_file
1733fi
1734
1735# Check that the precious variables saved in the cache have kept the same
1736# value.
1737ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001738for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001739 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1740 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001741 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1742 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001743 case $ac_old_set,$ac_new_set in
1744 set,)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001745 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1746echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001747 ac_cache_corrupted=: ;;
1748 ,set)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001749 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1750echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001751 ac_cache_corrupted=: ;;
1752 ,);;
1753 *)
1754 if test "x$ac_old_val" != "x$ac_new_val"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001755 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1756echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1757 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1758echo "$as_me: former value: $ac_old_val" >&2;}
1759 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1760echo "$as_me: current value: $ac_new_val" >&2;}
1761 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001762 fi;;
1763 esac
1764 # Pass precious variables to config.status.
1765 if test "$ac_new_set" = set; then
1766 case $ac_new_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001767 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001768 *) ac_arg=$ac_var=$ac_new_val ;;
1769 esac
1770 case " $ac_configure_args " in
1771 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1772 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1773 esac
1774 fi
1775done
1776if $ac_cache_corrupted; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001777 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1778echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1779 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1780echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001781 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001782fi
1783
Martin v. Löwiseba40652007-08-30 20:10:57 +00001784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
Guido van Rossum7f43da71994-08-01 12:15:30 +00001808ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001809ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001810ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1811ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1812ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001813
Guido van Rossum627b2d71993-12-24 10:39:16 +00001814
Michael W. Hudson54241132001-12-07 15:38:26 +00001815
Martin v. Löwiseba40652007-08-30 20:10:57 +00001816ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001817
1818
Martin v. Löwis11437992002-04-12 09:54:03 +00001819
Georg Brandlbcd64a32009-03-31 21:45:18 +00001820if test "$prefix" != "/"; then
1821 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1822fi
1823
1824
Martin v. Löwis11437992002-04-12 09:54:03 +00001825
1826
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001827
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001828
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001829# We don't use PACKAGE_ variables, and they cause conflicts
1830# with other autoconf-based packages that include Python.h
1831grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1832rm confdefs.h
1833mv confdefs.h.new confdefs.h
1834
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001835
Martin v. Löwis174440b2008-10-03 08:59:41 +00001836VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001837
Martin v. Löwis1142de32002-03-29 16:28:31 +00001838
1839SOVERSION=1.0
1840
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001841# The later defininition of _XOPEN_SOURCE disables certain features
1842# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1843
1844cat >>confdefs.h <<\_ACEOF
1845#define _GNU_SOURCE 1
1846_ACEOF
1847
1848
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001849# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1850# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1851# them.
1852
1853cat >>confdefs.h <<\_ACEOF
1854#define _NETBSD_SOURCE 1
1855_ACEOF
1856
1857
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001858# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1859# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1860# them.
1861
1862cat >>confdefs.h <<\_ACEOF
1863#define __BSD_VISIBLE 1
1864_ACEOF
1865
1866
Martin v. Löwisd6320502004-08-12 13:45:08 +00001867# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1868# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1869
1870cat >>confdefs.h <<\_ACEOF
1871#define _BSD_TYPES 1
1872_ACEOF
1873
1874
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001875# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1876# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1877# them.
1878
1879cat >>confdefs.h <<\_ACEOF
1880#define _DARWIN_C_SOURCE 1
1881_ACEOF
1882
1883
1884
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001885define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001886
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001887# Arguments passed to configure.
1888
1889CONFIG_ARGS="$ac_configure_args"
1890
Martin v. Löwiseba40652007-08-30 20:10:57 +00001891# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001892if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001893 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001894 case $enableval in
1895 yes)
1896 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1897 ;;
1898 esac
1899 case $enableval in
1900 no)
1901 UNIVERSALSDK=
1902 enable_universalsdk=
1903 ;;
1904 *)
1905 UNIVERSALSDK=$enableval
1906 ;;
1907 esac
1908
1909else
1910
1911 UNIVERSALSDK=
1912 enable_universalsdk=
1913
Martin v. Löwiseba40652007-08-30 20:10:57 +00001914fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001915
1916
Martin v. Löwiseba40652007-08-30 20:10:57 +00001917
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00001918
1919
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001920UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00001921
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001922{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1923echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001924
1925# Check whether --with-universal-archs was given.
1926if test "${with_universal_archs+set}" = set; then
1927 withval=$with_universal_archs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001928 { echo "$as_me:$LINENO: result: $withval" >&5
1929echo "${ECHO_T}$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001930 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00001931 if test "${enable_universalsdk}" ; then
1932 :
1933 else
1934 { { echo "$as_me:$LINENO: error: --with-universal-archs without --enable-universalsdk. See Mac/README" >&5
1935echo "$as_me: error: --with-universal-archs without --enable-universalsdk. See Mac/README" >&2;}
1936 { (exit 1); exit 1; }; }
1937 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001938
1939else
1940
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001941 { echo "$as_me:$LINENO: result: 32-bit" >&5
1942echo "${ECHO_T}32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001943
1944fi
1945
1946
1947
1948
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001949
1950# Check whether --with-framework-name was given.
1951if test "${with_framework_name+set}" = set; then
1952 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00001953 if test "${enable_framework}"; then
1954 :
1955 else
1956 { { echo "$as_me:$LINENO: error: --with-framework-name without --enable-framework. See Mac/README" >&5
1957echo "$as_me: error: --with-framework-name without --enable-framework. See Mac/README" >&2;}
1958 { (exit 1); exit 1; }; }
1959 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001960 PYTHONFRAMEWORK=${withval}
1961 PYTHONFRAMEWORKDIR=${withval}.framework
1962 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1963
1964else
1965
1966 PYTHONFRAMEWORK=Python
1967 PYTHONFRAMEWORKDIR=Python.framework
1968 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1969
1970fi
1971
Martin v. Löwiseba40652007-08-30 20:10:57 +00001972# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001973if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001974 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001975 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001976 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001977 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001978 esac
1979 case $enableval in
1980 no)
1981 PYTHONFRAMEWORK=
1982 PYTHONFRAMEWORKDIR=no-framework
1983 PYTHONFRAMEWORKPREFIX=
1984 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001985 FRAMEWORKINSTALLFIRST=
1986 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001987 FRAMEWORKALTINSTALLFIRST=
1988 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001989 if test "x${prefix}" = "xNONE"; then
1990 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1991 else
1992 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1993 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001994 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001995 ;;
1996 *)
1997 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001998 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001999 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002000 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002001 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2002 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002003
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002004 if test "x${prefix}" = "xNONE" ; then
2005 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2006 else
2007 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2008 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002009 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00002010
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002011 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00002012 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00002013 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002014
Martin v. Löwiseba40652007-08-30 20:10:57 +00002015 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002016
Martin v. Löwiseba40652007-08-30 20:10:57 +00002017 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002018
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002019 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2020
2021 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2022
Jack Jansene578a632001-08-15 01:27:14 +00002023 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002024
Guido van Rossum563e7081996-09-10 18:20:48 +00002025else
Martin v. Löwis11437992002-04-12 09:54:03 +00002026
Jack Jansene578a632001-08-15 01:27:14 +00002027 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002028 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002029 PYTHONFRAMEWORKPREFIX=
2030 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002031 FRAMEWORKINSTALLFIRST=
2032 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002033 FRAMEWORKALTINSTALLFIRST=
2034 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002035 if test "x${prefix}" = "xNONE" ; then
2036 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2037 else
2038 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2039 fi
Jack Jansene578a632001-08-15 01:27:14 +00002040 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002041
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002042
Martin v. Löwiseba40652007-08-30 20:10:57 +00002043fi
2044
Michael W. Hudson54241132001-12-07 15:38:26 +00002045
2046
2047
2048
Jack Jansene578a632001-08-15 01:27:14 +00002049
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002050
2051
Ronald Oussoren5b787322006-06-06 19:50:24 +00002052
2053
2054
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002055
Jack Jansene578a632001-08-15 01:27:14 +00002056##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002057## AC_HELP_STRING(--with-dyld,
2058## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002059##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002060# Set name for machine-dependent library files
2061
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002062{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2063echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002064if test -z "$MACHDEP"
2065then
Guido van Rossum563e7081996-09-10 18:20:48 +00002066 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00002067 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002068 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002069 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002070 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002071 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002072 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002073 ac_md_system=`echo $ac_sys_system |
2074 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2075 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002076 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002077 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002078
Guido van Rossum07397971997-04-29 21:49:50 +00002079 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002080 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002081 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002082 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002083 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002084 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002085 esac
2086fi
Guido van Rossum91922671997-10-09 20:24:13 +00002087
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002088# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2089# disable features if it is defined, without any means to access these
2090# features as extensions. For these systems, we skip the definition of
2091# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2092# some feature, make sure there is no alternative way to access this
2093# feature. Also, when using wildcards, make sure you have verified the
2094# need for not defining _XOPEN_SOURCE on all systems matching the
2095# wildcard, and that the wildcard does not include future systems
2096# (which may remove their limitations).
2097case $ac_sys_system/$ac_sys_release in
2098 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2099 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002100 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Gregory P. Smithcc023f12008-09-07 05:15:58 +00002101 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002102 define_xopen_source=no
2103 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2104 # also defined. This can be overridden by defining _BSD_SOURCE
2105 # As this has a different meaning on Linux, only define it on OpenBSD
2106
2107cat >>confdefs.h <<\_ACEOF
2108#define _BSD_SOURCE 1
2109_ACEOF
2110
2111 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002112 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2113 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2114 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00002115 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002116 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002117 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2118 # of union __?sigval. Reported by Stuart Bishop.
2119 SunOS/5.6)
2120 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002121 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2122 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002123 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002124 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002125 define_xopen_source=no;;
2126 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002127 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002128 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002129 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00002130 # On FreeBSD 4, the math functions C89 does not cover are never defined
2131 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2132 FreeBSD/4.*)
2133 define_xopen_source=no;;
2134 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2135 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2136 # identifies itself as Darwin/7.*
2137 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2138 # disables platform specific features beyond repair.
2139 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2140 # has no effect, don't bother defining them
2141 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002142 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002143 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2144 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2145 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002146 AIX/4)
2147 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002148 AIX/5)
2149 if test `uname -r` -eq 1; then
2150 define_xopen_source=no
2151 fi
2152 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002153 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2154 # defining NI_NUMERICHOST.
2155 QNX/6.3.2)
2156 define_xopen_source=no
2157 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002158
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002159esac
2160
2161if test $define_xopen_source = yes
2162then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002163 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2164 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002165 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2166 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002167 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002168 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002169
2170cat >>confdefs.h <<\_ACEOF
2171#define _XOPEN_SOURCE 500
2172_ACEOF
2173
2174 ;;
2175 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002176
2177cat >>confdefs.h <<\_ACEOF
2178#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002179_ACEOF
2180
Skip Montanarof0d5f792004-08-15 14:08:23 +00002181 ;;
2182 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002183
2184 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2185 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2186 # several APIs are not declared. Since this is also needed in some
2187 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002188 # except for Solaris 10, where it must not be defined,
2189 # as it implies XPG4.2
2190 case $ac_sys_system/$ac_sys_release in
2191 SunOS/5.10)
2192 ;;
2193 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002194
2195cat >>confdefs.h <<\_ACEOF
2196#define _XOPEN_SOURCE_EXTENDED 1
2197_ACEOF
2198
Martin v. Löwis7dece662005-11-26 11:38:24 +00002199 ;;
2200 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002201
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002202
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002203cat >>confdefs.h <<\_ACEOF
2204#define _POSIX_C_SOURCE 200112L
2205_ACEOF
2206
2207
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002208fi
2209
Guido van Rossum91922671997-10-09 20:24:13 +00002210#
2211# SGI compilers allow the specification of the both the ABI and the
2212# ISA on the command line. Depending on the values of these switches,
2213# different and often incompatable code will be generated.
2214#
2215# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2216# thus supply support for various ABI/ISA combinations. The MACHDEP
2217# variable is also adjusted.
2218#
2219
2220if test ! -z "$SGI_ABI"
2221then
2222 CC="cc $SGI_ABI"
2223 LDFLAGS="$SGI_ABI $LDFLAGS"
2224 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2225fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002226{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2227echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002228
Jack Jansen83f898c2002-12-30 22:23:40 +00002229# And add extra plat-mac for darwin
2230
Jack Jansen7b59b422003-03-17 15:44:10 +00002231
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002232{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2233echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002234if test -z "$EXTRAPLATDIR"
2235then
2236 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002237 darwin)
2238 EXTRAPLATDIR="\$(PLATMACDIRS)"
2239 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2240 ;;
2241 *)
2242 EXTRAPLATDIR=""
2243 EXTRAMACHDEPPATH=""
2244 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002245 esac
2246fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002247{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2248echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002249
Jack Jansen6b08a402004-06-03 12:41:45 +00002250# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2251# it may influence the way we can build extensions, so distutils
2252# needs to check it
2253
Ronald Oussoren988117f2006-04-29 11:31:35 +00002254
Jack Jansen6b08a402004-06-03 12:41:45 +00002255CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002256EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002257
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002258{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2259echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002260ac_sys_machine=`uname -m`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002261{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2262echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002263
Guido van Rossum627b2d71993-12-24 10:39:16 +00002264# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002265
2266# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2267# for debug/optimization stuff. BASECFLAGS is for flags that are required
2268# just to get things to compile and link. Users are free to override OPT
2269# when running configure or make. The build should not break if they do.
2270# BASECFLAGS should generally not be messed with, however.
2271
2272# XXX shouldn't some/most/all of this code be merged with the stuff later
2273# on that fiddles with OPT and BASECFLAGS?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002274{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2275echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002276
Martin v. Löwiseba40652007-08-30 20:10:57 +00002277# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002278if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002279 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002280 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00002281 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002282 without_gcc=yes;;
2283 yes) CC=gcc
2284 without_gcc=no;;
2285 *) CC=$withval
2286 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002287 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002288else
Martin v. Löwis11437992002-04-12 09:54:03 +00002289
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002290 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002291 AIX*) CC=cc_r
2292 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002293 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002294 case $BE_HOST_CPU in
2295 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002296 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002297 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002298 BASECFLAGS="$BASECFLAGS -export pragma"
2299 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002300 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002301 ;;
2302 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002303 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002304 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002305 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002306 ;;
2307 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002308 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2309echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002310 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002311 ;;
2312 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002313 AR="\$(srcdir)/Modules/ar_beos"
2314 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002315 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002316 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002317 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002318fi
2319
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002320{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2321echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002322
Guido van Rossum8b131c51995-03-09 14:10:13 +00002323# If the user switches compilers, we can't believe the cache
2324if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2325then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002326 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002327(it is also a good idea to do 'make clean' before compiling)" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002328echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002329(it is also a good idea to do 'make clean' before compiling)" >&2;}
2330 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002331fi
2332
Martin v. Löwis11437992002-04-12 09:54:03 +00002333ac_ext=c
2334ac_cpp='$CPP $CPPFLAGS'
2335ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2336ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2337ac_compiler_gnu=$ac_cv_c_compiler_gnu
2338if test -n "$ac_tool_prefix"; then
2339 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2340set dummy ${ac_tool_prefix}gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002341{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2342echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002343if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002344 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002345else
2346 if test -n "$CC"; then
2347 ac_cv_prog_CC="$CC" # Let the user override the test.
2348else
Martin v. Löwis11437992002-04-12 09:54:03 +00002349as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2350for as_dir in $PATH
2351do
2352 IFS=$as_save_IFS
2353 test -z "$as_dir" && as_dir=.
2354 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002355 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002356 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002357 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002358 break 2
2359 fi
2360done
2361done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002362IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002363
Jack Jansendd19cf82001-12-06 22:36:17 +00002364fi
2365fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002366CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002367if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002368 { echo "$as_me:$LINENO: result: $CC" >&5
2369echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002370else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002371 { echo "$as_me:$LINENO: result: no" >&5
2372echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002373fi
2374
Martin v. Löwiseba40652007-08-30 20:10:57 +00002375
Martin v. Löwis11437992002-04-12 09:54:03 +00002376fi
2377if test -z "$ac_cv_prog_CC"; then
2378 ac_ct_CC=$CC
2379 # Extract the first word of "gcc", so it can be a program name with args.
2380set dummy gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002381{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2382echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002383if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002384 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002385else
2386 if test -n "$ac_ct_CC"; then
2387 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2388else
2389as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2390for as_dir in $PATH
2391do
2392 IFS=$as_save_IFS
2393 test -z "$as_dir" && as_dir=.
2394 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002395 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002396 ac_cv_prog_ac_ct_CC="gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002397 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002398 break 2
2399 fi
2400done
2401done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002402IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002403
2404fi
2405fi
2406ac_ct_CC=$ac_cv_prog_ac_ct_CC
2407if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002408 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2409echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002410else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002411 { echo "$as_me:$LINENO: result: no" >&5
2412echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002413fi
2414
Martin v. Löwiseba40652007-08-30 20:10:57 +00002415 if test "x$ac_ct_CC" = x; then
2416 CC=""
2417 else
2418 case $cross_compiling:$ac_tool_warned in
2419yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002420{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2421whose name does not start with the host triplet. If you think this
2422configuration is useful to you, please write to autoconf@gnu.org." >&5
2423echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2424whose name does not start with the host triplet. If you think this
2425configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002426ac_tool_warned=yes ;;
2427esac
2428 CC=$ac_ct_CC
2429 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002430else
2431 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002432fi
2433
Jack Jansendd19cf82001-12-06 22:36:17 +00002434if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002435 if test -n "$ac_tool_prefix"; then
2436 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00002437set dummy ${ac_tool_prefix}cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002438{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2439echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002440if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002441 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002442else
2443 if test -n "$CC"; then
2444 ac_cv_prog_CC="$CC" # Let the user override the test.
2445else
Martin v. Löwis11437992002-04-12 09:54:03 +00002446as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2447for as_dir in $PATH
2448do
2449 IFS=$as_save_IFS
2450 test -z "$as_dir" && as_dir=.
2451 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002452 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002453 ac_cv_prog_CC="${ac_tool_prefix}cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002454 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002455 break 2
2456 fi
2457done
2458done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002459IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002460
2461fi
2462fi
2463CC=$ac_cv_prog_CC
2464if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002465 { echo "$as_me:$LINENO: result: $CC" >&5
2466echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002467else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002468 { echo "$as_me:$LINENO: result: no" >&5
2469echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002470fi
2471
Martin v. Löwiseba40652007-08-30 20:10:57 +00002472
Martin v. Löwis11437992002-04-12 09:54:03 +00002473 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002474fi
2475if test -z "$CC"; then
2476 # Extract the first word of "cc", so it can be a program name with args.
2477set dummy cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002478{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2479echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002480if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002481 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002482else
2483 if test -n "$CC"; then
2484 ac_cv_prog_CC="$CC" # Let the user override the test.
2485else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002486 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002487as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2488for as_dir in $PATH
2489do
2490 IFS=$as_save_IFS
2491 test -z "$as_dir" && as_dir=.
2492 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002493 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002494 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2495 ac_prog_rejected=yes
2496 continue
2497 fi
2498 ac_cv_prog_CC="cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002499 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002500 break 2
2501 fi
2502done
2503done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002504IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002505
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002506if test $ac_prog_rejected = yes; then
2507 # We found a bogon in the path, so make sure we never use it.
2508 set dummy $ac_cv_prog_CC
2509 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002510 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002511 # We chose a different compiler from the bogus one.
2512 # However, it has the same basename, so the bogon will be chosen
2513 # first if we set CC to just the basename; use the full file name.
2514 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002515 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002516 fi
2517fi
2518fi
2519fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002520CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002521if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002522 { echo "$as_me:$LINENO: result: $CC" >&5
2523echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002524else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002525 { echo "$as_me:$LINENO: result: no" >&5
2526echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002527fi
2528
Martin v. Löwiseba40652007-08-30 20:10:57 +00002529
Martin v. Löwis11437992002-04-12 09:54:03 +00002530fi
2531if test -z "$CC"; then
2532 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002533 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002534 do
2535 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2536set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002537{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2538echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002539if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002540 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002541else
2542 if test -n "$CC"; then
2543 ac_cv_prog_CC="$CC" # Let the user override the test.
2544else
Martin v. Löwis11437992002-04-12 09:54:03 +00002545as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2546for as_dir in $PATH
2547do
2548 IFS=$as_save_IFS
2549 test -z "$as_dir" && as_dir=.
2550 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002551 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002552 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002553 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002554 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002555 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002556done
2557done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002558IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002559
2560fi
2561fi
2562CC=$ac_cv_prog_CC
2563if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002564 { echo "$as_me:$LINENO: result: $CC" >&5
2565echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002566else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002567 { echo "$as_me:$LINENO: result: no" >&5
2568echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002569fi
2570
Martin v. Löwiseba40652007-08-30 20:10:57 +00002571
Martin v. Löwis11437992002-04-12 09:54:03 +00002572 test -n "$CC" && break
2573 done
2574fi
2575if test -z "$CC"; then
2576 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002577 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002578do
2579 # Extract the first word of "$ac_prog", so it can be a program name with args.
2580set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002581{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2582echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002583if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002584 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002585else
2586 if test -n "$ac_ct_CC"; then
2587 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2588else
2589as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2590for as_dir in $PATH
2591do
2592 IFS=$as_save_IFS
2593 test -z "$as_dir" && as_dir=.
2594 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002595 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002596 ac_cv_prog_ac_ct_CC="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002597 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 break 2
2599 fi
2600done
2601done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002602IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002603
Martin v. Löwis11437992002-04-12 09:54:03 +00002604fi
2605fi
2606ac_ct_CC=$ac_cv_prog_ac_ct_CC
2607if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002608 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2609echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002610else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002611 { echo "$as_me:$LINENO: result: no" >&5
2612echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002613fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002614
Martin v. Löwiseba40652007-08-30 20:10:57 +00002615
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 test -n "$ac_ct_CC" && break
2617done
Michael W. Hudson54241132001-12-07 15:38:26 +00002618
Martin v. Löwiseba40652007-08-30 20:10:57 +00002619 if test "x$ac_ct_CC" = x; then
2620 CC=""
2621 else
2622 case $cross_compiling:$ac_tool_warned in
2623yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002624{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2625whose name does not start with the host triplet. If you think this
2626configuration is useful to you, please write to autoconf@gnu.org." >&5
2627echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2628whose name does not start with the host triplet. If you think this
2629configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002630ac_tool_warned=yes ;;
2631esac
2632 CC=$ac_ct_CC
2633 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002634fi
2635
2636fi
2637
2638
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002639test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002640See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002641echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002642See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002643 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002644
2645# Provide some information about the compiler.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002646echo "$as_me:$LINENO: checking for C compiler version" >&5
2647ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002648{ (ac_try="$ac_compiler --version >&5"
2649case "(($ac_try" in
2650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2651 *) ac_try_echo=$ac_try;;
2652esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002654 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002655 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002657 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002658{ (ac_try="$ac_compiler -v >&5"
2659case "(($ac_try" in
2660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2661 *) ac_try_echo=$ac_try;;
2662esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002664 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002667 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002668{ (ac_try="$ac_compiler -V >&5"
2669case "(($ac_try" in
2670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2671 *) ac_try_echo=$ac_try;;
2672esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002674 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002675 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002677 (exit $ac_status); }
2678
2679cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002680/* confdefs.h. */
2681_ACEOF
2682cat confdefs.h >>conftest.$ac_ext
2683cat >>conftest.$ac_ext <<_ACEOF
2684/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002685
Martin v. Löwis11437992002-04-12 09:54:03 +00002686int
2687main ()
2688{
2689
2690 ;
2691 return 0;
2692}
2693_ACEOF
2694ac_clean_files_save=$ac_clean_files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002695ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002696# Try to create an executable without -o first, disregard a.out.
2697# It will help us diagnose broken compilers, and finding out an intuition
2698# of exeext.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002699{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2700echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2701ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2702#
2703# List of possible output files, starting from the most likely.
2704# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2705# only as a last resort. b.out is created by i960 compilers.
2706ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2707#
2708# The IRIX 6 linker writes into existing files which may not be
2709# executable, retaining their permissions. Remove them first so a
2710# subsequent execution test works.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002711ac_rmfiles=
2712for ac_file in $ac_files
2713do
2714 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002715 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002716 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2717 esac
2718done
2719rm -f $ac_rmfiles
2720
2721if { (ac_try="$ac_link_default"
2722case "(($ac_try" in
2723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2724 *) ac_try_echo=$ac_try;;
2725esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002727 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002728 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002730 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002731 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2732# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2733# in a Makefile. We should not override ac_cv_exeext if it was cached,
2734# so that the user can short-circuit this test for compilers unknown to
2735# Autoconf.
2736for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002737do
2738 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002739 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002740 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002741 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002742 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002743 # We found the default executable, but exeext='' is most
2744 # certainly right.
2745 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002746 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002747 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2748 then :; else
2749 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2750 fi
2751 # We set ac_cv_exeext here because the later test for it is not
2752 # safe: cross compilers may not add the suffix if given an `-o'
2753 # argument, so we may need to know it at that point already.
2754 # Even if this section looks crufty: it has the advantage of
2755 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002756 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002757 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002758 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002759 esac
2760done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002761test "$ac_cv_exeext" = no && ac_cv_exeext=
2762
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002763else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002764 ac_file=''
2765fi
2766
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002767{ echo "$as_me:$LINENO: result: $ac_file" >&5
2768echo "${ECHO_T}$ac_file" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002769if test -z "$ac_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002770 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002771sed 's/^/| /' conftest.$ac_ext >&5
2772
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002773{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002774See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002775echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002776See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002777 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002778fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002779
Martin v. Löwis11437992002-04-12 09:54:03 +00002780ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002781
Martin v. Löwiseba40652007-08-30 20:10:57 +00002782# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002783# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002784{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2785echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002786# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2787# If not cross compiling, check that we can run a simple program.
2788if test "$cross_compiling" != yes; then
2789 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002790 { (case "(($ac_try" in
2791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2792 *) ac_try_echo=$ac_try;;
2793esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002795 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002796 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002798 (exit $ac_status); }; }; then
2799 cross_compiling=no
2800 else
2801 if test "$cross_compiling" = maybe; then
2802 cross_compiling=yes
2803 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002804 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002805If you meant to cross compile, use \`--host'.
2806See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002807echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002808If you meant to cross compile, use \`--host'.
2809See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002810 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002811 fi
2812 fi
2813fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002814{ echo "$as_me:$LINENO: result: yes" >&5
2815echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002816
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002817rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002818ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002819# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002820# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002821{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2822echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2823{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2824echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002825
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002826{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2827echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002828if { (ac_try="$ac_link"
2829case "(($ac_try" in
2830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2831 *) ac_try_echo=$ac_try;;
2832esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002834 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002835 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002837 (exit $ac_status); }; then
2838 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2839# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2840# work properly (i.e., refer to `conftest.exe'), while it won't with
2841# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002842for ac_file in conftest.exe conftest conftest.*; do
2843 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002844 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002845 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002846 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002847 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002848 * ) break;;
2849 esac
2850done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002851else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002852 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002853See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002854echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002855See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002856 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002857fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002858
Martin v. Löwis11437992002-04-12 09:54:03 +00002859rm -f conftest$ac_cv_exeext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002860{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2861echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002862
2863rm -f conftest.$ac_ext
2864EXEEXT=$ac_cv_exeext
2865ac_exeext=$EXEEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002866{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2867echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002868if test "${ac_cv_objext+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002869 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002870else
Martin v. Löwis11437992002-04-12 09:54:03 +00002871 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002872/* confdefs.h. */
2873_ACEOF
2874cat confdefs.h >>conftest.$ac_ext
2875cat >>conftest.$ac_ext <<_ACEOF
2876/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002877
Martin v. Löwis11437992002-04-12 09:54:03 +00002878int
2879main ()
2880{
2881
2882 ;
2883 return 0;
2884}
2885_ACEOF
2886rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002887if { (ac_try="$ac_compile"
2888case "(($ac_try" in
2889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2890 *) ac_try_echo=$ac_try;;
2891esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002893 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002894 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002896 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002897 for ac_file in conftest.o conftest.obj conftest.*; do
2898 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002899 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002900 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002901 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2902 break;;
2903 esac
2904done
2905else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002906 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002907sed 's/^/| /' conftest.$ac_ext >&5
2908
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002909{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002910See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002911echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002912See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002913 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002914fi
2915
2916rm -f conftest.$ac_cv_objext conftest.$ac_ext
2917fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002918{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2919echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002920OBJEXT=$ac_cv_objext
2921ac_objext=$OBJEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002922{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2923echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002924if test "${ac_cv_c_compiler_gnu+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002925 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002926else
2927 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002928/* confdefs.h. */
2929_ACEOF
2930cat confdefs.h >>conftest.$ac_ext
2931cat >>conftest.$ac_ext <<_ACEOF
2932/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002933
Martin v. Löwis11437992002-04-12 09:54:03 +00002934int
2935main ()
2936{
2937#ifndef __GNUC__
2938 choke me
2939#endif
2940
2941 ;
2942 return 0;
2943}
2944_ACEOF
2945rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002946if { (ac_try="$ac_compile"
2947case "(($ac_try" in
2948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2949 *) ac_try_echo=$ac_try;;
2950esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002952 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002953 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002954 grep -v '^ *+' conftest.er1 >conftest.err
2955 rm -f conftest.er1
2956 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002958 (exit $ac_status); } && {
2959 test -z "$ac_c_werror_flag" ||
2960 test ! -s conftest.err
2961 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002962 ac_compiler_gnu=yes
2963else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002964 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002965sed 's/^/| /' conftest.$ac_ext >&5
2966
Martin v. Löwiseba40652007-08-30 20:10:57 +00002967 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002968fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002969
2970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002971ac_cv_c_compiler_gnu=$ac_compiler_gnu
2972
2973fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002974{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2975echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2976GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002977ac_test_CFLAGS=${CFLAGS+set}
2978ac_save_CFLAGS=$CFLAGS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002979{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2980echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002981if test "${ac_cv_prog_cc_g+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002982 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002983else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002984 ac_save_c_werror_flag=$ac_c_werror_flag
2985 ac_c_werror_flag=yes
2986 ac_cv_prog_cc_g=no
2987 CFLAGS="-g"
2988 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002989/* confdefs.h. */
2990_ACEOF
2991cat confdefs.h >>conftest.$ac_ext
2992cat >>conftest.$ac_ext <<_ACEOF
2993/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002994
Martin v. Löwis11437992002-04-12 09:54:03 +00002995int
2996main ()
2997{
2998
2999 ;
3000 return 0;
3001}
3002_ACEOF
3003rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003004if { (ac_try="$ac_compile"
3005case "(($ac_try" in
3006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3007 *) ac_try_echo=$ac_try;;
3008esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003010 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003011 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003012 grep -v '^ *+' conftest.er1 >conftest.err
3013 rm -f conftest.er1
3014 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003016 (exit $ac_status); } && {
3017 test -z "$ac_c_werror_flag" ||
3018 test ! -s conftest.err
3019 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003020 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003021else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003022 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003023sed 's/^/| /' conftest.$ac_ext >&5
3024
Martin v. Löwiseba40652007-08-30 20:10:57 +00003025 CFLAGS=""
3026 cat >conftest.$ac_ext <<_ACEOF
3027/* confdefs.h. */
3028_ACEOF
3029cat confdefs.h >>conftest.$ac_ext
3030cat >>conftest.$ac_ext <<_ACEOF
3031/* end confdefs.h. */
3032
3033int
3034main ()
3035{
3036
3037 ;
3038 return 0;
3039}
3040_ACEOF
3041rm -f conftest.$ac_objext
3042if { (ac_try="$ac_compile"
3043case "(($ac_try" in
3044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3045 *) ac_try_echo=$ac_try;;
3046esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003048 (eval "$ac_compile") 2>conftest.er1
3049 ac_status=$?
3050 grep -v '^ *+' conftest.er1 >conftest.err
3051 rm -f conftest.er1
3052 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003054 (exit $ac_status); } && {
3055 test -z "$ac_c_werror_flag" ||
3056 test ! -s conftest.err
3057 } && test -s conftest.$ac_objext; then
3058 :
3059else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003060 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003061sed 's/^/| /' conftest.$ac_ext >&5
3062
3063 ac_c_werror_flag=$ac_save_c_werror_flag
3064 CFLAGS="-g"
3065 cat >conftest.$ac_ext <<_ACEOF
3066/* confdefs.h. */
3067_ACEOF
3068cat confdefs.h >>conftest.$ac_ext
3069cat >>conftest.$ac_ext <<_ACEOF
3070/* end confdefs.h. */
3071
3072int
3073main ()
3074{
3075
3076 ;
3077 return 0;
3078}
3079_ACEOF
3080rm -f conftest.$ac_objext
3081if { (ac_try="$ac_compile"
3082case "(($ac_try" in
3083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3084 *) ac_try_echo=$ac_try;;
3085esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003087 (eval "$ac_compile") 2>conftest.er1
3088 ac_status=$?
3089 grep -v '^ *+' conftest.er1 >conftest.err
3090 rm -f conftest.er1
3091 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003093 (exit $ac_status); } && {
3094 test -z "$ac_c_werror_flag" ||
3095 test ! -s conftest.err
3096 } && test -s conftest.$ac_objext; then
3097 ac_cv_prog_cc_g=yes
3098else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003099 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003100sed 's/^/| /' conftest.$ac_ext >&5
3101
3102
Guido van Rossum627b2d71993-12-24 10:39:16 +00003103fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003104
3105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003106fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003107
3108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3109fi
3110
3111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3112 ac_c_werror_flag=$ac_save_c_werror_flag
3113fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003114{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3115echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003116if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003117 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003118elif test $ac_cv_prog_cc_g = yes; then
3119 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003120 CFLAGS="-g -O2"
3121 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003122 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003123 fi
3124else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003125 if test "$GCC" = yes; then
3126 CFLAGS="-O2"
3127 else
3128 CFLAGS=
3129 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003130fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003131{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3132echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003133if test "${ac_cv_prog_cc_c89+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003134 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003135else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003136 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003137ac_save_CC=$CC
3138cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003139/* confdefs.h. */
3140_ACEOF
3141cat confdefs.h >>conftest.$ac_ext
3142cat >>conftest.$ac_ext <<_ACEOF
3143/* end confdefs.h. */
3144#include <stdarg.h>
3145#include <stdio.h>
3146#include <sys/types.h>
3147#include <sys/stat.h>
3148/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3149struct buf { int x; };
3150FILE * (*rcsopen) (struct buf *, struct stat *, int);
3151static char *e (p, i)
3152 char **p;
3153 int i;
3154{
3155 return p[i];
3156}
3157static char *f (char * (*g) (char **, int), char **p, ...)
3158{
3159 char *s;
3160 va_list v;
3161 va_start (v,p);
3162 s = g (p, va_arg (v,int));
3163 va_end (v);
3164 return s;
3165}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003166
3167/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3168 function prototypes and stuff, but not '\xHH' hex character constants.
3169 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003170 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003171 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3172 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003173 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003174int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3175
Martin v. Löwiseba40652007-08-30 20:10:57 +00003176/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3177 inside strings and character constants. */
3178#define FOO(x) 'x'
3179int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3180
Skip Montanaro6dead952003-09-25 14:50:04 +00003181int test (int i, double x);
3182struct s1 {int (*f) (int a);};
3183struct s2 {int (*f) (double a);};
3184int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3185int argc;
3186char **argv;
3187int
3188main ()
3189{
3190return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3191 ;
3192 return 0;
3193}
3194_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003195for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3196 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003197do
3198 CC="$ac_save_CC $ac_arg"
3199 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003200if { (ac_try="$ac_compile"
3201case "(($ac_try" in
3202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3203 *) ac_try_echo=$ac_try;;
3204esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003206 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003207 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003208 grep -v '^ *+' conftest.er1 >conftest.err
3209 rm -f conftest.er1
3210 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003212 (exit $ac_status); } && {
3213 test -z "$ac_c_werror_flag" ||
3214 test ! -s conftest.err
3215 } && test -s conftest.$ac_objext; then
3216 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003217else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003219sed 's/^/| /' conftest.$ac_ext >&5
3220
Martin v. Löwiseba40652007-08-30 20:10:57 +00003221
Skip Montanaro6dead952003-09-25 14:50:04 +00003222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003223
3224rm -f core conftest.err conftest.$ac_objext
3225 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003226done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003227rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003228CC=$ac_save_CC
3229
3230fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003231# AC_CACHE_VAL
3232case "x$ac_cv_prog_cc_c89" in
3233 x)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003234 { echo "$as_me:$LINENO: result: none needed" >&5
3235echo "${ECHO_T}none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003236 xno)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003237 { echo "$as_me:$LINENO: result: unsupported" >&5
3238echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003239 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003240 CC="$CC $ac_cv_prog_cc_c89"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003241 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3242echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003243esac
3244
Skip Montanaro6dead952003-09-25 14:50:04 +00003245
Martin v. Löwis11437992002-04-12 09:54:03 +00003246ac_ext=c
3247ac_cpp='$CPP $CPPFLAGS'
3248ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3249ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3250ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003251
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003252
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003253
3254
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003255{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3256echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003257
Martin v. Löwiseba40652007-08-30 20:10:57 +00003258# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003259if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003260 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003261
3262 case $withval in
3263 no) with_cxx_main=no
3264 MAINCC='$(CC)';;
3265 yes) with_cxx_main=yes
3266 MAINCC='$(CXX)';;
3267 *) with_cxx_main=yes
3268 MAINCC=$withval
3269 if test -z "$CXX"
3270 then
3271 CXX=$withval
3272 fi;;
3273 esac
3274else
3275
3276 with_cxx_main=no
3277 MAINCC='$(CC)'
3278
Martin v. Löwiseba40652007-08-30 20:10:57 +00003279fi
3280
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003281{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3282echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003283
3284preset_cxx="$CXX"
3285if test -z "$CXX"
3286then
3287 case "$CC" in
3288 gcc) # Extract the first word of "g++", so it can be a program name with args.
3289set dummy g++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003290{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3291echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003292if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003293 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003294else
3295 case $CXX in
3296 [\\/]* | ?:[\\/]*)
3297 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3298 ;;
3299 *)
3300 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3301for as_dir in notfound
3302do
3303 IFS=$as_save_IFS
3304 test -z "$as_dir" && as_dir=.
3305 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003306 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003307 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003308 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003309 break 2
3310 fi
3311done
3312done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003313IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003314
3315 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3316 ;;
3317esac
3318fi
3319CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003320if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003321 { echo "$as_me:$LINENO: result: $CXX" >&5
3322echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003323else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003324 { echo "$as_me:$LINENO: result: no" >&5
3325echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003326fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003327
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003328 ;;
3329 cc) # Extract the first word of "c++", so it can be a program name with args.
3330set dummy c++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003331{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3332echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003333if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003334 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003335else
3336 case $CXX in
3337 [\\/]* | ?:[\\/]*)
3338 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3339 ;;
3340 *)
3341 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3342for as_dir in notfound
3343do
3344 IFS=$as_save_IFS
3345 test -z "$as_dir" && as_dir=.
3346 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003347 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003348 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003349 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003350 break 2
3351 fi
3352done
3353done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003354IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003355
3356 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3357 ;;
3358esac
3359fi
3360CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003361if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003362 { echo "$as_me:$LINENO: result: $CXX" >&5
3363echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003364else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003365 { echo "$as_me:$LINENO: result: no" >&5
3366echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003367fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003368
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003369 ;;
3370 esac
3371 if test "$CXX" = "notfound"
3372 then
3373 CXX=""
3374 fi
3375fi
3376if test -z "$CXX"
3377then
3378 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3379do
3380 # Extract the first word of "$ac_prog", so it can be a program name with args.
3381set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003382{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3383echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003384if test "${ac_cv_prog_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003385 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003386else
3387 if test -n "$CXX"; then
3388 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3389else
3390as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3391for as_dir in $PATH
3392do
3393 IFS=$as_save_IFS
3394 test -z "$as_dir" && as_dir=.
3395 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003396 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003397 ac_cv_prog_CXX="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003398 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003399 break 2
3400 fi
3401done
3402done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003403IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003404
3405fi
3406fi
3407CXX=$ac_cv_prog_CXX
3408if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003409 { echo "$as_me:$LINENO: result: $CXX" >&5
3410echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003411else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003412 { echo "$as_me:$LINENO: result: no" >&5
3413echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003414fi
3415
Martin v. Löwiseba40652007-08-30 20:10:57 +00003416
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003417 test -n "$CXX" && break
3418done
3419test -n "$CXX" || CXX="notfound"
3420
3421 if test "$CXX" = "notfound"
3422 then
3423 CXX=""
3424 fi
3425fi
3426if test "$preset_cxx" != "$CXX"
3427then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003428 { echo "$as_me:$LINENO: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003429
3430 By default, distutils will build C++ extension modules with \"$CXX\".
3431 If this is not intended, then set CXX on the configure command line.
3432 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003433echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003434
3435 By default, distutils will build C++ extension modules with \"$CXX\".
3436 If this is not intended, then set CXX on the configure command line.
3437 " >&2;}
3438fi
3439
3440
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003441# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003442
3443ac_ext=c
3444ac_cpp='$CPP $CPPFLAGS'
3445ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3446ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3447ac_compiler_gnu=$ac_cv_c_compiler_gnu
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003448{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3449echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003450# On Suns, sometimes $CPP names a directory.
3451if test -n "$CPP" && test -d "$CPP"; then
3452 CPP=
3453fi
3454if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003455 if test "${ac_cv_prog_CPP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003456 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003457else
Martin v. Löwis11437992002-04-12 09:54:03 +00003458 # Double quotes because CPP needs to be expanded
3459 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3460 do
3461 ac_preproc_ok=false
3462for ac_c_preproc_warn_flag in '' yes
3463do
3464 # Use a header file that comes with gcc, so configuring glibc
3465 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003466 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3467 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003468 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003469 # not just through cpp. "Syntax error" is here to catch this case.
3470 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003471/* confdefs.h. */
3472_ACEOF
3473cat confdefs.h >>conftest.$ac_ext
3474cat >>conftest.$ac_ext <<_ACEOF
3475/* end confdefs.h. */
3476#ifdef __STDC__
3477# include <limits.h>
3478#else
3479# include <assert.h>
3480#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003481 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003482_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003483if { (ac_try="$ac_cpp conftest.$ac_ext"
3484case "(($ac_try" in
3485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3486 *) ac_try_echo=$ac_try;;
3487esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003489 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003490 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003491 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003492 rm -f conftest.er1
3493 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003495 (exit $ac_status); } >/dev/null && {
3496 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3497 test ! -s conftest.err
3498 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003499 :
3500else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003501 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003502sed 's/^/| /' conftest.$ac_ext >&5
3503
Martin v. Löwis11437992002-04-12 09:54:03 +00003504 # Broken: fails on valid input.
3505continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003506fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003507
Martin v. Löwis11437992002-04-12 09:54:03 +00003508rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003509
Martin v. Löwiseba40652007-08-30 20:10:57 +00003510 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003511 # can be detected and how.
3512 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003513/* confdefs.h. */
3514_ACEOF
3515cat confdefs.h >>conftest.$ac_ext
3516cat >>conftest.$ac_ext <<_ACEOF
3517/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003518#include <ac_nonexistent.h>
3519_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003520if { (ac_try="$ac_cpp conftest.$ac_ext"
3521case "(($ac_try" in
3522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3523 *) ac_try_echo=$ac_try;;
3524esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003526 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003527 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003528 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003529 rm -f conftest.er1
3530 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003532 (exit $ac_status); } >/dev/null && {
3533 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3534 test ! -s conftest.err
3535 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003536 # Broken: success on invalid input.
3537continue
3538else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003539 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003540sed 's/^/| /' conftest.$ac_ext >&5
3541
Martin v. Löwis11437992002-04-12 09:54:03 +00003542 # Passes both tests.
3543ac_preproc_ok=:
3544break
3545fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003546
Martin v. Löwis11437992002-04-12 09:54:03 +00003547rm -f conftest.err conftest.$ac_ext
3548
3549done
3550# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3551rm -f conftest.err conftest.$ac_ext
3552if $ac_preproc_ok; then
3553 break
3554fi
3555
3556 done
3557 ac_cv_prog_CPP=$CPP
3558
3559fi
3560 CPP=$ac_cv_prog_CPP
3561else
3562 ac_cv_prog_CPP=$CPP
3563fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003564{ echo "$as_me:$LINENO: result: $CPP" >&5
3565echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003566ac_preproc_ok=false
3567for ac_c_preproc_warn_flag in '' yes
3568do
3569 # Use a header file that comes with gcc, so configuring glibc
3570 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003571 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3572 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003573 # On the NeXT, cc -E runs the code through the compiler's parser,
3574 # not just through cpp. "Syntax error" is here to catch this case.
3575 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003576/* confdefs.h. */
3577_ACEOF
3578cat confdefs.h >>conftest.$ac_ext
3579cat >>conftest.$ac_ext <<_ACEOF
3580/* end confdefs.h. */
3581#ifdef __STDC__
3582# include <limits.h>
3583#else
3584# include <assert.h>
3585#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003586 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003587_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003588if { (ac_try="$ac_cpp conftest.$ac_ext"
3589case "(($ac_try" in
3590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3591 *) ac_try_echo=$ac_try;;
3592esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003593eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003594 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003595 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003596 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003597 rm -f conftest.er1
3598 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003600 (exit $ac_status); } >/dev/null && {
3601 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3602 test ! -s conftest.err
3603 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003604 :
3605else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003606 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003607sed 's/^/| /' conftest.$ac_ext >&5
3608
Martin v. Löwis11437992002-04-12 09:54:03 +00003609 # Broken: fails on valid input.
3610continue
3611fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003612
Martin v. Löwis11437992002-04-12 09:54:03 +00003613rm -f conftest.err conftest.$ac_ext
3614
Martin v. Löwiseba40652007-08-30 20:10:57 +00003615 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003616 # can be detected and how.
3617 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003618/* confdefs.h. */
3619_ACEOF
3620cat confdefs.h >>conftest.$ac_ext
3621cat >>conftest.$ac_ext <<_ACEOF
3622/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003623#include <ac_nonexistent.h>
3624_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003625if { (ac_try="$ac_cpp conftest.$ac_ext"
3626case "(($ac_try" in
3627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3628 *) ac_try_echo=$ac_try;;
3629esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003631 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003632 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003633 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003634 rm -f conftest.er1
3635 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003637 (exit $ac_status); } >/dev/null && {
3638 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3639 test ! -s conftest.err
3640 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003641 # Broken: success on invalid input.
3642continue
3643else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003644 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003645sed 's/^/| /' conftest.$ac_ext >&5
3646
Martin v. Löwis11437992002-04-12 09:54:03 +00003647 # Passes both tests.
3648ac_preproc_ok=:
3649break
3650fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003651
Martin v. Löwis11437992002-04-12 09:54:03 +00003652rm -f conftest.err conftest.$ac_ext
3653
3654done
3655# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3656rm -f conftest.err conftest.$ac_ext
3657if $ac_preproc_ok; then
3658 :
3659else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003660 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003661See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003662echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003663See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003664 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003665fi
3666
3667ac_ext=c
3668ac_cpp='$CPP $CPPFLAGS'
3669ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3670ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3671ac_compiler_gnu=$ac_cv_c_compiler_gnu
3672
3673
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003674{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3675echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003676if test "${ac_cv_path_GREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003677 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003678else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003679 # Extract the first word of "grep ggrep" to use in msg output
3680if test -z "$GREP"; then
3681set dummy grep ggrep; ac_prog_name=$2
3682if test "${ac_cv_path_GREP+set}" = set; then
3683 echo $ECHO_N "(cached) $ECHO_C" >&6
3684else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003685 ac_path_GREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003686# Loop through the user's path and test for each of PROGNAME-LIST
3687as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003688for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3689do
3690 IFS=$as_save_IFS
3691 test -z "$as_dir" && as_dir=.
3692 for ac_prog in grep ggrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003693 for ac_exec_ext in '' $ac_executable_extensions; do
3694 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3695 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3696 # Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003697 # Check for GNU $ac_path_GREP
3698case `"$ac_path_GREP" --version 2>&1` in
3699*GNU*)
3700 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3701*)
3702 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003703 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003704 while :
3705 do
3706 cat "conftest.in" "conftest.in" >"conftest.tmp"
3707 mv "conftest.tmp" "conftest.in"
3708 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003709 echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003710 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3711 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3712 ac_count=`expr $ac_count + 1`
3713 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3714 # Best one so far, save it but keep looking for a better one
3715 ac_cv_path_GREP="$ac_path_GREP"
3716 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003717 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003718 # 10*(2^10) chars as input seems more than enough
3719 test $ac_count -gt 10 && break
3720 done
3721 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3722esac
3723
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003724
3725 $ac_path_GREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003726 done
3727done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003728
3729done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003730IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003731
3732
3733fi
3734
3735GREP="$ac_cv_path_GREP"
3736if test -z "$GREP"; then
3737 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3738echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003739 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003740fi
3741
Martin v. Löwiseba40652007-08-30 20:10:57 +00003742else
3743 ac_cv_path_GREP=$GREP
3744fi
3745
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003746
Martin v. Löwiseba40652007-08-30 20:10:57 +00003747fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003748{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3749echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003750 GREP="$ac_cv_path_GREP"
3751
3752
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003753{ echo "$as_me:$LINENO: checking for egrep" >&5
3754echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003755if test "${ac_cv_path_EGREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003756 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00003757else
3758 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3759 then ac_cv_path_EGREP="$GREP -E"
3760 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003761 # Extract the first word of "egrep" to use in msg output
3762if test -z "$EGREP"; then
3763set dummy egrep; ac_prog_name=$2
3764if test "${ac_cv_path_EGREP+set}" = set; then
3765 echo $ECHO_N "(cached) $ECHO_C" >&6
3766else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003767 ac_path_EGREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003768# Loop through the user's path and test for each of PROGNAME-LIST
3769as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003770for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3771do
3772 IFS=$as_save_IFS
3773 test -z "$as_dir" && as_dir=.
3774 for ac_prog in egrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003775 for ac_exec_ext in '' $ac_executable_extensions; do
3776 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3777 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3778 # Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003779 # Check for GNU $ac_path_EGREP
3780case `"$ac_path_EGREP" --version 2>&1` in
3781*GNU*)
3782 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3783*)
3784 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003785 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003786 while :
3787 do
3788 cat "conftest.in" "conftest.in" >"conftest.tmp"
3789 mv "conftest.tmp" "conftest.in"
3790 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003791 echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003792 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3793 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3794 ac_count=`expr $ac_count + 1`
3795 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3796 # Best one so far, save it but keep looking for a better one
3797 ac_cv_path_EGREP="$ac_path_EGREP"
3798 ac_path_EGREP_max=$ac_count
3799 fi
3800 # 10*(2^10) chars as input seems more than enough
3801 test $ac_count -gt 10 && break
3802 done
3803 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3804esac
3805
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003806
3807 $ac_path_EGREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003808 done
3809done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003810
3811done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003812IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003813
3814
3815fi
3816
3817EGREP="$ac_cv_path_EGREP"
3818if test -z "$EGREP"; then
3819 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3820echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003821 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003822fi
3823
Martin v. Löwiseba40652007-08-30 20:10:57 +00003824else
3825 ac_cv_path_EGREP=$EGREP
3826fi
3827
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003828
Martin v. Löwiseba40652007-08-30 20:10:57 +00003829 fi
3830fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003831{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3832echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003833 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003834
3835
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003836
3837{ echo "$as_me:$LINENO: checking for AIX" >&5
3838echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3839cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003840/* confdefs.h. */
3841_ACEOF
3842cat confdefs.h >>conftest.$ac_ext
3843cat >>conftest.$ac_ext <<_ACEOF
3844/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003845#ifdef _AIX
3846 yes
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003847#endif
3848
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003849_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003850if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3851 $EGREP "yes" >/dev/null 2>&1; then
3852 { echo "$as_me:$LINENO: result: yes" >&5
3853echo "${ECHO_T}yes" >&6; }
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003854cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003855#define _ALL_SOURCE 1
3856_ACEOF
3857
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003858else
3859 { echo "$as_me:$LINENO: result: no" >&5
3860echo "${ECHO_T}no" >&6; }
3861fi
Benjamin Peterson2c196742009-12-31 03:17:18 +00003862rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003863
3864
3865
3866# Check for unsupported systems
3867case $ac_sys_system/$ac_sys_release in
3868atheos*|Linux*/1*)
3869 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3870 echo See README for details.
3871 exit 1;;
3872esac
3873
3874
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003875{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3876echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003877
3878# Check whether --with-suffix was given.
3879if test "${with_suffix+set}" = set; then
3880 withval=$with_suffix;
3881 case $withval in
3882 no) EXEEXT=;;
3883 yes) EXEEXT=.exe;;
3884 *) EXEEXT=$withval;;
3885 esac
3886fi
3887
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003888{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3889echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003890
3891# Test whether we're running on a non-case-sensitive system, in which
3892# case we give a warning if no ext is given
3893
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003894{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3895echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003896if test ! -d CaseSensitiveTestDir; then
3897mkdir CaseSensitiveTestDir
3898fi
3899
3900if test -d casesensitivetestdir
3901then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003902 { echo "$as_me:$LINENO: result: yes" >&5
3903echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003904 BUILDEXEEXT=.exe
3905else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003906 { echo "$as_me:$LINENO: result: no" >&5
3907echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003908 BUILDEXEEXT=$EXEEXT
3909fi
3910rmdir CaseSensitiveTestDir
3911
3912case $MACHDEP in
3913bsdos*)
3914 case $CC in
3915 gcc) CC="$CC -D_HAVE_BSDI";;
3916 esac;;
3917esac
3918
3919case $ac_sys_system in
3920hp*|HP*)
3921 case $CC in
3922 cc|*/cc) CC="$CC -Ae";;
3923 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003924SunOS*)
3925 # Some functions have a prototype only with that define, e.g. confstr
3926
3927cat >>confdefs.h <<\_ACEOF
3928#define __EXTENSIONS__ 1
3929_ACEOF
3930
3931 ;;
3932esac
3933
3934
3935
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003936{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3937echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003938if test -z "$LIBRARY"
3939then
3940 LIBRARY='libpython$(VERSION).a'
3941fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003942{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3943echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003944
3945# LDLIBRARY is the name of the library to link against (as opposed to the
3946# name of the library into which to insert object files). BLDLIBRARY is also
3947# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3948# is blank as the main program is not linked directly against LDLIBRARY.
3949# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3950# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3951# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3952# DLLLIBRARY is the shared (i.e., DLL) library.
3953#
3954# RUNSHARED is used to run shared python without installed libraries
3955#
3956# INSTSONAME is the name of the shared library that will be use to install
3957# on the system - some systems like version suffix, others don't
3958
3959
3960
3961
3962
3963
3964LDLIBRARY="$LIBRARY"
3965BLDLIBRARY='$(LDLIBRARY)'
3966INSTSONAME='$(LDLIBRARY)'
3967DLLLIBRARY=''
3968LDLIBRARYDIR=''
3969RUNSHARED=''
3970
3971# LINKCC is the command that links the python executable -- default is $(CC).
3972# If CXX is set, and if it is needed to link a main function that was
3973# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3974# python might then depend on the C++ runtime
3975# This is altered for AIX in order to build the export list before
3976# linking.
3977
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003978{ echo "$as_me:$LINENO: checking LINKCC" >&5
3979echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003980if test -z "$LINKCC"
3981then
3982 LINKCC='$(PURIFY) $(MAINCC)'
3983 case $ac_sys_system in
3984 AIX*)
3985 exp_extra="\"\""
3986 if test $ac_sys_release -ge 5 -o \
3987 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3988 exp_extra="."
3989 fi
3990 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003991 QNX*)
3992 # qcc must be used because the other compilers do not
3993 # support -N.
3994 LINKCC=qcc;;
3995 esac
3996fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003997{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3998echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003999
4000# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4001# make sure we default having it set to "no": this is used by
4002# distutils.unixccompiler to know if it should add --enable-new-dtags
4003# to linker command lines, and failing to detect GNU ld simply results
4004# in the same bahaviour as before.
4005
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004006{ echo "$as_me:$LINENO: checking for GNU ld" >&5
4007echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004008ac_prog=ld
4009if test "$GCC" = yes; then
4010 ac_prog=`$CC -print-prog-name=ld`
4011fi
4012case `"$ac_prog" -V 2>&1 < /dev/null` in
4013 *GNU*)
4014 GNULD=yes;;
4015 *)
4016 GNULD=no;;
4017esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004018{ echo "$as_me:$LINENO: result: $GNULD" >&5
4019echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004020
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004021{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
4022echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004023# Check whether --enable-shared was given.
4024if test "${enable_shared+set}" = set; then
4025 enableval=$enable_shared;
4026fi
4027
4028
4029if test -z "$enable_shared"
4030then
4031 case $ac_sys_system in
4032 CYGWIN* | atheos*)
4033 enable_shared="yes";;
4034 *)
4035 enable_shared="no";;
4036 esac
4037fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004038{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4039echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004040
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004041{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4042echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004043# Check whether --enable-profiling was given.
4044if test "${enable_profiling+set}" = set; then
4045 enableval=$enable_profiling; ac_save_cc="$CC"
4046 CC="$CC -pg"
4047 if test "$cross_compiling" = yes; then
4048 ac_enable_profiling="no"
4049else
4050 cat >conftest.$ac_ext <<_ACEOF
4051/* confdefs.h. */
4052_ACEOF
4053cat confdefs.h >>conftest.$ac_ext
4054cat >>conftest.$ac_ext <<_ACEOF
4055/* end confdefs.h. */
4056int main() { return 0; }
4057_ACEOF
4058rm -f conftest$ac_exeext
4059if { (ac_try="$ac_link"
4060case "(($ac_try" in
4061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4062 *) ac_try_echo=$ac_try;;
4063esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004065 (eval "$ac_link") 2>&5
4066 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004068 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4069 { (case "(($ac_try" in
4070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4071 *) ac_try_echo=$ac_try;;
4072esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004074 (eval "$ac_try") 2>&5
4075 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004077 (exit $ac_status); }; }; then
4078 ac_enable_profiling="yes"
4079else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004080 echo "$as_me: program exited with status $ac_status" >&5
4081echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004082sed 's/^/| /' conftest.$ac_ext >&5
4083
4084( exit $ac_status )
4085ac_enable_profiling="no"
4086fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004087rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4088fi
4089
4090
4091 CC="$ac_save_cc"
4092fi
4093
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004094{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4095echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004096
4097case "$ac_enable_profiling" in
4098 "yes")
4099 BASECFLAGS="-pg $BASECFLAGS"
4100 LDFLAGS="-pg $LDFLAGS"
4101 ;;
4102esac
4103
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004104{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4105echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004106
4107# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4108# library that we build, but we do not want to link against it (we
4109# will find it with a -framework option). For this reason there is an
4110# extra variable BLDLIBRARY against which Python and the extension
4111# modules are linked, BLDLIBRARY. This is normally the same as
4112# LDLIBRARY, but empty for MacOSX framework builds.
4113if test "$enable_framework"
4114then
4115 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4116 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4117 BLDLIBRARY=''
4118else
4119 BLDLIBRARY='$(LDLIBRARY)'
4120fi
4121
4122# Other platforms follow
4123if test $enable_shared = "yes"; then
4124
4125cat >>confdefs.h <<\_ACEOF
4126#define Py_ENABLE_SHARED 1
4127_ACEOF
4128
4129 case $ac_sys_system in
4130 BeOS*)
4131 LDLIBRARY='libpython$(VERSION).so'
4132 ;;
4133 CYGWIN*)
4134 LDLIBRARY='libpython$(VERSION).dll.a'
4135 DLLLIBRARY='libpython$(VERSION).dll'
4136 ;;
4137 SunOS*)
4138 LDLIBRARY='libpython$(VERSION).so'
4139 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4140 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4141 INSTSONAME="$LDLIBRARY".$SOVERSION
4142 ;;
4143 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4144 LDLIBRARY='libpython$(VERSION).so'
4145 BLDLIBRARY='-L. -lpython$(VERSION)'
4146 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4147 case $ac_sys_system in
4148 FreeBSD*)
4149 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4150 ;;
4151 esac
4152 INSTSONAME="$LDLIBRARY".$SOVERSION
4153 ;;
4154 hp*|HP*)
4155 case `uname -m` in
4156 ia64)
4157 LDLIBRARY='libpython$(VERSION).so'
4158 ;;
4159 *)
4160 LDLIBRARY='libpython$(VERSION).sl'
4161 ;;
4162 esac
4163 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4164 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4165 ;;
4166 OSF*)
4167 LDLIBRARY='libpython$(VERSION).so'
4168 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4169 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4170 ;;
4171 atheos*)
4172 LDLIBRARY='libpython$(VERSION).so'
4173 BLDLIBRARY='-L. -lpython$(VERSION)'
4174 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4175 ;;
4176 Darwin*)
4177 LDLIBRARY='libpython$(VERSION).dylib'
4178 BLDLIBRARY='-L. -lpython$(VERSION)'
4179 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4180 ;;
4181
4182 esac
4183else # shared is disabled
4184 case $ac_sys_system in
4185 CYGWIN*)
4186 BLDLIBRARY='$(LIBRARY)'
4187 LDLIBRARY='libpython$(VERSION).dll.a'
4188 ;;
4189 esac
4190fi
4191
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004192{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4193echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004194
4195if test -n "$ac_tool_prefix"; then
4196 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4197set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004198{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4199echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004200if test "${ac_cv_prog_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004201 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004202else
4203 if test -n "$RANLIB"; then
4204 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4205else
4206as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4207for as_dir in $PATH
4208do
4209 IFS=$as_save_IFS
4210 test -z "$as_dir" && as_dir=.
4211 for ac_exec_ext in '' $ac_executable_extensions; do
4212 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4213 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004214 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004215 break 2
4216 fi
4217done
4218done
4219IFS=$as_save_IFS
4220
4221fi
4222fi
4223RANLIB=$ac_cv_prog_RANLIB
4224if test -n "$RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004225 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4226echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004227else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004228 { echo "$as_me:$LINENO: result: no" >&5
4229echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004230fi
4231
4232
4233fi
4234if test -z "$ac_cv_prog_RANLIB"; then
4235 ac_ct_RANLIB=$RANLIB
4236 # Extract the first word of "ranlib", so it can be a program name with args.
4237set dummy ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004238{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4239echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004240if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004241 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004242else
4243 if test -n "$ac_ct_RANLIB"; then
4244 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4245else
4246as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4247for as_dir in $PATH
4248do
4249 IFS=$as_save_IFS
4250 test -z "$as_dir" && as_dir=.
4251 for ac_exec_ext in '' $ac_executable_extensions; do
4252 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4253 ac_cv_prog_ac_ct_RANLIB="ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004254 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004255 break 2
4256 fi
4257done
4258done
4259IFS=$as_save_IFS
4260
4261fi
4262fi
4263ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4264if test -n "$ac_ct_RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004265 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4266echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004267else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004268 { echo "$as_me:$LINENO: result: no" >&5
4269echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004270fi
4271
4272 if test "x$ac_ct_RANLIB" = x; then
4273 RANLIB=":"
4274 else
4275 case $cross_compiling:$ac_tool_warned in
4276yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004277{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4278whose name does not start with the host triplet. If you think this
4279configuration is useful to you, please write to autoconf@gnu.org." >&5
4280echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4281whose name does not start with the host triplet. If you think this
4282configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004283ac_tool_warned=yes ;;
4284esac
4285 RANLIB=$ac_ct_RANLIB
4286 fi
4287else
4288 RANLIB="$ac_cv_prog_RANLIB"
4289fi
4290
4291
4292for ac_prog in ar aal
4293do
4294 # Extract the first word of "$ac_prog", so it can be a program name with args.
4295set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004296{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4297echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004298if test "${ac_cv_prog_AR+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004299 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004300else
4301 if test -n "$AR"; then
4302 ac_cv_prog_AR="$AR" # Let the user override the test.
4303else
4304as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4305for as_dir in $PATH
4306do
4307 IFS=$as_save_IFS
4308 test -z "$as_dir" && as_dir=.
4309 for ac_exec_ext in '' $ac_executable_extensions; do
4310 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4311 ac_cv_prog_AR="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004312 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004313 break 2
4314 fi
4315done
4316done
4317IFS=$as_save_IFS
4318
4319fi
4320fi
4321AR=$ac_cv_prog_AR
4322if test -n "$AR"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004323 { echo "$as_me:$LINENO: result: $AR" >&5
4324echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004325else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004326 { echo "$as_me:$LINENO: result: no" >&5
4327echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004328fi
4329
4330
4331 test -n "$AR" && break
4332done
4333test -n "$AR" || AR="ar"
4334
4335
4336# tweak ARFLAGS only if the user didn't set it on the command line
4337
4338if test -z "$ARFLAGS"
4339then
4340 ARFLAGS="rc"
4341fi
4342
4343
4344# Extract the first word of "svnversion", so it can be a program name with args.
4345set dummy svnversion; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004346{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4347echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004348if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004349 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004350else
4351 if test -n "$SVNVERSION"; then
4352 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4353else
4354as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4355for as_dir in $PATH
4356do
4357 IFS=$as_save_IFS
4358 test -z "$as_dir" && as_dir=.
4359 for ac_exec_ext in '' $ac_executable_extensions; do
4360 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4361 ac_cv_prog_SVNVERSION="found"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004362 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004363 break 2
4364 fi
4365done
4366done
4367IFS=$as_save_IFS
4368
4369 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4370fi
4371fi
4372SVNVERSION=$ac_cv_prog_SVNVERSION
4373if test -n "$SVNVERSION"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004374 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4375echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004376else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004377 { echo "$as_me:$LINENO: result: no" >&5
4378echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004379fi
4380
4381
4382if test $SVNVERSION = found
4383then
4384 SVNVERSION="svnversion \$(srcdir)"
4385else
4386 SVNVERSION="echo Unversioned directory"
4387fi
4388
4389case $MACHDEP in
4390bsdos*|hp*|HP*)
4391 # install -d does not work on BSDI or HP-UX
4392 if test -z "$INSTALL"
4393 then
4394 INSTALL="${srcdir}/install-sh -c"
4395 fi
4396esac
4397ac_aux_dir=
4398for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4399 if test -f "$ac_dir/install-sh"; then
4400 ac_aux_dir=$ac_dir
4401 ac_install_sh="$ac_aux_dir/install-sh -c"
4402 break
4403 elif test -f "$ac_dir/install.sh"; then
4404 ac_aux_dir=$ac_dir
4405 ac_install_sh="$ac_aux_dir/install.sh -c"
4406 break
4407 elif test -f "$ac_dir/shtool"; then
4408 ac_aux_dir=$ac_dir
4409 ac_install_sh="$ac_aux_dir/shtool install -c"
4410 break
4411 fi
4412done
4413if test -z "$ac_aux_dir"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004414 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4415echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004416 { (exit 1); exit 1; }; }
4417fi
4418
4419# These three variables are undocumented and unsupported,
4420# and are intended to be withdrawn in a future Autoconf release.
4421# They can cause serious problems if a builder's source tree is in a directory
4422# whose full name contains unusual characters.
4423ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4424ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4425ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4426
4427
4428# Find a good install program. We prefer a C program (faster),
4429# so one script is as good as another. But avoid the broken or
4430# incompatible versions:
4431# SysV /etc/install, /usr/sbin/install
4432# SunOS /usr/etc/install
4433# IRIX /sbin/install
4434# AIX /bin/install
4435# AmigaOS /C/install, which installs bootblocks on floppy discs
4436# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4437# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4438# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4439# OS/2's system install, which has a completely different semantic
4440# ./install, which can be erroneously created by make from ./install.sh.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004441{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4442echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004443if test -z "$INSTALL"; then
4444if test "${ac_cv_path_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004445 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004446else
4447 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4448for as_dir in $PATH
4449do
4450 IFS=$as_save_IFS
4451 test -z "$as_dir" && as_dir=.
4452 # Account for people who put trailing slashes in PATH elements.
4453case $as_dir/ in
4454 ./ | .// | /cC/* | \
4455 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4456 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4457 /usr/ucb/* ) ;;
4458 *)
4459 # OSF1 and SCO ODT 3.0 have their own names for install.
4460 # Don't use installbsd from OSF since it installs stuff as root
4461 # by default.
4462 for ac_prog in ginstall scoinst install; do
4463 for ac_exec_ext in '' $ac_executable_extensions; do
4464 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4465 if test $ac_prog = install &&
4466 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4467 # AIX install. It has an incompatible calling convention.
4468 :
4469 elif test $ac_prog = install &&
4470 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4471 # program-specific install script used by HP pwplus--don't use.
4472 :
4473 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004474 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4475 break 3
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004476 fi
4477 fi
4478 done
4479 done
4480 ;;
4481esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004482done
4483IFS=$as_save_IFS
4484
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004485
4486fi
4487 if test "${ac_cv_path_install+set}" = set; then
4488 INSTALL=$ac_cv_path_install
4489 else
4490 # As a last resort, use the slow shell script. Don't cache a
4491 # value for INSTALL within a source directory, because that will
4492 # break other packages using the cache if that directory is
4493 # removed, or if the value is a relative name.
4494 INSTALL=$ac_install_sh
4495 fi
4496fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004497{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4498echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004499
4500# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4501# It thinks the first close brace ends the variable substitution.
4502test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4503
4504test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4505
4506test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4507
4508
4509# Not every filesystem supports hard links
4510
4511if test -z "$LN" ; then
4512 case $ac_sys_system in
4513 BeOS*) LN="ln -s";;
4514 CYGWIN*) LN="ln -s";;
4515 atheos*) LN="ln -s";;
4516 *) LN=ln;;
4517 esac
4518fi
4519
4520# Check for --with-pydebug
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004521{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4522echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004523
4524# Check whether --with-pydebug was given.
4525if test "${with_pydebug+set}" = set; then
4526 withval=$with_pydebug;
4527if test "$withval" != no
4528then
4529
4530cat >>confdefs.h <<\_ACEOF
4531#define Py_DEBUG 1
4532_ACEOF
4533
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004534 { echo "$as_me:$LINENO: result: yes" >&5
4535echo "${ECHO_T}yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004536 Py_DEBUG='true'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004537else { echo "$as_me:$LINENO: result: no" >&5
4538echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004539fi
4540else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004541 { echo "$as_me:$LINENO: result: no" >&5
4542echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004543fi
4544
4545
4546# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4547# merged with this chunk of code?
4548
4549# Optimizer/debugger flags
4550# ------------------------
4551# (The following bit of code is complicated enough - please keep things
4552# indented properly. Just pretend you're editing Python code. ;-)
4553
4554# There are two parallel sets of case statements below, one that checks to
4555# see if OPT was set and one that does BASECFLAGS setting based upon
4556# compiler and platform. BASECFLAGS tweaks need to be made even if the
4557# user set OPT.
4558
4559# tweak OPT based on compiler and platform, only if the user didn't set
4560# it on the command line
4561
4562if test -z "$OPT"
4563then
4564 case $GCC in
4565 yes)
4566 if test "$CC" != 'g++' ; then
4567 STRICT_PROTO="-Wstrict-prototypes"
4568 fi
4569 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4570 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4571 WRAP="-fwrapv"
4572 fi
4573 case $ac_cv_prog_cc_g in
4574 yes)
4575 if test "$Py_DEBUG" = 'true' ; then
4576 # Optimization messes up debuggers, so turn it off for
4577 # debug builds.
4578 OPT="-g -Wall $STRICT_PROTO"
4579 else
4580 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4581 fi
4582 ;;
4583 *)
4584 OPT="-O3 -Wall $STRICT_PROTO"
4585 ;;
4586 esac
4587 case $ac_sys_system in
4588 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4589 ;;
4590 esac
4591 ;;
4592
4593 *)
4594 OPT="-O"
4595 ;;
4596 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004597fi
4598
4599
4600
4601# The -arch flags for universal builds on OSX
4602UNIVERSAL_ARCH_FLAGS=
4603
4604
4605# tweak BASECFLAGS based on compiler and platform
4606case $GCC in
4607yes)
4608 # Python violates C99 rules, by casting between incompatible
4609 # pointer types. GCC may generate bad code as a result of that,
4610 # so use -fno-strict-aliasing if supported.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004611 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4612echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004613 ac_save_cc="$CC"
4614 CC="$CC -fno-strict-aliasing"
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004615 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
4616 echo $ECHO_N "(cached) $ECHO_C" >&6
4617else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004618 cat >conftest.$ac_ext <<_ACEOF
4619/* confdefs.h. */
4620_ACEOF
4621cat confdefs.h >>conftest.$ac_ext
4622cat >>conftest.$ac_ext <<_ACEOF
4623/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004624
4625int
4626main ()
4627{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004628int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004629 ;
4630 return 0;
4631}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004632_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004633rm -f conftest.$ac_objext
4634if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004635case "(($ac_try" in
4636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4637 *) ac_try_echo=$ac_try;;
4638esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004640 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004641 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004642 grep -v '^ *+' conftest.er1 >conftest.err
4643 rm -f conftest.er1
4644 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004646 (exit $ac_status); } && {
4647 test -z "$ac_c_werror_flag" ||
4648 test ! -s conftest.err
4649 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004650 ac_cv_no_strict_aliasing_ok=yes
4651else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004652 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004653sed 's/^/| /' conftest.$ac_ext >&5
4654
Gregory P. Smith373469a2009-11-01 21:03:38 +00004655 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004656fi
4657
Gregory P. Smith373469a2009-11-01 21:03:38 +00004658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004659fi
4660
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004661 CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004662 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4663echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004664 if test $ac_cv_no_strict_aliasing_ok = yes
4665 then
4666 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4667 fi
4668
4669 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4670 # support. Without this, treatment of subnormals doesn't follow
4671 # the standard.
4672 case $ac_sys_machine in
4673 alpha*)
4674 BASECFLAGS="$BASECFLAGS -mieee"
4675 ;;
4676 esac
4677
4678 case $ac_sys_system in
4679 SCO_SV*)
4680 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4681 ;;
4682 # is there any other compiler on Darwin besides gcc?
4683 Darwin*)
4684 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4685 # used to be here, but non-Apple gcc doesn't accept them.
4686
4687
4688 if test "${enable_universalsdk}"; then
4689 UNIVERSAL_ARCH_FLAGS=""
4690 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4691 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4692 ARCH_RUN_32BIT=""
Ronald Oussoren92919a62009-12-24 13:30:58 +00004693 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004694
4695 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4696 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren92919a62009-12-24 13:30:58 +00004697 LIPO_32BIT_FLAGS=""
Ronald Oussoren25967582009-09-06 10:00:26 +00004698 ARCH_RUN_32BIT="true"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004699
4700 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4701 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren92919a62009-12-24 13:30:58 +00004702 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004703 ARCH_RUN_32BIT="arch -i386 -ppc"
4704
Ronald Oussoren23d92532009-09-07 06:12:00 +00004705 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4706 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren92919a62009-12-24 13:30:58 +00004707 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren23d92532009-09-07 06:12:00 +00004708 ARCH_RUN_32BIT="arch -i386"
4709
4710 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4711 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren92919a62009-12-24 13:30:58 +00004712 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
4713 ARCH_RUN_32BIT="arch -i386 -ppc7400"
Ronald Oussoren23d92532009-09-07 06:12:00 +00004714
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004715 else
Ronald Oussorena9cfbde2009-09-20 20:05:44 +00004716 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4717echo "$as_me: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004718 { (exit 1); exit 1; }; }
4719
4720 fi
4721
4722
4723 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4724 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4725 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4726 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4727 fi
4728 fi
4729
4730 # Calculate the right deployment target for this build.
4731 #
4732 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4733 if test ${cur_target} '>' 10.2; then
4734 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00004735 if test ${enable_universalsdk}; then
4736 if test "${UNIVERSAL_ARCHS}" = "all"; then
4737 # Ensure that the default platform for a
4738 # 4-way universal build is OSX 10.5,
4739 # that's the first OS release where
4740 # 4-way builds make sense.
4741 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00004742
4743 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4744 cur_target='10.5'
4745
4746 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4747 cur_target='10.5'
4748
4749 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4750 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00004751 fi
4752 else
4753 if test `arch` = "i386"; then
4754 # On Intel macs default to a deployment
4755 # target of 10.4, that's the first OSX
4756 # release with Intel support.
4757 cur_target="10.4"
4758 fi
4759 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004760 fi
4761 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4762
4763 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4764 # environment with a value that is the same as what we'll use
4765 # in the Makefile to ensure that we'll get the same compiler
4766 # environment during configure and build time.
4767 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4768 export MACOSX_DEPLOYMENT_TARGET
4769 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4770
4771 ;;
4772 OSF*)
4773 BASECFLAGS="$BASECFLAGS -mieee"
4774 ;;
4775 esac
4776 ;;
4777
4778*)
4779 case $ac_sys_system in
4780 OpenUNIX*|UnixWare*)
4781 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4782 ;;
4783 OSF*)
4784 BASECFLAGS="$BASECFLAGS -ieee -std"
4785 ;;
4786 SCO_SV*)
4787 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4788 ;;
4789 esac
4790 ;;
4791esac
4792
4793if test "$Py_DEBUG" = 'true'; then
4794 :
4795else
4796 OPT="-DNDEBUG $OPT"
4797fi
4798
4799if test "$ac_arch_flags"
4800then
4801 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4802fi
4803
4804# disable check for icc since it seems to pass, but generates a warning
4805if test "$CC" = icc
4806then
4807 ac_cv_opt_olimit_ok=no
4808fi
4809
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004810{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4811echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004812if test "${ac_cv_opt_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004813 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004814else
4815 ac_save_cc="$CC"
4816CC="$CC -OPT:Olimit=0"
Gregory P. Smith373469a2009-11-01 21:03:38 +00004817cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004818/* confdefs.h. */
4819_ACEOF
4820cat confdefs.h >>conftest.$ac_ext
4821cat >>conftest.$ac_ext <<_ACEOF
4822/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004823
4824int
4825main ()
4826{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004827int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004828 ;
4829 return 0;
4830}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004831_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004832rm -f conftest.$ac_objext
4833if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004834case "(($ac_try" in
4835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4836 *) ac_try_echo=$ac_try;;
4837esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004839 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004840 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004841 grep -v '^ *+' conftest.er1 >conftest.err
4842 rm -f conftest.er1
4843 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004845 (exit $ac_status); } && {
4846 test -z "$ac_c_werror_flag" ||
4847 test ! -s conftest.err
4848 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004849 ac_cv_opt_olimit_ok=yes
4850else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004851 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004852sed 's/^/| /' conftest.$ac_ext >&5
4853
Gregory P. Smith373469a2009-11-01 21:03:38 +00004854 ac_cv_opt_olimit_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004855fi
4856
Gregory P. Smith373469a2009-11-01 21:03:38 +00004857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004858CC="$ac_save_cc"
4859fi
4860
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004861{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4862echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004863if test $ac_cv_opt_olimit_ok = yes; then
4864 case $ac_sys_system in
4865 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4866 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4867 # environment?
4868 Darwin*)
4869 ;;
4870 *)
4871 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4872 ;;
4873 esac
4874else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004875 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4876echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004877 if test "${ac_cv_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004878 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004879else
4880 ac_save_cc="$CC"
4881 CC="$CC -Olimit 1500"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004882 cat >conftest.$ac_ext <<_ACEOF
4883/* confdefs.h. */
4884_ACEOF
4885cat confdefs.h >>conftest.$ac_ext
4886cat >>conftest.$ac_ext <<_ACEOF
4887/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004888
4889int
4890main ()
4891{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004892int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004893 ;
4894 return 0;
4895}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004896_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004897rm -f conftest.$ac_objext
4898if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004899case "(($ac_try" in
4900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4901 *) ac_try_echo=$ac_try;;
4902esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004904 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004905 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004906 grep -v '^ *+' conftest.er1 >conftest.err
4907 rm -f conftest.er1
4908 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004910 (exit $ac_status); } && {
4911 test -z "$ac_c_werror_flag" ||
4912 test ! -s conftest.err
4913 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004914 ac_cv_olimit_ok=yes
4915else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004916 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004917sed 's/^/| /' conftest.$ac_ext >&5
4918
Gregory P. Smith373469a2009-11-01 21:03:38 +00004919 ac_cv_olimit_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004920fi
4921
Gregory P. Smith373469a2009-11-01 21:03:38 +00004922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004923 CC="$ac_save_cc"
4924fi
4925
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004926 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4927echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004928 if test $ac_cv_olimit_ok = yes; then
4929 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4930 fi
4931fi
4932
4933# Check whether GCC supports PyArg_ParseTuple format
4934if test "$GCC" = "yes"
4935then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004936 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4937echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004938 save_CFLAGS=$CFLAGS
4939 CFLAGS="$CFLAGS -Werror"
4940 cat >conftest.$ac_ext <<_ACEOF
4941/* confdefs.h. */
4942_ACEOF
4943cat confdefs.h >>conftest.$ac_ext
4944cat >>conftest.$ac_ext <<_ACEOF
4945/* end confdefs.h. */
4946
4947 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4948
4949int
4950main ()
4951{
4952
4953 ;
4954 return 0;
4955}
4956_ACEOF
4957rm -f conftest.$ac_objext
4958if { (ac_try="$ac_compile"
4959case "(($ac_try" in
4960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4961 *) ac_try_echo=$ac_try;;
4962esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004964 (eval "$ac_compile") 2>conftest.er1
4965 ac_status=$?
4966 grep -v '^ *+' conftest.er1 >conftest.err
4967 rm -f conftest.er1
4968 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004970 (exit $ac_status); } && {
4971 test -z "$ac_c_werror_flag" ||
4972 test ! -s conftest.err
4973 } && test -s conftest.$ac_objext; then
4974
4975cat >>confdefs.h <<\_ACEOF
4976#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4977_ACEOF
4978
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004979 { echo "$as_me:$LINENO: result: yes" >&5
4980echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004981else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004982 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004983sed 's/^/| /' conftest.$ac_ext >&5
4984
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004985 { echo "$as_me:$LINENO: result: no" >&5
4986echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004987
4988fi
4989
4990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4991 CFLAGS=$save_CFLAGS
4992fi
4993
4994# On some compilers, pthreads are available without further options
4995# (e.g. MacOS X). On some of these systems, the compiler will not
4996# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4997# So we have to see first whether pthreads are available without
4998# options before we can check whether -Kpthread improves anything.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004999{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
5000echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005001if test "${ac_cv_pthread_is_default+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005002 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005003else
5004 if test "$cross_compiling" = yes; then
5005 ac_cv_pthread_is_default=no
5006else
5007 cat >conftest.$ac_ext <<_ACEOF
5008/* confdefs.h. */
5009_ACEOF
5010cat confdefs.h >>conftest.$ac_ext
5011cat >>conftest.$ac_ext <<_ACEOF
5012/* end confdefs.h. */
5013
5014#include <pthread.h>
5015
5016void* routine(void* p){return NULL;}
5017
5018int main(){
5019 pthread_t p;
5020 if(pthread_create(&p,NULL,routine,NULL)!=0)
5021 return 1;
5022 (void)pthread_detach(p);
5023 return 0;
5024}
5025
5026_ACEOF
5027rm -f conftest$ac_exeext
5028if { (ac_try="$ac_link"
5029case "(($ac_try" in
5030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5031 *) ac_try_echo=$ac_try;;
5032esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005033eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005034 (eval "$ac_link") 2>&5
5035 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005037 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5038 { (case "(($ac_try" in
5039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5040 *) ac_try_echo=$ac_try;;
5041esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005043 (eval "$ac_try") 2>&5
5044 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005046 (exit $ac_status); }; }; then
5047
5048 ac_cv_pthread_is_default=yes
5049 ac_cv_kthread=no
5050 ac_cv_pthread=no
5051
5052else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005053 echo "$as_me: program exited with status $ac_status" >&5
5054echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005055sed 's/^/| /' conftest.$ac_ext >&5
5056
5057( exit $ac_status )
5058ac_cv_pthread_is_default=no
5059fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005060rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5061fi
5062
5063
5064
5065fi
5066
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005067{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5068echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005069
5070
5071if test $ac_cv_pthread_is_default = yes
5072then
5073 ac_cv_kpthread=no
5074else
5075# -Kpthread, if available, provides the right #defines
5076# and linker options to make pthread_create available
5077# Some compilers won't report that they do not support -Kpthread,
5078# so we need to run a program to see whether it really made the
5079# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005080{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5081echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005082if test "${ac_cv_kpthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005083 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005084else
5085 ac_save_cc="$CC"
5086CC="$CC -Kpthread"
5087if test "$cross_compiling" = yes; then
5088 ac_cv_kpthread=no
5089else
5090 cat >conftest.$ac_ext <<_ACEOF
5091/* confdefs.h. */
5092_ACEOF
5093cat confdefs.h >>conftest.$ac_ext
5094cat >>conftest.$ac_ext <<_ACEOF
5095/* end confdefs.h. */
5096
5097#include <pthread.h>
5098
5099void* routine(void* p){return NULL;}
5100
5101int main(){
5102 pthread_t p;
5103 if(pthread_create(&p,NULL,routine,NULL)!=0)
5104 return 1;
5105 (void)pthread_detach(p);
5106 return 0;
5107}
5108
5109_ACEOF
5110rm -f conftest$ac_exeext
5111if { (ac_try="$ac_link"
5112case "(($ac_try" in
5113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5114 *) ac_try_echo=$ac_try;;
5115esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005117 (eval "$ac_link") 2>&5
5118 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005120 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5121 { (case "(($ac_try" in
5122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5123 *) ac_try_echo=$ac_try;;
5124esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005126 (eval "$ac_try") 2>&5
5127 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005129 (exit $ac_status); }; }; then
5130 ac_cv_kpthread=yes
5131else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005132 echo "$as_me: program exited with status $ac_status" >&5
5133echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005134sed 's/^/| /' conftest.$ac_ext >&5
5135
5136( exit $ac_status )
5137ac_cv_kpthread=no
5138fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005139rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5140fi
5141
5142
5143CC="$ac_save_cc"
5144fi
5145
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005146{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5147echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005148fi
5149
5150if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5151then
5152# -Kthread, if available, provides the right #defines
5153# and linker options to make pthread_create available
5154# Some compilers won't report that they do not support -Kthread,
5155# so we need to run a program to see whether it really made the
5156# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005157{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5158echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005159if test "${ac_cv_kthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005160 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005161else
5162 ac_save_cc="$CC"
5163CC="$CC -Kthread"
5164if test "$cross_compiling" = yes; then
5165 ac_cv_kthread=no
5166else
5167 cat >conftest.$ac_ext <<_ACEOF
5168/* confdefs.h. */
5169_ACEOF
5170cat confdefs.h >>conftest.$ac_ext
5171cat >>conftest.$ac_ext <<_ACEOF
5172/* end confdefs.h. */
5173
5174#include <pthread.h>
5175
5176void* routine(void* p){return NULL;}
5177
5178int main(){
5179 pthread_t p;
5180 if(pthread_create(&p,NULL,routine,NULL)!=0)
5181 return 1;
5182 (void)pthread_detach(p);
5183 return 0;
5184}
5185
5186_ACEOF
5187rm -f conftest$ac_exeext
5188if { (ac_try="$ac_link"
5189case "(($ac_try" in
5190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5191 *) ac_try_echo=$ac_try;;
5192esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005194 (eval "$ac_link") 2>&5
5195 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005197 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5198 { (case "(($ac_try" in
5199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5200 *) ac_try_echo=$ac_try;;
5201esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005203 (eval "$ac_try") 2>&5
5204 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005206 (exit $ac_status); }; }; then
5207 ac_cv_kthread=yes
5208else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005209 echo "$as_me: program exited with status $ac_status" >&5
5210echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005211sed 's/^/| /' conftest.$ac_ext >&5
5212
5213( exit $ac_status )
5214ac_cv_kthread=no
5215fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005216rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5217fi
5218
5219
5220CC="$ac_save_cc"
5221fi
5222
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005223{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5224echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005225fi
5226
5227if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5228then
5229# -pthread, if available, provides the right #defines
5230# and linker options to make pthread_create available
5231# Some compilers won't report that they do not support -pthread,
5232# so we need to run a program to see whether it really made the
5233# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005234{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5235echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005236if test "${ac_cv_thread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005237 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005238else
5239 ac_save_cc="$CC"
5240CC="$CC -pthread"
5241if test "$cross_compiling" = yes; then
5242 ac_cv_pthread=no
5243else
5244 cat >conftest.$ac_ext <<_ACEOF
5245/* confdefs.h. */
5246_ACEOF
5247cat confdefs.h >>conftest.$ac_ext
5248cat >>conftest.$ac_ext <<_ACEOF
5249/* end confdefs.h. */
5250
5251#include <pthread.h>
5252
5253void* routine(void* p){return NULL;}
5254
5255int main(){
5256 pthread_t p;
5257 if(pthread_create(&p,NULL,routine,NULL)!=0)
5258 return 1;
5259 (void)pthread_detach(p);
5260 return 0;
5261}
5262
5263_ACEOF
5264rm -f conftest$ac_exeext
5265if { (ac_try="$ac_link"
5266case "(($ac_try" in
5267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5268 *) ac_try_echo=$ac_try;;
5269esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005271 (eval "$ac_link") 2>&5
5272 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005274 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5275 { (case "(($ac_try" in
5276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5277 *) ac_try_echo=$ac_try;;
5278esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005280 (eval "$ac_try") 2>&5
5281 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005283 (exit $ac_status); }; }; then
5284 ac_cv_pthread=yes
5285else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005286 echo "$as_me: program exited with status $ac_status" >&5
5287echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005288sed 's/^/| /' conftest.$ac_ext >&5
5289
5290( exit $ac_status )
5291ac_cv_pthread=no
5292fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005293rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5294fi
5295
5296
5297CC="$ac_save_cc"
5298fi
5299
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005300{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5301echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005302fi
5303
5304# If we have set a CC compiler flag for thread support then
5305# check if it works for CXX, too.
5306ac_cv_cxx_thread=no
5307if test ! -z "$CXX"
5308then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005309{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5310echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005311ac_save_cxx="$CXX"
5312
5313if test "$ac_cv_kpthread" = "yes"
5314then
5315 CXX="$CXX -Kpthread"
5316 ac_cv_cxx_thread=yes
5317elif test "$ac_cv_kthread" = "yes"
5318then
5319 CXX="$CXX -Kthread"
5320 ac_cv_cxx_thread=yes
5321elif test "$ac_cv_pthread" = "yes"
5322then
5323 CXX="$CXX -pthread"
5324 ac_cv_cxx_thread=yes
5325fi
5326
5327if test $ac_cv_cxx_thread = yes
5328then
5329 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5330 $CXX -c conftest.$ac_ext 2>&5
5331 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5332 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5333 then
5334 ac_cv_cxx_thread=yes
5335 else
5336 ac_cv_cxx_thread=no
5337 fi
5338 rm -fr conftest*
5339fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005340{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5341echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005342fi
5343CXX="$ac_save_cxx"
5344
5345
5346# checks for header files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005347{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5348echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005349if test "${ac_cv_header_stdc+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005350 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005351else
5352 cat >conftest.$ac_ext <<_ACEOF
5353/* confdefs.h. */
5354_ACEOF
5355cat confdefs.h >>conftest.$ac_ext
5356cat >>conftest.$ac_ext <<_ACEOF
5357/* end confdefs.h. */
5358#include <stdlib.h>
5359#include <stdarg.h>
5360#include <string.h>
5361#include <float.h>
5362
5363int
5364main ()
5365{
5366
5367 ;
5368 return 0;
5369}
5370_ACEOF
5371rm -f conftest.$ac_objext
5372if { (ac_try="$ac_compile"
5373case "(($ac_try" in
5374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5375 *) ac_try_echo=$ac_try;;
5376esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005378 (eval "$ac_compile") 2>conftest.er1
5379 ac_status=$?
5380 grep -v '^ *+' conftest.er1 >conftest.err
5381 rm -f conftest.er1
5382 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005384 (exit $ac_status); } && {
5385 test -z "$ac_c_werror_flag" ||
5386 test ! -s conftest.err
5387 } && test -s conftest.$ac_objext; then
5388 ac_cv_header_stdc=yes
5389else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005390 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005391sed 's/^/| /' conftest.$ac_ext >&5
5392
5393 ac_cv_header_stdc=no
5394fi
5395
5396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5397
5398if test $ac_cv_header_stdc = yes; then
5399 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5400 cat >conftest.$ac_ext <<_ACEOF
5401/* confdefs.h. */
5402_ACEOF
5403cat confdefs.h >>conftest.$ac_ext
5404cat >>conftest.$ac_ext <<_ACEOF
5405/* end confdefs.h. */
5406#include <string.h>
5407
5408_ACEOF
5409if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5410 $EGREP "memchr" >/dev/null 2>&1; then
5411 :
5412else
5413 ac_cv_header_stdc=no
5414fi
Benjamin Peterson2c196742009-12-31 03:17:18 +00005415rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005416
5417fi
5418
5419if test $ac_cv_header_stdc = yes; then
5420 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5421 cat >conftest.$ac_ext <<_ACEOF
5422/* confdefs.h. */
5423_ACEOF
5424cat confdefs.h >>conftest.$ac_ext
5425cat >>conftest.$ac_ext <<_ACEOF
5426/* end confdefs.h. */
5427#include <stdlib.h>
5428
5429_ACEOF
5430if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5431 $EGREP "free" >/dev/null 2>&1; then
5432 :
5433else
5434 ac_cv_header_stdc=no
5435fi
Benjamin Peterson2c196742009-12-31 03:17:18 +00005436rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005437
5438fi
5439
5440if test $ac_cv_header_stdc = yes; then
5441 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5442 if test "$cross_compiling" = yes; then
5443 :
5444else
5445 cat >conftest.$ac_ext <<_ACEOF
5446/* confdefs.h. */
5447_ACEOF
5448cat confdefs.h >>conftest.$ac_ext
5449cat >>conftest.$ac_ext <<_ACEOF
5450/* end confdefs.h. */
5451#include <ctype.h>
5452#include <stdlib.h>
5453#if ((' ' & 0x0FF) == 0x020)
5454# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5455# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5456#else
5457# define ISLOWER(c) \
5458 (('a' <= (c) && (c) <= 'i') \
5459 || ('j' <= (c) && (c) <= 'r') \
5460 || ('s' <= (c) && (c) <= 'z'))
5461# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5462#endif
5463
5464#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5465int
5466main ()
5467{
5468 int i;
5469 for (i = 0; i < 256; i++)
5470 if (XOR (islower (i), ISLOWER (i))
5471 || toupper (i) != TOUPPER (i))
5472 return 2;
5473 return 0;
5474}
5475_ACEOF
5476rm -f conftest$ac_exeext
5477if { (ac_try="$ac_link"
5478case "(($ac_try" in
5479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5480 *) ac_try_echo=$ac_try;;
5481esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005483 (eval "$ac_link") 2>&5
5484 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005486 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5487 { (case "(($ac_try" in
5488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5489 *) ac_try_echo=$ac_try;;
5490esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005492 (eval "$ac_try") 2>&5
5493 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005495 (exit $ac_status); }; }; then
5496 :
5497else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005498 echo "$as_me: program exited with status $ac_status" >&5
5499echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005500sed 's/^/| /' conftest.$ac_ext >&5
5501
5502( exit $ac_status )
5503ac_cv_header_stdc=no
5504fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005505rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5506fi
5507
5508
5509fi
5510fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005511{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5512echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005513if test $ac_cv_header_stdc = yes; then
5514
5515cat >>confdefs.h <<\_ACEOF
5516#define STDC_HEADERS 1
5517_ACEOF
5518
5519fi
5520
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005521# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5532 inttypes.h stdint.h unistd.h
5533do
5534as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5535{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5536echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5537if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5538 echo $ECHO_N "(cached) $ECHO_C" >&6
5539else
5540 cat >conftest.$ac_ext <<_ACEOF
5541/* confdefs.h. */
5542_ACEOF
5543cat confdefs.h >>conftest.$ac_ext
5544cat >>conftest.$ac_ext <<_ACEOF
5545/* end confdefs.h. */
5546$ac_includes_default
5547
5548#include <$ac_header>
5549_ACEOF
5550rm -f conftest.$ac_objext
5551if { (ac_try="$ac_compile"
5552case "(($ac_try" in
5553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5554 *) ac_try_echo=$ac_try;;
5555esac
5556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5557 (eval "$ac_compile") 2>conftest.er1
5558 ac_status=$?
5559 grep -v '^ *+' conftest.er1 >conftest.err
5560 rm -f conftest.er1
5561 cat conftest.err >&5
5562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5563 (exit $ac_status); } && {
5564 test -z "$ac_c_werror_flag" ||
5565 test ! -s conftest.err
5566 } && test -s conftest.$ac_objext; then
5567 eval "$as_ac_Header=yes"
5568else
5569 echo "$as_me: failed program was:" >&5
5570sed 's/^/| /' conftest.$ac_ext >&5
5571
5572 eval "$as_ac_Header=no"
5573fi
5574
5575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5576fi
5577ac_res=`eval echo '${'$as_ac_Header'}'`
5578 { echo "$as_me:$LINENO: result: $ac_res" >&5
5579echo "${ECHO_T}$ac_res" >&6; }
5580if test `eval echo '${'$as_ac_Header'}'` = yes; then
5581 cat >>confdefs.h <<_ACEOF
5582#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5583_ACEOF
5584
5585fi
5586
5587done
5588
5589
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005590
Martin v. Löwis11437992002-04-12 09:54:03 +00005591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
Anthony Baxter8a560de2004-10-13 15:30:56 +00005626
Martin v. Löwisc3001752005-01-23 09:27:24 +00005627
Martin v. Löwis11017b12006-01-14 18:12:57 +00005628
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005629
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005630
5631
5632
5633
5634
5635
5636
5637
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005638
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005639
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005640
5641
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005642
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005643
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005644for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5645fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005646ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005647shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005648unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005649sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5650sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005651sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005652sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005653sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Martin v. Löwis0347a9a2006-10-27 07:06:52 +00005654sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005655bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005656do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005657as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005658if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005659 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5660echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005661if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005662 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005663fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005664ac_res=`eval echo '${'$as_ac_Header'}'`
5665 { echo "$as_me:$LINENO: result: $ac_res" >&5
5666echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005667else
Martin v. Löwis11437992002-04-12 09:54:03 +00005668 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005669{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5670echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005671cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005672/* confdefs.h. */
5673_ACEOF
5674cat confdefs.h >>conftest.$ac_ext
5675cat >>conftest.$ac_ext <<_ACEOF
5676/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005677$ac_includes_default
5678#include <$ac_header>
5679_ACEOF
5680rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005681if { (ac_try="$ac_compile"
5682case "(($ac_try" in
5683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5684 *) ac_try_echo=$ac_try;;
5685esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005687 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005688 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005689 grep -v '^ *+' conftest.er1 >conftest.err
5690 rm -f conftest.er1
5691 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005693 (exit $ac_status); } && {
5694 test -z "$ac_c_werror_flag" ||
5695 test ! -s conftest.err
5696 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005697 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005698else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005699 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005700sed 's/^/| /' conftest.$ac_ext >&5
5701
Martin v. Löwiseba40652007-08-30 20:10:57 +00005702 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005703fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005704
5705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005706{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5707echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005708
5709# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005710{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5711echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005712cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005713/* confdefs.h. */
5714_ACEOF
5715cat confdefs.h >>conftest.$ac_ext
5716cat >>conftest.$ac_ext <<_ACEOF
5717/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005718#include <$ac_header>
5719_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005720if { (ac_try="$ac_cpp conftest.$ac_ext"
5721case "(($ac_try" in
5722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5723 *) ac_try_echo=$ac_try;;
5724esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005726 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005727 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005728 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005729 rm -f conftest.er1
5730 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005732 (exit $ac_status); } >/dev/null && {
5733 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5734 test ! -s conftest.err
5735 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005736 ac_header_preproc=yes
5737else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005738 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005739sed 's/^/| /' conftest.$ac_ext >&5
5740
Martin v. Löwis11437992002-04-12 09:54:03 +00005741 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005742fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005743
Martin v. Löwis11437992002-04-12 09:54:03 +00005744rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005745{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5746echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005747
5748# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005749case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5750 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005751 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5752echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5753 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5754echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005755 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005756 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005757 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005758 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5759echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5760 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5761echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5762 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5763echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5764 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5765echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5766 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5767echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5768 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5769echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005770 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00005771## -------------------------------------- ##
5772## Report this to http://bugs.python.org/ ##
5773## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005774_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005775 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005776 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005777esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005778{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5779echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005780if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005781 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005782else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005783 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005784fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005785ac_res=`eval echo '${'$as_ac_Header'}'`
5786 { echo "$as_me:$LINENO: result: $ac_res" >&5
5787echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005788
5789fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005790if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005791 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005792#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005793_ACEOF
5794
5795fi
5796
Guido van Rossum627b2d71993-12-24 10:39:16 +00005797done
5798
Martin v. Löwis11437992002-04-12 09:54:03 +00005799
5800
5801
5802
5803
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005804ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005805for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005806 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5807{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5808echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005809if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005810 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005811else
Martin v. Löwis11437992002-04-12 09:54:03 +00005812 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005813/* confdefs.h. */
5814_ACEOF
5815cat confdefs.h >>conftest.$ac_ext
5816cat >>conftest.$ac_ext <<_ACEOF
5817/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005818#include <sys/types.h>
5819#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005820
Martin v. Löwis11437992002-04-12 09:54:03 +00005821int
5822main ()
5823{
5824if ((DIR *) 0)
5825return 0;
5826 ;
5827 return 0;
5828}
5829_ACEOF
5830rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005831if { (ac_try="$ac_compile"
5832case "(($ac_try" in
5833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5834 *) ac_try_echo=$ac_try;;
5835esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005837 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005838 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005839 grep -v '^ *+' conftest.er1 >conftest.err
5840 rm -f conftest.er1
5841 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005843 (exit $ac_status); } && {
5844 test -z "$ac_c_werror_flag" ||
5845 test ! -s conftest.err
5846 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005847 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005848else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005849 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005850sed 's/^/| /' conftest.$ac_ext >&5
5851
Martin v. Löwiseba40652007-08-30 20:10:57 +00005852 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005853fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005854
5855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005856fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005857ac_res=`eval echo '${'$as_ac_Header'}'`
5858 { echo "$as_me:$LINENO: result: $ac_res" >&5
5859echo "${ECHO_T}$ac_res" >&6; }
5860if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005861 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005862#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005863_ACEOF
5864
5865ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005866fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005867
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005868done
5869# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5870if test $ac_header_dirent = dirent.h; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005871 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5872echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005873if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005874 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005875else
Martin v. Löwis11437992002-04-12 09:54:03 +00005876 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005877cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005878/* confdefs.h. */
5879_ACEOF
5880cat confdefs.h >>conftest.$ac_ext
5881cat >>conftest.$ac_ext <<_ACEOF
5882/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005883
Martin v. Löwiseba40652007-08-30 20:10:57 +00005884/* Override any GCC internal prototype to avoid an error.
5885 Use char because int might match the return type of a GCC
5886 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005887#ifdef __cplusplus
5888extern "C"
5889#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005890char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005891int
5892main ()
5893{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005894return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005895 ;
5896 return 0;
5897}
5898_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005899for ac_lib in '' dir; do
5900 if test -z "$ac_lib"; then
5901 ac_res="none required"
5902 else
5903 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005904 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005905 fi
5906 rm -f conftest.$ac_objext conftest$ac_exeext
5907if { (ac_try="$ac_link"
5908case "(($ac_try" in
5909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5910 *) ac_try_echo=$ac_try;;
5911esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005913 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005914 ac_status=$?
5915 grep -v '^ *+' conftest.er1 >conftest.err
5916 rm -f conftest.er1
5917 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005919 (exit $ac_status); } && {
5920 test -z "$ac_c_werror_flag" ||
5921 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005922 } && test -s conftest$ac_exeext &&
5923 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005924 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005925else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005926 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00005927sed 's/^/| /' conftest.$ac_ext >&5
5928
Martin v. Löwiseba40652007-08-30 20:10:57 +00005929
Brett Cannon19fab762007-06-02 03:02:29 +00005930fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005931
5932rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5933 conftest$ac_exeext
5934 if test "${ac_cv_search_opendir+set}" = set; then
5935 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005936fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005937done
5938if test "${ac_cv_search_opendir+set}" = set; then
5939 :
5940else
5941 ac_cv_search_opendir=no
5942fi
5943rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005944LIBS=$ac_func_search_save_LIBS
5945fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005946{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5947echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005948ac_res=$ac_cv_search_opendir
5949if test "$ac_res" != no; then
5950 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005951
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005952fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005953
Michael W. Hudson54241132001-12-07 15:38:26 +00005954else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005955 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5956echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005957if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005958 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005959else
5960 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005961cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005962/* confdefs.h. */
5963_ACEOF
5964cat confdefs.h >>conftest.$ac_ext
5965cat >>conftest.$ac_ext <<_ACEOF
5966/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005967
Martin v. Löwiseba40652007-08-30 20:10:57 +00005968/* Override any GCC internal prototype to avoid an error.
5969 Use char because int might match the return type of a GCC
5970 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005971#ifdef __cplusplus
5972extern "C"
5973#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005974char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005975int
5976main ()
5977{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005978return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005979 ;
5980 return 0;
5981}
5982_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005983for ac_lib in '' x; do
5984 if test -z "$ac_lib"; then
5985 ac_res="none required"
5986 else
5987 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005988 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005989 fi
5990 rm -f conftest.$ac_objext conftest$ac_exeext
5991if { (ac_try="$ac_link"
5992case "(($ac_try" in
5993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5994 *) ac_try_echo=$ac_try;;
5995esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005997 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005998 ac_status=$?
5999 grep -v '^ *+' conftest.er1 >conftest.err
6000 rm -f conftest.er1
6001 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006003 (exit $ac_status); } && {
6004 test -z "$ac_c_werror_flag" ||
6005 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006006 } && test -s conftest$ac_exeext &&
6007 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006008 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006009else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006010 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006011sed 's/^/| /' conftest.$ac_ext >&5
6012
Martin v. Löwiseba40652007-08-30 20:10:57 +00006013
Brett Cannon19fab762007-06-02 03:02:29 +00006014fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006015
6016rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6017 conftest$ac_exeext
6018 if test "${ac_cv_search_opendir+set}" = set; then
6019 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006020fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006021done
6022if test "${ac_cv_search_opendir+set}" = set; then
6023 :
6024else
6025 ac_cv_search_opendir=no
6026fi
6027rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006028LIBS=$ac_func_search_save_LIBS
6029fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006030{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6031echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006032ac_res=$ac_cv_search_opendir
6033if test "$ac_res" != no; then
6034 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006035
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006036fi
6037
6038fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006039
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006040{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6041echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006042if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006043 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006044else
6045 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006046/* confdefs.h. */
6047_ACEOF
6048cat confdefs.h >>conftest.$ac_ext
6049cat >>conftest.$ac_ext <<_ACEOF
6050/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006051#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006052int
6053main ()
6054{
6055return makedev(0, 0);
6056 ;
6057 return 0;
6058}
6059_ACEOF
6060rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006061if { (ac_try="$ac_link"
6062case "(($ac_try" in
6063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6064 *) ac_try_echo=$ac_try;;
6065esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006067 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006068 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006069 grep -v '^ *+' conftest.er1 >conftest.err
6070 rm -f conftest.er1
6071 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006073 (exit $ac_status); } && {
6074 test -z "$ac_c_werror_flag" ||
6075 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006076 } && test -s conftest$ac_exeext &&
6077 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006078 ac_cv_header_sys_types_h_makedev=yes
6079else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006080 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006081sed 's/^/| /' conftest.$ac_ext >&5
6082
Martin v. Löwiseba40652007-08-30 20:10:57 +00006083 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006084fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006085
6086rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006087 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006088
6089fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006090{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6091echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006092
6093if test $ac_cv_header_sys_types_h_makedev = no; then
6094if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006095 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6096echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006097if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006098 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006099fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006100{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6101echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006102else
6103 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006104{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6105echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006106cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006107/* confdefs.h. */
6108_ACEOF
6109cat confdefs.h >>conftest.$ac_ext
6110cat >>conftest.$ac_ext <<_ACEOF
6111/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006112$ac_includes_default
6113#include <sys/mkdev.h>
6114_ACEOF
6115rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006116if { (ac_try="$ac_compile"
6117case "(($ac_try" in
6118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6119 *) ac_try_echo=$ac_try;;
6120esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006122 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006123 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006124 grep -v '^ *+' conftest.er1 >conftest.err
6125 rm -f conftest.er1
6126 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006128 (exit $ac_status); } && {
6129 test -z "$ac_c_werror_flag" ||
6130 test ! -s conftest.err
6131 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006132 ac_header_compiler=yes
6133else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006134 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006135sed 's/^/| /' conftest.$ac_ext >&5
6136
Martin v. Löwiseba40652007-08-30 20:10:57 +00006137 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006138fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006139
6140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006141{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6142echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006143
6144# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006145{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6146echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006147cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006148/* confdefs.h. */
6149_ACEOF
6150cat confdefs.h >>conftest.$ac_ext
6151cat >>conftest.$ac_ext <<_ACEOF
6152/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006153#include <sys/mkdev.h>
6154_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006155if { (ac_try="$ac_cpp conftest.$ac_ext"
6156case "(($ac_try" in
6157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6158 *) ac_try_echo=$ac_try;;
6159esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006161 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006162 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006163 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006164 rm -f conftest.er1
6165 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006167 (exit $ac_status); } >/dev/null && {
6168 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6169 test ! -s conftest.err
6170 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006171 ac_header_preproc=yes
6172else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006173 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006174sed 's/^/| /' conftest.$ac_ext >&5
6175
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006176 ac_header_preproc=no
6177fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006178
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006179rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006180{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6181echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006182
6183# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006184case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6185 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006186 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6187echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6188 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6189echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006190 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006191 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006192 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006193 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6194echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6195 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6196echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6197 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6198echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6199 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6200echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6201 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6202echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6203 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6204echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006205 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006206## -------------------------------------- ##
6207## Report this to http://bugs.python.org/ ##
6208## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006209_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006210 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006211 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006212esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006213{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6214echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006215if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006216 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006217else
6218 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6219fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006220{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6221echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006222
6223fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006224if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006225
6226cat >>confdefs.h <<\_ACEOF
6227#define MAJOR_IN_MKDEV 1
6228_ACEOF
6229
6230fi
6231
6232
6233
6234 if test $ac_cv_header_sys_mkdev_h = no; then
6235 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006236 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6237echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006238if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006239 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006240fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006241{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6242echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006243else
6244 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006245{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6246echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006247cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006248/* confdefs.h. */
6249_ACEOF
6250cat confdefs.h >>conftest.$ac_ext
6251cat >>conftest.$ac_ext <<_ACEOF
6252/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006253$ac_includes_default
6254#include <sys/sysmacros.h>
6255_ACEOF
6256rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006257if { (ac_try="$ac_compile"
6258case "(($ac_try" in
6259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6260 *) ac_try_echo=$ac_try;;
6261esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006263 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006264 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006265 grep -v '^ *+' conftest.er1 >conftest.err
6266 rm -f conftest.er1
6267 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006269 (exit $ac_status); } && {
6270 test -z "$ac_c_werror_flag" ||
6271 test ! -s conftest.err
6272 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006273 ac_header_compiler=yes
6274else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006275 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006276sed 's/^/| /' conftest.$ac_ext >&5
6277
Martin v. Löwiseba40652007-08-30 20:10:57 +00006278 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006279fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006280
6281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006282{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6283echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006284
6285# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006286{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6287echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006288cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006289/* confdefs.h. */
6290_ACEOF
6291cat confdefs.h >>conftest.$ac_ext
6292cat >>conftest.$ac_ext <<_ACEOF
6293/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006294#include <sys/sysmacros.h>
6295_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006296if { (ac_try="$ac_cpp conftest.$ac_ext"
6297case "(($ac_try" in
6298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6299 *) ac_try_echo=$ac_try;;
6300esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006302 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006303 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006304 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006305 rm -f conftest.er1
6306 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006308 (exit $ac_status); } >/dev/null && {
6309 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6310 test ! -s conftest.err
6311 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006312 ac_header_preproc=yes
6313else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006314 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006315sed 's/^/| /' conftest.$ac_ext >&5
6316
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006317 ac_header_preproc=no
6318fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006319
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006320rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006321{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6322echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006323
6324# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006325case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6326 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006327 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6328echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6329 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6330echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006331 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006332 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006333 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006334 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6335echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6336 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6337echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6338 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6339echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6340 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6341echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6342 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6343echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6344 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6345echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006346 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006347## -------------------------------------- ##
6348## Report this to http://bugs.python.org/ ##
6349## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006350_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006351 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006352 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006353esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006354{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6355echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006356if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006357 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006358else
6359 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6360fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006361{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6362echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006363
6364fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006365if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006366
6367cat >>confdefs.h <<\_ACEOF
6368#define MAJOR_IN_SYSMACROS 1
6369_ACEOF
6370
6371fi
6372
6373
6374 fi
6375fi
6376
Michael W. Hudson54241132001-12-07 15:38:26 +00006377
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006378# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006379
6380for ac_header in term.h
6381do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006382as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6383{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6384echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006385if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006386 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006387else
6388 cat >conftest.$ac_ext <<_ACEOF
6389/* confdefs.h. */
6390_ACEOF
6391cat confdefs.h >>conftest.$ac_ext
6392cat >>conftest.$ac_ext <<_ACEOF
6393/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006394
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006395#ifdef HAVE_CURSES_H
6396#include <curses.h>
6397#endif
6398
6399
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006400#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006401_ACEOF
6402rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006403if { (ac_try="$ac_compile"
6404case "(($ac_try" in
6405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6406 *) ac_try_echo=$ac_try;;
6407esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006409 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006410 ac_status=$?
6411 grep -v '^ *+' conftest.er1 >conftest.err
6412 rm -f conftest.er1
6413 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006415 (exit $ac_status); } && {
6416 test -z "$ac_c_werror_flag" ||
6417 test ! -s conftest.err
6418 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006419 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006420else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006421 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006422sed 's/^/| /' conftest.$ac_ext >&5
6423
Martin v. Löwiseba40652007-08-30 20:10:57 +00006424 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006425fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006426
6427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006428fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006429ac_res=`eval echo '${'$as_ac_Header'}'`
6430 { echo "$as_me:$LINENO: result: $ac_res" >&5
6431echo "${ECHO_T}$ac_res" >&6; }
6432if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006433 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006434#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006435_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006436
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006437fi
6438
6439done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006440
6441
Martin v. Löwis11017b12006-01-14 18:12:57 +00006442# On Linux, netlink.h requires asm/types.h
6443
6444for ac_header in linux/netlink.h
6445do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006446as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6447{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6448echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006449if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006450 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006451else
6452 cat >conftest.$ac_ext <<_ACEOF
6453/* confdefs.h. */
6454_ACEOF
6455cat confdefs.h >>conftest.$ac_ext
6456cat >>conftest.$ac_ext <<_ACEOF
6457/* end confdefs.h. */
6458
6459#ifdef HAVE_ASM_TYPES_H
6460#include <asm/types.h>
6461#endif
6462#ifdef HAVE_SYS_SOCKET_H
6463#include <sys/socket.h>
6464#endif
6465
6466
6467#include <$ac_header>
6468_ACEOF
6469rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006470if { (ac_try="$ac_compile"
6471case "(($ac_try" in
6472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6473 *) ac_try_echo=$ac_try;;
6474esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006475eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006476 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006477 ac_status=$?
6478 grep -v '^ *+' conftest.er1 >conftest.err
6479 rm -f conftest.er1
6480 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006482 (exit $ac_status); } && {
6483 test -z "$ac_c_werror_flag" ||
6484 test ! -s conftest.err
6485 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006486 eval "$as_ac_Header=yes"
6487else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006488 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006489sed 's/^/| /' conftest.$ac_ext >&5
6490
Martin v. Löwiseba40652007-08-30 20:10:57 +00006491 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006492fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006493
6494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006495fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006496ac_res=`eval echo '${'$as_ac_Header'}'`
6497 { echo "$as_me:$LINENO: result: $ac_res" >&5
6498echo "${ECHO_T}$ac_res" >&6; }
6499if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006500 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006501#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006502_ACEOF
6503
6504fi
6505
6506done
6507
6508
Guido van Rossum627b2d71993-12-24 10:39:16 +00006509# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006510was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006511{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6512echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006513cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006514/* confdefs.h. */
6515_ACEOF
6516cat confdefs.h >>conftest.$ac_ext
6517cat >>conftest.$ac_ext <<_ACEOF
6518/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006519#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006520
6521_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006522if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006523 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006524 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006525else
Martin v. Löwis11437992002-04-12 09:54:03 +00006526
6527
6528cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006529#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006530_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006531
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006532
Guido van Rossum627b2d71993-12-24 10:39:16 +00006533fi
Benjamin Peterson2c196742009-12-31 03:17:18 +00006534rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006535
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006536{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6537echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006538
Neal Norwitz11690112002-07-30 01:08:28 +00006539# Check whether using makedev requires defining _OSF_SOURCE
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006540{ echo "$as_me:$LINENO: checking for makedev" >&5
6541echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006542cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006543/* confdefs.h. */
6544_ACEOF
6545cat confdefs.h >>conftest.$ac_ext
6546cat >>conftest.$ac_ext <<_ACEOF
6547/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006548#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006549int
6550main ()
6551{
6552 makedev(0, 0)
6553 ;
6554 return 0;
6555}
6556_ACEOF
6557rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006558if { (ac_try="$ac_link"
6559case "(($ac_try" in
6560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6561 *) ac_try_echo=$ac_try;;
6562esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006564 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006565 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006566 grep -v '^ *+' conftest.er1 >conftest.err
6567 rm -f conftest.er1
6568 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006570 (exit $ac_status); } && {
6571 test -z "$ac_c_werror_flag" ||
6572 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006573 } && test -s conftest$ac_exeext &&
6574 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006575 ac_cv_has_makedev=yes
6576else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006577 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006578sed 's/^/| /' conftest.$ac_ext >&5
6579
Martin v. Löwiseba40652007-08-30 20:10:57 +00006580 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006581fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006582
6583rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006584 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006585if test "$ac_cv_has_makedev" = "no"; then
6586 # we didn't link, try if _OSF_SOURCE will allow us to link
6587 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006588/* confdefs.h. */
6589_ACEOF
6590cat confdefs.h >>conftest.$ac_ext
6591cat >>conftest.$ac_ext <<_ACEOF
6592/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006593
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006594#define _OSF_SOURCE 1
6595#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006596
Neal Norwitz11690112002-07-30 01:08:28 +00006597int
6598main ()
6599{
6600 makedev(0, 0)
6601 ;
6602 return 0;
6603}
6604_ACEOF
6605rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006606if { (ac_try="$ac_link"
6607case "(($ac_try" in
6608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6609 *) ac_try_echo=$ac_try;;
6610esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006612 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006613 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006614 grep -v '^ *+' conftest.er1 >conftest.err
6615 rm -f conftest.er1
6616 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006618 (exit $ac_status); } && {
6619 test -z "$ac_c_werror_flag" ||
6620 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006621 } && test -s conftest$ac_exeext &&
6622 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006623 ac_cv_has_makedev=yes
6624else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006625 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006626sed 's/^/| /' conftest.$ac_ext >&5
6627
Martin v. Löwiseba40652007-08-30 20:10:57 +00006628 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006629fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006630
6631rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006632 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006633 if test "$ac_cv_has_makedev" = "yes"; then
6634
6635cat >>confdefs.h <<\_ACEOF
6636#define _OSF_SOURCE 1
6637_ACEOF
6638
6639 fi
6640fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006641{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6642echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006643if test "$ac_cv_has_makedev" = "yes"; then
6644
6645cat >>confdefs.h <<\_ACEOF
6646#define HAVE_MAKEDEV 1
6647_ACEOF
6648
6649fi
6650
Martin v. Löwis399a6892002-10-04 10:22:02 +00006651# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6652# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6653# defined, but the compiler does not support pragma redefine_extname,
6654# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6655# structures (such as rlimit64) without declaring them. As a
6656# work-around, disable LFS on such configurations
6657
6658use_lfs=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006659{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6660echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006661cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006662/* confdefs.h. */
6663_ACEOF
6664cat confdefs.h >>conftest.$ac_ext
6665cat >>conftest.$ac_ext <<_ACEOF
6666/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006667
6668#define _LARGEFILE_SOURCE 1
6669#define _FILE_OFFSET_BITS 64
6670#include <sys/resource.h>
6671
Martin v. Löwis399a6892002-10-04 10:22:02 +00006672int
6673main ()
6674{
6675struct rlimit foo;
6676 ;
6677 return 0;
6678}
6679_ACEOF
6680rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006681if { (ac_try="$ac_compile"
6682case "(($ac_try" in
6683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6684 *) ac_try_echo=$ac_try;;
6685esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006687 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006688 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006689 grep -v '^ *+' conftest.er1 >conftest.err
6690 rm -f conftest.er1
6691 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006693 (exit $ac_status); } && {
6694 test -z "$ac_c_werror_flag" ||
6695 test ! -s conftest.err
6696 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006697 sol_lfs_bug=no
6698else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006699 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006700sed 's/^/| /' conftest.$ac_ext >&5
6701
Martin v. Löwiseba40652007-08-30 20:10:57 +00006702 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006703fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006704
6705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006706{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6707echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006708if test "$sol_lfs_bug" = "yes"; then
6709 use_lfs=no
6710fi
6711
6712if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006713# Two defines needed to enable largefile support on various platforms
6714# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006715
Martin v. Löwis11437992002-04-12 09:54:03 +00006716cat >>confdefs.h <<\_ACEOF
6717#define _LARGEFILE_SOURCE 1
6718_ACEOF
6719
6720
6721cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006722#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006723_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006724
Martin v. Löwis399a6892002-10-04 10:22:02 +00006725fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006726
Guido van Rossum84e7b241996-08-19 21:59:00 +00006727# Add some code to confdefs.h so that the test for off_t works on SCO
6728cat >> confdefs.h <<\EOF
6729#if defined(SCO_DS)
6730#undef _OFF_T
6731#endif
6732EOF
6733
Guido van Rossumef2255b2000-03-10 22:30:29 +00006734# Type availability checks
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006735{ echo "$as_me:$LINENO: checking for mode_t" >&5
6736echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006737if test "${ac_cv_type_mode_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006738 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006739else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006740 cat >conftest.$ac_ext <<_ACEOF
6741/* confdefs.h. */
6742_ACEOF
6743cat confdefs.h >>conftest.$ac_ext
6744cat >>conftest.$ac_ext <<_ACEOF
6745/* end confdefs.h. */
6746$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006747typedef mode_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006748int
6749main ()
6750{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006751if ((ac__type_new_ *) 0)
6752 return 0;
6753if (sizeof (ac__type_new_))
6754 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006755 ;
6756 return 0;
6757}
6758_ACEOF
6759rm -f conftest.$ac_objext
6760if { (ac_try="$ac_compile"
6761case "(($ac_try" in
6762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6763 *) ac_try_echo=$ac_try;;
6764esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006766 (eval "$ac_compile") 2>conftest.er1
6767 ac_status=$?
6768 grep -v '^ *+' conftest.er1 >conftest.err
6769 rm -f conftest.er1
6770 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006772 (exit $ac_status); } && {
6773 test -z "$ac_c_werror_flag" ||
6774 test ! -s conftest.err
6775 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006776 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006777else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006778 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006779sed 's/^/| /' conftest.$ac_ext >&5
6780
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006781 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006782fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006783
6784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006785fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006786{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6787echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6788if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006789 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006790else
Martin v. Löwis11437992002-04-12 09:54:03 +00006791
6792cat >>confdefs.h <<_ACEOF
6793#define mode_t int
6794_ACEOF
6795
6796fi
6797
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006798{ echo "$as_me:$LINENO: checking for off_t" >&5
6799echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006800if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006801 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006802else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006803 cat >conftest.$ac_ext <<_ACEOF
6804/* confdefs.h. */
6805_ACEOF
6806cat confdefs.h >>conftest.$ac_ext
6807cat >>conftest.$ac_ext <<_ACEOF
6808/* end confdefs.h. */
6809$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006810typedef off_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006811int
6812main ()
6813{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006814if ((ac__type_new_ *) 0)
6815 return 0;
6816if (sizeof (ac__type_new_))
6817 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006818 ;
6819 return 0;
6820}
6821_ACEOF
6822rm -f conftest.$ac_objext
6823if { (ac_try="$ac_compile"
6824case "(($ac_try" in
6825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6826 *) ac_try_echo=$ac_try;;
6827esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006829 (eval "$ac_compile") 2>conftest.er1
6830 ac_status=$?
6831 grep -v '^ *+' conftest.er1 >conftest.err
6832 rm -f conftest.er1
6833 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006835 (exit $ac_status); } && {
6836 test -z "$ac_c_werror_flag" ||
6837 test ! -s conftest.err
6838 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006839 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006840else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006842sed 's/^/| /' conftest.$ac_ext >&5
6843
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006844 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006845fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006846
6847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006848fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006849{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6850echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6851if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006852 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006853else
Martin v. Löwis11437992002-04-12 09:54:03 +00006854
6855cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006856#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006857_ACEOF
6858
6859fi
6860
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006861{ echo "$as_me:$LINENO: checking for pid_t" >&5
6862echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006863if test "${ac_cv_type_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006864 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006865else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006866 cat >conftest.$ac_ext <<_ACEOF
6867/* confdefs.h. */
6868_ACEOF
6869cat confdefs.h >>conftest.$ac_ext
6870cat >>conftest.$ac_ext <<_ACEOF
6871/* end confdefs.h. */
6872$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006873typedef pid_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006874int
6875main ()
6876{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006877if ((ac__type_new_ *) 0)
6878 return 0;
6879if (sizeof (ac__type_new_))
6880 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006881 ;
6882 return 0;
6883}
6884_ACEOF
6885rm -f conftest.$ac_objext
6886if { (ac_try="$ac_compile"
6887case "(($ac_try" in
6888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6889 *) ac_try_echo=$ac_try;;
6890esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006891eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006892 (eval "$ac_compile") 2>conftest.er1
6893 ac_status=$?
6894 grep -v '^ *+' conftest.er1 >conftest.err
6895 rm -f conftest.er1
6896 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006898 (exit $ac_status); } && {
6899 test -z "$ac_c_werror_flag" ||
6900 test ! -s conftest.err
6901 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006902 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006903else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006904 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006905sed 's/^/| /' conftest.$ac_ext >&5
6906
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006907 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006908fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006909
6910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006911fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006912{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6913echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6914if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006915 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006916else
Martin v. Löwis11437992002-04-12 09:54:03 +00006917
6918cat >>confdefs.h <<_ACEOF
6919#define pid_t int
6920_ACEOF
6921
6922fi
6923
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006924{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6925echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006926if test "${ac_cv_type_signal+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006927 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006928else
6929 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006930/* confdefs.h. */
6931_ACEOF
6932cat confdefs.h >>conftest.$ac_ext
6933cat >>conftest.$ac_ext <<_ACEOF
6934/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006935#include <sys/types.h>
6936#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006937
Martin v. Löwis11437992002-04-12 09:54:03 +00006938int
6939main ()
6940{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006941return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006942 ;
6943 return 0;
6944}
6945_ACEOF
6946rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006947if { (ac_try="$ac_compile"
6948case "(($ac_try" in
6949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6950 *) ac_try_echo=$ac_try;;
6951esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006953 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006954 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006955 grep -v '^ *+' conftest.er1 >conftest.err
6956 rm -f conftest.er1
6957 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006959 (exit $ac_status); } && {
6960 test -z "$ac_c_werror_flag" ||
6961 test ! -s conftest.err
6962 } && test -s conftest.$ac_objext; then
6963 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006964else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006965 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006966sed 's/^/| /' conftest.$ac_ext >&5
6967
Martin v. Löwiseba40652007-08-30 20:10:57 +00006968 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006969fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006970
6971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006972fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006973{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6974echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006975
Martin v. Löwis11437992002-04-12 09:54:03 +00006976cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006977#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006978_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006979
Michael W. Hudson54241132001-12-07 15:38:26 +00006980
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006981{ echo "$as_me:$LINENO: checking for size_t" >&5
6982echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006983if test "${ac_cv_type_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006984 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006985else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006986 cat >conftest.$ac_ext <<_ACEOF
6987/* confdefs.h. */
6988_ACEOF
6989cat confdefs.h >>conftest.$ac_ext
6990cat >>conftest.$ac_ext <<_ACEOF
6991/* end confdefs.h. */
6992$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006993typedef size_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006994int
6995main ()
6996{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006997if ((ac__type_new_ *) 0)
6998 return 0;
6999if (sizeof (ac__type_new_))
7000 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007001 ;
7002 return 0;
7003}
7004_ACEOF
7005rm -f conftest.$ac_objext
7006if { (ac_try="$ac_compile"
7007case "(($ac_try" in
7008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7009 *) ac_try_echo=$ac_try;;
7010esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007012 (eval "$ac_compile") 2>conftest.er1
7013 ac_status=$?
7014 grep -v '^ *+' conftest.er1 >conftest.err
7015 rm -f conftest.er1
7016 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007018 (exit $ac_status); } && {
7019 test -z "$ac_c_werror_flag" ||
7020 test ! -s conftest.err
7021 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007022 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007023else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007024 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007025sed 's/^/| /' conftest.$ac_ext >&5
7026
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007027 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007028fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007029
7030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007031fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007032{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7033echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7034if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007035 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007036else
Martin v. Löwis11437992002-04-12 09:54:03 +00007037
7038cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007039#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007040_ACEOF
7041
7042fi
7043
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007044{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7045echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007046if test "${ac_cv_type_uid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007047 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007048else
7049 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007050/* confdefs.h. */
7051_ACEOF
7052cat confdefs.h >>conftest.$ac_ext
7053cat >>conftest.$ac_ext <<_ACEOF
7054/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007055#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007056
7057_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007058if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007059 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007060 ac_cv_type_uid_t=yes
7061else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007062 ac_cv_type_uid_t=no
7063fi
Benjamin Peterson2c196742009-12-31 03:17:18 +00007064rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007065
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007066fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007067{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7068echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007069if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007070
Martin v. Löwis11437992002-04-12 09:54:03 +00007071cat >>confdefs.h <<\_ACEOF
7072#define uid_t int
7073_ACEOF
7074
7075
7076cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007077#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007078_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007079
7080fi
7081
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007082
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007083 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7084echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007085if test "${ac_cv_c_uint32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007086 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007087else
7088 ac_cv_c_uint32_t=no
7089 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7090 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7091 cat >conftest.$ac_ext <<_ACEOF
7092/* confdefs.h. */
7093_ACEOF
7094cat confdefs.h >>conftest.$ac_ext
7095cat >>conftest.$ac_ext <<_ACEOF
7096/* end confdefs.h. */
7097$ac_includes_default
7098int
7099main ()
7100{
7101static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7102test_array [0] = 0
7103
7104 ;
7105 return 0;
7106}
7107_ACEOF
7108rm -f conftest.$ac_objext
7109if { (ac_try="$ac_compile"
7110case "(($ac_try" in
7111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7112 *) ac_try_echo=$ac_try;;
7113esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007115 (eval "$ac_compile") 2>conftest.er1
7116 ac_status=$?
7117 grep -v '^ *+' conftest.er1 >conftest.err
7118 rm -f conftest.er1
7119 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007121 (exit $ac_status); } && {
7122 test -z "$ac_c_werror_flag" ||
7123 test ! -s conftest.err
7124 } && test -s conftest.$ac_objext; then
7125 case $ac_type in
7126 uint32_t) ac_cv_c_uint32_t=yes ;;
7127 *) ac_cv_c_uint32_t=$ac_type ;;
7128esac
7129
7130else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007131 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007132sed 's/^/| /' conftest.$ac_ext >&5
7133
7134
7135fi
7136
7137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7138 test "$ac_cv_c_uint32_t" != no && break
7139 done
7140fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007141{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7142echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007143 case $ac_cv_c_uint32_t in #(
7144 no|yes) ;; #(
7145 *)
7146
7147cat >>confdefs.h <<\_ACEOF
7148#define _UINT32_T 1
7149_ACEOF
7150
7151
7152cat >>confdefs.h <<_ACEOF
7153#define uint32_t $ac_cv_c_uint32_t
7154_ACEOF
7155;;
7156 esac
7157
7158
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007159 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7160echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007161if test "${ac_cv_c_uint64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007162 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007163else
7164 ac_cv_c_uint64_t=no
7165 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7166 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7167 cat >conftest.$ac_ext <<_ACEOF
7168/* confdefs.h. */
7169_ACEOF
7170cat confdefs.h >>conftest.$ac_ext
7171cat >>conftest.$ac_ext <<_ACEOF
7172/* end confdefs.h. */
7173$ac_includes_default
7174int
7175main ()
7176{
7177static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7178test_array [0] = 0
7179
7180 ;
7181 return 0;
7182}
7183_ACEOF
7184rm -f conftest.$ac_objext
7185if { (ac_try="$ac_compile"
7186case "(($ac_try" in
7187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7188 *) ac_try_echo=$ac_try;;
7189esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007191 (eval "$ac_compile") 2>conftest.er1
7192 ac_status=$?
7193 grep -v '^ *+' conftest.er1 >conftest.err
7194 rm -f conftest.er1
7195 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007197 (exit $ac_status); } && {
7198 test -z "$ac_c_werror_flag" ||
7199 test ! -s conftest.err
7200 } && test -s conftest.$ac_objext; then
7201 case $ac_type in
7202 uint64_t) ac_cv_c_uint64_t=yes ;;
7203 *) ac_cv_c_uint64_t=$ac_type ;;
7204esac
7205
7206else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007207 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007208sed 's/^/| /' conftest.$ac_ext >&5
7209
7210
7211fi
7212
7213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7214 test "$ac_cv_c_uint64_t" != no && break
7215 done
7216fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007217{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7218echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007219 case $ac_cv_c_uint64_t in #(
7220 no|yes) ;; #(
7221 *)
7222
7223cat >>confdefs.h <<\_ACEOF
7224#define _UINT64_T 1
7225_ACEOF
7226
7227
7228cat >>confdefs.h <<_ACEOF
7229#define uint64_t $ac_cv_c_uint64_t
7230_ACEOF
7231;;
7232 esac
7233
7234
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007235 { echo "$as_me:$LINENO: checking for int32_t" >&5
7236echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007237if test "${ac_cv_c_int32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007238 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007239else
7240 ac_cv_c_int32_t=no
7241 for ac_type in 'int32_t' 'int' 'long int' \
7242 'long long int' 'short int' 'signed char'; do
7243 cat >conftest.$ac_ext <<_ACEOF
7244/* confdefs.h. */
7245_ACEOF
7246cat confdefs.h >>conftest.$ac_ext
7247cat >>conftest.$ac_ext <<_ACEOF
7248/* end confdefs.h. */
7249$ac_includes_default
7250int
7251main ()
7252{
7253static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7254test_array [0] = 0
7255
7256 ;
7257 return 0;
7258}
7259_ACEOF
7260rm -f conftest.$ac_objext
7261if { (ac_try="$ac_compile"
7262case "(($ac_try" in
7263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7264 *) ac_try_echo=$ac_try;;
7265esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007266eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007267 (eval "$ac_compile") 2>conftest.er1
7268 ac_status=$?
7269 grep -v '^ *+' conftest.er1 >conftest.err
7270 rm -f conftest.er1
7271 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007273 (exit $ac_status); } && {
7274 test -z "$ac_c_werror_flag" ||
7275 test ! -s conftest.err
7276 } && test -s conftest.$ac_objext; then
7277 cat >conftest.$ac_ext <<_ACEOF
7278/* confdefs.h. */
7279_ACEOF
7280cat confdefs.h >>conftest.$ac_ext
7281cat >>conftest.$ac_ext <<_ACEOF
7282/* end confdefs.h. */
7283$ac_includes_default
7284int
7285main ()
7286{
7287static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007288 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007289test_array [0] = 0
7290
7291 ;
7292 return 0;
7293}
7294_ACEOF
7295rm -f conftest.$ac_objext
7296if { (ac_try="$ac_compile"
7297case "(($ac_try" in
7298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7299 *) ac_try_echo=$ac_try;;
7300esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007302 (eval "$ac_compile") 2>conftest.er1
7303 ac_status=$?
7304 grep -v '^ *+' conftest.er1 >conftest.err
7305 rm -f conftest.er1
7306 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007308 (exit $ac_status); } && {
7309 test -z "$ac_c_werror_flag" ||
7310 test ! -s conftest.err
7311 } && test -s conftest.$ac_objext; then
7312 :
7313else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007314 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007315sed 's/^/| /' conftest.$ac_ext >&5
7316
7317 case $ac_type in
7318 int32_t) ac_cv_c_int32_t=yes ;;
7319 *) ac_cv_c_int32_t=$ac_type ;;
7320esac
7321
7322fi
7323
7324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7325else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007326 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007327sed 's/^/| /' conftest.$ac_ext >&5
7328
7329
7330fi
7331
7332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7333 test "$ac_cv_c_int32_t" != no && break
7334 done
7335fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007336{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7337echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007338 case $ac_cv_c_int32_t in #(
7339 no|yes) ;; #(
7340 *)
7341
7342cat >>confdefs.h <<_ACEOF
7343#define int32_t $ac_cv_c_int32_t
7344_ACEOF
7345;;
7346 esac
7347
7348
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007349 { echo "$as_me:$LINENO: checking for int64_t" >&5
7350echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007351if test "${ac_cv_c_int64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007352 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007353else
7354 ac_cv_c_int64_t=no
7355 for ac_type in 'int64_t' 'int' 'long int' \
7356 'long long int' 'short int' 'signed char'; do
7357 cat >conftest.$ac_ext <<_ACEOF
7358/* confdefs.h. */
7359_ACEOF
7360cat confdefs.h >>conftest.$ac_ext
7361cat >>conftest.$ac_ext <<_ACEOF
7362/* end confdefs.h. */
7363$ac_includes_default
7364int
7365main ()
7366{
7367static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7368test_array [0] = 0
7369
7370 ;
7371 return 0;
7372}
7373_ACEOF
7374rm -f conftest.$ac_objext
7375if { (ac_try="$ac_compile"
7376case "(($ac_try" in
7377 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7378 *) ac_try_echo=$ac_try;;
7379esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007380eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007381 (eval "$ac_compile") 2>conftest.er1
7382 ac_status=$?
7383 grep -v '^ *+' conftest.er1 >conftest.err
7384 rm -f conftest.er1
7385 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007387 (exit $ac_status); } && {
7388 test -z "$ac_c_werror_flag" ||
7389 test ! -s conftest.err
7390 } && test -s conftest.$ac_objext; then
7391 cat >conftest.$ac_ext <<_ACEOF
7392/* confdefs.h. */
7393_ACEOF
7394cat confdefs.h >>conftest.$ac_ext
7395cat >>conftest.$ac_ext <<_ACEOF
7396/* end confdefs.h. */
7397$ac_includes_default
7398int
7399main ()
7400{
7401static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007402 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007403test_array [0] = 0
7404
7405 ;
7406 return 0;
7407}
7408_ACEOF
7409rm -f conftest.$ac_objext
7410if { (ac_try="$ac_compile"
7411case "(($ac_try" in
7412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7413 *) ac_try_echo=$ac_try;;
7414esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007416 (eval "$ac_compile") 2>conftest.er1
7417 ac_status=$?
7418 grep -v '^ *+' conftest.er1 >conftest.err
7419 rm -f conftest.er1
7420 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007422 (exit $ac_status); } && {
7423 test -z "$ac_c_werror_flag" ||
7424 test ! -s conftest.err
7425 } && test -s conftest.$ac_objext; then
7426 :
7427else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007428 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007429sed 's/^/| /' conftest.$ac_ext >&5
7430
7431 case $ac_type in
7432 int64_t) ac_cv_c_int64_t=yes ;;
7433 *) ac_cv_c_int64_t=$ac_type ;;
7434esac
7435
7436fi
7437
7438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7439else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007440 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007441sed 's/^/| /' conftest.$ac_ext >&5
7442
7443
7444fi
7445
7446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7447 test "$ac_cv_c_int64_t" != no && break
7448 done
7449fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007450{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7451echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007452 case $ac_cv_c_int64_t in #(
7453 no|yes) ;; #(
7454 *)
7455
7456cat >>confdefs.h <<_ACEOF
7457#define int64_t $ac_cv_c_int64_t
7458_ACEOF
7459;;
7460 esac
7461
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007462{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7463echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007464if test "${ac_cv_type_ssize_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007465 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007466else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007467 cat >conftest.$ac_ext <<_ACEOF
7468/* confdefs.h. */
7469_ACEOF
7470cat confdefs.h >>conftest.$ac_ext
7471cat >>conftest.$ac_ext <<_ACEOF
7472/* end confdefs.h. */
7473$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007474typedef ssize_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007475int
7476main ()
7477{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007478if ((ac__type_new_ *) 0)
7479 return 0;
7480if (sizeof (ac__type_new_))
7481 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007482 ;
7483 return 0;
7484}
7485_ACEOF
7486rm -f conftest.$ac_objext
7487if { (ac_try="$ac_compile"
7488case "(($ac_try" in
7489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7490 *) ac_try_echo=$ac_try;;
7491esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007493 (eval "$ac_compile") 2>conftest.er1
7494 ac_status=$?
7495 grep -v '^ *+' conftest.er1 >conftest.err
7496 rm -f conftest.er1
7497 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007499 (exit $ac_status); } && {
7500 test -z "$ac_c_werror_flag" ||
7501 test ! -s conftest.err
7502 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007503 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007504else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007505 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007506sed 's/^/| /' conftest.$ac_ext >&5
7507
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007508 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007509fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007510
7511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007512fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007513{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7514echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7515if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007516
7517cat >>confdefs.h <<\_ACEOF
7518#define HAVE_SSIZE_T 1
7519_ACEOF
7520
7521fi
7522
Jack Jansendd19cf82001-12-06 22:36:17 +00007523
Michael W. Hudson54241132001-12-07 15:38:26 +00007524# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007525# ANSI C requires sizeof(char) == 1, so no need to check it
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007526{ echo "$as_me:$LINENO: checking for int" >&5
7527echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7528if test "${ac_cv_type_int+set}" = set; then
7529 echo $ECHO_N "(cached) $ECHO_C" >&6
7530else
7531 cat >conftest.$ac_ext <<_ACEOF
7532/* confdefs.h. */
7533_ACEOF
7534cat confdefs.h >>conftest.$ac_ext
7535cat >>conftest.$ac_ext <<_ACEOF
7536/* end confdefs.h. */
7537$ac_includes_default
7538typedef int ac__type_new_;
7539int
7540main ()
7541{
7542if ((ac__type_new_ *) 0)
7543 return 0;
7544if (sizeof (ac__type_new_))
7545 return 0;
7546 ;
7547 return 0;
7548}
7549_ACEOF
7550rm -f conftest.$ac_objext
7551if { (ac_try="$ac_compile"
7552case "(($ac_try" in
7553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7554 *) ac_try_echo=$ac_try;;
7555esac
7556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7557 (eval "$ac_compile") 2>conftest.er1
7558 ac_status=$?
7559 grep -v '^ *+' conftest.er1 >conftest.err
7560 rm -f conftest.er1
7561 cat conftest.err >&5
7562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7563 (exit $ac_status); } && {
7564 test -z "$ac_c_werror_flag" ||
7565 test ! -s conftest.err
7566 } && test -s conftest.$ac_objext; then
7567 ac_cv_type_int=yes
7568else
7569 echo "$as_me: failed program was:" >&5
7570sed 's/^/| /' conftest.$ac_ext >&5
7571
7572 ac_cv_type_int=no
7573fi
7574
7575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7576fi
7577{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7578echo "${ECHO_T}$ac_cv_type_int" >&6; }
7579
Martin v. Löwiseba40652007-08-30 20:10:57 +00007580# The cast to long int works around a bug in the HP C Compiler
7581# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7582# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7583# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007584{ echo "$as_me:$LINENO: checking size of int" >&5
7585echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007586if test "${ac_cv_sizeof_int+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007587 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007588else
Martin v. Löwis11437992002-04-12 09:54:03 +00007589 if test "$cross_compiling" = yes; then
7590 # Depending upon the size, compute the lo and hi bounds.
7591cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007592/* confdefs.h. */
7593_ACEOF
7594cat confdefs.h >>conftest.$ac_ext
7595cat >>conftest.$ac_ext <<_ACEOF
7596/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007597$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007598 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007599int
7600main ()
7601{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007602static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007603test_array [0] = 0
7604
7605 ;
7606 return 0;
7607}
7608_ACEOF
7609rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007610if { (ac_try="$ac_compile"
7611case "(($ac_try" in
7612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7613 *) ac_try_echo=$ac_try;;
7614esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007616 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007617 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007618 grep -v '^ *+' conftest.er1 >conftest.err
7619 rm -f conftest.er1
7620 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007622 (exit $ac_status); } && {
7623 test -z "$ac_c_werror_flag" ||
7624 test ! -s conftest.err
7625 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007626 ac_lo=0 ac_mid=0
7627 while :; do
7628 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007629/* confdefs.h. */
7630_ACEOF
7631cat confdefs.h >>conftest.$ac_ext
7632cat >>conftest.$ac_ext <<_ACEOF
7633/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007634$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007635 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007636int
7637main ()
7638{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007639static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007640test_array [0] = 0
7641
7642 ;
7643 return 0;
7644}
7645_ACEOF
7646rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007647if { (ac_try="$ac_compile"
7648case "(($ac_try" in
7649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7650 *) ac_try_echo=$ac_try;;
7651esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007652eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007653 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007654 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007655 grep -v '^ *+' conftest.er1 >conftest.err
7656 rm -f conftest.er1
7657 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007659 (exit $ac_status); } && {
7660 test -z "$ac_c_werror_flag" ||
7661 test ! -s conftest.err
7662 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007663 ac_hi=$ac_mid; break
7664else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007665 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007666sed 's/^/| /' conftest.$ac_ext >&5
7667
Martin v. Löwiseba40652007-08-30 20:10:57 +00007668 ac_lo=`expr $ac_mid + 1`
7669 if test $ac_lo -le $ac_mid; then
7670 ac_lo= ac_hi=
7671 break
7672 fi
7673 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007674fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007675
7676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007677 done
7678else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007679 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007680sed 's/^/| /' conftest.$ac_ext >&5
7681
Martin v. Löwiseba40652007-08-30 20:10:57 +00007682 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007683/* confdefs.h. */
7684_ACEOF
7685cat confdefs.h >>conftest.$ac_ext
7686cat >>conftest.$ac_ext <<_ACEOF
7687/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007688$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007689 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007690int
7691main ()
7692{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007693static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007694test_array [0] = 0
7695
7696 ;
7697 return 0;
7698}
7699_ACEOF
7700rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007701if { (ac_try="$ac_compile"
7702case "(($ac_try" in
7703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7704 *) ac_try_echo=$ac_try;;
7705esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007707 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007708 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007709 grep -v '^ *+' conftest.er1 >conftest.err
7710 rm -f conftest.er1
7711 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007713 (exit $ac_status); } && {
7714 test -z "$ac_c_werror_flag" ||
7715 test ! -s conftest.err
7716 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007717 ac_hi=-1 ac_mid=-1
7718 while :; do
7719 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007720/* confdefs.h. */
7721_ACEOF
7722cat confdefs.h >>conftest.$ac_ext
7723cat >>conftest.$ac_ext <<_ACEOF
7724/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007725$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007726 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007727int
7728main ()
7729{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007730static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007731test_array [0] = 0
7732
7733 ;
7734 return 0;
7735}
7736_ACEOF
7737rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007738if { (ac_try="$ac_compile"
7739case "(($ac_try" in
7740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7741 *) ac_try_echo=$ac_try;;
7742esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007744 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007745 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007746 grep -v '^ *+' conftest.er1 >conftest.err
7747 rm -f conftest.er1
7748 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007750 (exit $ac_status); } && {
7751 test -z "$ac_c_werror_flag" ||
7752 test ! -s conftest.err
7753 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007754 ac_lo=$ac_mid; break
7755else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007756 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007757sed 's/^/| /' conftest.$ac_ext >&5
7758
Martin v. Löwiseba40652007-08-30 20:10:57 +00007759 ac_hi=`expr '(' $ac_mid ')' - 1`
7760 if test $ac_mid -le $ac_hi; then
7761 ac_lo= ac_hi=
7762 break
7763 fi
7764 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007765fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007766
7767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007768 done
7769else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007770 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007771sed 's/^/| /' conftest.$ac_ext >&5
7772
Martin v. Löwiseba40652007-08-30 20:10:57 +00007773 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007774fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007775
7776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007777fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007778
7779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007780# Binary search between lo and hi bounds.
7781while test "x$ac_lo" != "x$ac_hi"; do
7782 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7783 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007784/* confdefs.h. */
7785_ACEOF
7786cat confdefs.h >>conftest.$ac_ext
7787cat >>conftest.$ac_ext <<_ACEOF
7788/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007789$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007790 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007791int
7792main ()
7793{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007794static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007795test_array [0] = 0
7796
7797 ;
7798 return 0;
7799}
7800_ACEOF
7801rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007802if { (ac_try="$ac_compile"
7803case "(($ac_try" in
7804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7805 *) ac_try_echo=$ac_try;;
7806esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007808 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007809 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007810 grep -v '^ *+' conftest.er1 >conftest.err
7811 rm -f conftest.er1
7812 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007814 (exit $ac_status); } && {
7815 test -z "$ac_c_werror_flag" ||
7816 test ! -s conftest.err
7817 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007818 ac_hi=$ac_mid
7819else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007820 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007821sed 's/^/| /' conftest.$ac_ext >&5
7822
Martin v. Löwiseba40652007-08-30 20:10:57 +00007823 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007824fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007825
7826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007827done
7828case $ac_lo in
7829?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007830'') if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007831 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007832See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007833echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007834See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007835 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007836 else
7837 ac_cv_sizeof_int=0
7838 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007839esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007840else
Martin v. Löwis11437992002-04-12 09:54:03 +00007841 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007842/* confdefs.h. */
7843_ACEOF
7844cat confdefs.h >>conftest.$ac_ext
7845cat >>conftest.$ac_ext <<_ACEOF
7846/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007847$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007848 typedef int ac__type_sizeof_;
7849static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7850static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007851#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007852#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007853int
7854main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007855{
Martin v. Löwis11437992002-04-12 09:54:03 +00007856
7857 FILE *f = fopen ("conftest.val", "w");
7858 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007859 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007860 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007861 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007862 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007863 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007864 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007865 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007866 }
7867 else
7868 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007869 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007870 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007871 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007872 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007873 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007874 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007875
7876 ;
7877 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007878}
Martin v. Löwis11437992002-04-12 09:54:03 +00007879_ACEOF
7880rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007881if { (ac_try="$ac_link"
7882case "(($ac_try" in
7883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7884 *) ac_try_echo=$ac_try;;
7885esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007887 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007888 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007890 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007891 { (case "(($ac_try" in
7892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7893 *) ac_try_echo=$ac_try;;
7894esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007896 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007897 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007899 (exit $ac_status); }; }; then
7900 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007901else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007902 echo "$as_me: program exited with status $ac_status" >&5
7903echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007904sed 's/^/| /' conftest.$ac_ext >&5
7905
Martin v. Löwis11437992002-04-12 09:54:03 +00007906( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007907if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007908 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007909See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007910echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007911See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007912 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007913 else
7914 ac_cv_sizeof_int=0
7915 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007916fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007917rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007918fi
7919rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007920fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007921{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7922echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007923
7924
7925
Martin v. Löwis11437992002-04-12 09:54:03 +00007926cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007927#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007928_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007929
7930
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007931{ echo "$as_me:$LINENO: checking for long" >&5
7932echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7933if test "${ac_cv_type_long+set}" = set; then
7934 echo $ECHO_N "(cached) $ECHO_C" >&6
7935else
7936 cat >conftest.$ac_ext <<_ACEOF
7937/* confdefs.h. */
7938_ACEOF
7939cat confdefs.h >>conftest.$ac_ext
7940cat >>conftest.$ac_ext <<_ACEOF
7941/* end confdefs.h. */
7942$ac_includes_default
7943typedef long ac__type_new_;
7944int
7945main ()
7946{
7947if ((ac__type_new_ *) 0)
7948 return 0;
7949if (sizeof (ac__type_new_))
7950 return 0;
7951 ;
7952 return 0;
7953}
7954_ACEOF
7955rm -f conftest.$ac_objext
7956if { (ac_try="$ac_compile"
7957case "(($ac_try" in
7958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7959 *) ac_try_echo=$ac_try;;
7960esac
7961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7962 (eval "$ac_compile") 2>conftest.er1
7963 ac_status=$?
7964 grep -v '^ *+' conftest.er1 >conftest.err
7965 rm -f conftest.er1
7966 cat conftest.err >&5
7967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7968 (exit $ac_status); } && {
7969 test -z "$ac_c_werror_flag" ||
7970 test ! -s conftest.err
7971 } && test -s conftest.$ac_objext; then
7972 ac_cv_type_long=yes
7973else
7974 echo "$as_me: failed program was:" >&5
7975sed 's/^/| /' conftest.$ac_ext >&5
7976
7977 ac_cv_type_long=no
7978fi
7979
7980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7981fi
7982{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7983echo "${ECHO_T}$ac_cv_type_long" >&6; }
7984
Martin v. Löwiseba40652007-08-30 20:10:57 +00007985# The cast to long int works around a bug in the HP C Compiler
7986# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7987# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7988# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007989{ echo "$as_me:$LINENO: checking size of long" >&5
7990echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007991if test "${ac_cv_sizeof_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007992 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007993else
Martin v. Löwis11437992002-04-12 09:54:03 +00007994 if test "$cross_compiling" = yes; then
7995 # Depending upon the size, compute the lo and hi bounds.
7996cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007997/* confdefs.h. */
7998_ACEOF
7999cat confdefs.h >>conftest.$ac_ext
8000cat >>conftest.$ac_ext <<_ACEOF
8001/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008002$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008003 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008004int
8005main ()
8006{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008007static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008008test_array [0] = 0
8009
8010 ;
8011 return 0;
8012}
8013_ACEOF
8014rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008015if { (ac_try="$ac_compile"
8016case "(($ac_try" in
8017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8018 *) ac_try_echo=$ac_try;;
8019esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008021 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008022 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008023 grep -v '^ *+' conftest.er1 >conftest.err
8024 rm -f conftest.er1
8025 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008027 (exit $ac_status); } && {
8028 test -z "$ac_c_werror_flag" ||
8029 test ! -s conftest.err
8030 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008031 ac_lo=0 ac_mid=0
8032 while :; do
8033 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008034/* confdefs.h. */
8035_ACEOF
8036cat confdefs.h >>conftest.$ac_ext
8037cat >>conftest.$ac_ext <<_ACEOF
8038/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008039$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008040 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008041int
8042main ()
8043{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008044static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008045test_array [0] = 0
8046
8047 ;
8048 return 0;
8049}
8050_ACEOF
8051rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008052if { (ac_try="$ac_compile"
8053case "(($ac_try" in
8054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8055 *) ac_try_echo=$ac_try;;
8056esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008058 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008059 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008060 grep -v '^ *+' conftest.er1 >conftest.err
8061 rm -f conftest.er1
8062 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008064 (exit $ac_status); } && {
8065 test -z "$ac_c_werror_flag" ||
8066 test ! -s conftest.err
8067 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008068 ac_hi=$ac_mid; break
8069else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008070 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008071sed 's/^/| /' conftest.$ac_ext >&5
8072
Martin v. Löwiseba40652007-08-30 20:10:57 +00008073 ac_lo=`expr $ac_mid + 1`
8074 if test $ac_lo -le $ac_mid; then
8075 ac_lo= ac_hi=
8076 break
8077 fi
8078 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008079fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008080
8081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008082 done
8083else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008084 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008085sed 's/^/| /' conftest.$ac_ext >&5
8086
Martin v. Löwiseba40652007-08-30 20:10:57 +00008087 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008088/* confdefs.h. */
8089_ACEOF
8090cat confdefs.h >>conftest.$ac_ext
8091cat >>conftest.$ac_ext <<_ACEOF
8092/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008093$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008094 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008095int
8096main ()
8097{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008098static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008099test_array [0] = 0
8100
8101 ;
8102 return 0;
8103}
8104_ACEOF
8105rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008106if { (ac_try="$ac_compile"
8107case "(($ac_try" in
8108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8109 *) ac_try_echo=$ac_try;;
8110esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008112 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008113 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008114 grep -v '^ *+' conftest.er1 >conftest.err
8115 rm -f conftest.er1
8116 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008118 (exit $ac_status); } && {
8119 test -z "$ac_c_werror_flag" ||
8120 test ! -s conftest.err
8121 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008122 ac_hi=-1 ac_mid=-1
8123 while :; do
8124 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008125/* confdefs.h. */
8126_ACEOF
8127cat confdefs.h >>conftest.$ac_ext
8128cat >>conftest.$ac_ext <<_ACEOF
8129/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008130$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008131 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008132int
8133main ()
8134{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008135static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008136test_array [0] = 0
8137
8138 ;
8139 return 0;
8140}
8141_ACEOF
8142rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008143if { (ac_try="$ac_compile"
8144case "(($ac_try" in
8145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8146 *) ac_try_echo=$ac_try;;
8147esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008149 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008150 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008151 grep -v '^ *+' conftest.er1 >conftest.err
8152 rm -f conftest.er1
8153 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008155 (exit $ac_status); } && {
8156 test -z "$ac_c_werror_flag" ||
8157 test ! -s conftest.err
8158 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008159 ac_lo=$ac_mid; break
8160else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008161 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008162sed 's/^/| /' conftest.$ac_ext >&5
8163
Martin v. Löwiseba40652007-08-30 20:10:57 +00008164 ac_hi=`expr '(' $ac_mid ')' - 1`
8165 if test $ac_mid -le $ac_hi; then
8166 ac_lo= ac_hi=
8167 break
8168 fi
8169 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008170fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008171
8172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008173 done
8174else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008176sed 's/^/| /' conftest.$ac_ext >&5
8177
Martin v. Löwiseba40652007-08-30 20:10:57 +00008178 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008179fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008180
8181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008182fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008183
8184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008185# Binary search between lo and hi bounds.
8186while test "x$ac_lo" != "x$ac_hi"; do
8187 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8188 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008189/* confdefs.h. */
8190_ACEOF
8191cat confdefs.h >>conftest.$ac_ext
8192cat >>conftest.$ac_ext <<_ACEOF
8193/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008194$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008195 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008196int
8197main ()
8198{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008199static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008200test_array [0] = 0
8201
8202 ;
8203 return 0;
8204}
8205_ACEOF
8206rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008207if { (ac_try="$ac_compile"
8208case "(($ac_try" in
8209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8210 *) ac_try_echo=$ac_try;;
8211esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008212eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008213 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008214 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008215 grep -v '^ *+' conftest.er1 >conftest.err
8216 rm -f conftest.er1
8217 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008219 (exit $ac_status); } && {
8220 test -z "$ac_c_werror_flag" ||
8221 test ! -s conftest.err
8222 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008223 ac_hi=$ac_mid
8224else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008225 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008226sed 's/^/| /' conftest.$ac_ext >&5
8227
Martin v. Löwiseba40652007-08-30 20:10:57 +00008228 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008229fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008230
8231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008232done
8233case $ac_lo in
8234?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008235'') if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008236 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008237See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008238echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008239See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008240 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008241 else
8242 ac_cv_sizeof_long=0
8243 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008244esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008245else
Martin v. Löwis11437992002-04-12 09:54:03 +00008246 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008247/* confdefs.h. */
8248_ACEOF
8249cat confdefs.h >>conftest.$ac_ext
8250cat >>conftest.$ac_ext <<_ACEOF
8251/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008252$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008253 typedef long ac__type_sizeof_;
8254static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8255static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008256#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008257#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008258int
8259main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008260{
Martin v. Löwis11437992002-04-12 09:54:03 +00008261
8262 FILE *f = fopen ("conftest.val", "w");
8263 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008264 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008265 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008266 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008267 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008268 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008269 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008270 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008271 }
8272 else
8273 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008274 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008275 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008276 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008277 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008278 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008279 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008280
8281 ;
8282 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008283}
Martin v. Löwis11437992002-04-12 09:54:03 +00008284_ACEOF
8285rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008286if { (ac_try="$ac_link"
8287case "(($ac_try" in
8288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8289 *) ac_try_echo=$ac_try;;
8290esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008292 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008293 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008295 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008296 { (case "(($ac_try" in
8297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8298 *) ac_try_echo=$ac_try;;
8299esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008301 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008302 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008304 (exit $ac_status); }; }; then
8305 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008306else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008307 echo "$as_me: program exited with status $ac_status" >&5
8308echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008309sed 's/^/| /' conftest.$ac_ext >&5
8310
Martin v. Löwis11437992002-04-12 09:54:03 +00008311( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008312if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008313 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008314See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008315echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008316See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008317 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008318 else
8319 ac_cv_sizeof_long=0
8320 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008321fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008322rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008323fi
8324rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008325fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008326{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8327echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008328
8329
8330
Martin v. Löwis11437992002-04-12 09:54:03 +00008331cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008332#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008333_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008334
8335
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008336{ echo "$as_me:$LINENO: checking for void *" >&5
8337echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8338if test "${ac_cv_type_void_p+set}" = set; then
8339 echo $ECHO_N "(cached) $ECHO_C" >&6
8340else
8341 cat >conftest.$ac_ext <<_ACEOF
8342/* confdefs.h. */
8343_ACEOF
8344cat confdefs.h >>conftest.$ac_ext
8345cat >>conftest.$ac_ext <<_ACEOF
8346/* end confdefs.h. */
8347$ac_includes_default
8348typedef void * ac__type_new_;
8349int
8350main ()
8351{
8352if ((ac__type_new_ *) 0)
8353 return 0;
8354if (sizeof (ac__type_new_))
8355 return 0;
8356 ;
8357 return 0;
8358}
8359_ACEOF
8360rm -f conftest.$ac_objext
8361if { (ac_try="$ac_compile"
8362case "(($ac_try" in
8363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8364 *) ac_try_echo=$ac_try;;
8365esac
8366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8367 (eval "$ac_compile") 2>conftest.er1
8368 ac_status=$?
8369 grep -v '^ *+' conftest.er1 >conftest.err
8370 rm -f conftest.er1
8371 cat conftest.err >&5
8372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8373 (exit $ac_status); } && {
8374 test -z "$ac_c_werror_flag" ||
8375 test ! -s conftest.err
8376 } && test -s conftest.$ac_objext; then
8377 ac_cv_type_void_p=yes
8378else
8379 echo "$as_me: failed program was:" >&5
8380sed 's/^/| /' conftest.$ac_ext >&5
8381
8382 ac_cv_type_void_p=no
8383fi
8384
8385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8386fi
8387{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8388echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8389
Martin v. Löwiseba40652007-08-30 20:10:57 +00008390# The cast to long int works around a bug in the HP C Compiler
8391# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8392# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8393# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008394{ echo "$as_me:$LINENO: checking size of void *" >&5
8395echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008396if test "${ac_cv_sizeof_void_p+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008397 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008398else
Martin v. Löwis11437992002-04-12 09:54:03 +00008399 if test "$cross_compiling" = yes; then
8400 # Depending upon the size, compute the lo and hi bounds.
8401cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008402/* confdefs.h. */
8403_ACEOF
8404cat confdefs.h >>conftest.$ac_ext
8405cat >>conftest.$ac_ext <<_ACEOF
8406/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008407$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008408 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008409int
8410main ()
8411{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008412static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008413test_array [0] = 0
8414
8415 ;
8416 return 0;
8417}
8418_ACEOF
8419rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008420if { (ac_try="$ac_compile"
8421case "(($ac_try" in
8422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8423 *) ac_try_echo=$ac_try;;
8424esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008426 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008427 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008428 grep -v '^ *+' conftest.er1 >conftest.err
8429 rm -f conftest.er1
8430 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008432 (exit $ac_status); } && {
8433 test -z "$ac_c_werror_flag" ||
8434 test ! -s conftest.err
8435 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008436 ac_lo=0 ac_mid=0
8437 while :; do
8438 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008439/* confdefs.h. */
8440_ACEOF
8441cat confdefs.h >>conftest.$ac_ext
8442cat >>conftest.$ac_ext <<_ACEOF
8443/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008444$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008445 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008446int
8447main ()
8448{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008449static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008450test_array [0] = 0
8451
8452 ;
8453 return 0;
8454}
8455_ACEOF
8456rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008457if { (ac_try="$ac_compile"
8458case "(($ac_try" in
8459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8460 *) ac_try_echo=$ac_try;;
8461esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008463 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008464 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008465 grep -v '^ *+' conftest.er1 >conftest.err
8466 rm -f conftest.er1
8467 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008469 (exit $ac_status); } && {
8470 test -z "$ac_c_werror_flag" ||
8471 test ! -s conftest.err
8472 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008473 ac_hi=$ac_mid; break
8474else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008475 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008476sed 's/^/| /' conftest.$ac_ext >&5
8477
Martin v. Löwiseba40652007-08-30 20:10:57 +00008478 ac_lo=`expr $ac_mid + 1`
8479 if test $ac_lo -le $ac_mid; then
8480 ac_lo= ac_hi=
8481 break
8482 fi
8483 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008484fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008485
8486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008487 done
8488else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008489 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008490sed 's/^/| /' conftest.$ac_ext >&5
8491
Martin v. Löwiseba40652007-08-30 20:10:57 +00008492 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008493/* confdefs.h. */
8494_ACEOF
8495cat confdefs.h >>conftest.$ac_ext
8496cat >>conftest.$ac_ext <<_ACEOF
8497/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008498$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008499 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008500int
8501main ()
8502{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008503static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008504test_array [0] = 0
8505
8506 ;
8507 return 0;
8508}
8509_ACEOF
8510rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008511if { (ac_try="$ac_compile"
8512case "(($ac_try" in
8513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8514 *) ac_try_echo=$ac_try;;
8515esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008517 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008518 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008519 grep -v '^ *+' conftest.er1 >conftest.err
8520 rm -f conftest.er1
8521 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008523 (exit $ac_status); } && {
8524 test -z "$ac_c_werror_flag" ||
8525 test ! -s conftest.err
8526 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008527 ac_hi=-1 ac_mid=-1
8528 while :; do
8529 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008530/* confdefs.h. */
8531_ACEOF
8532cat confdefs.h >>conftest.$ac_ext
8533cat >>conftest.$ac_ext <<_ACEOF
8534/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008535$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008536 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008537int
8538main ()
8539{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008540static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008541test_array [0] = 0
8542
8543 ;
8544 return 0;
8545}
8546_ACEOF
8547rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008548if { (ac_try="$ac_compile"
8549case "(($ac_try" in
8550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8551 *) ac_try_echo=$ac_try;;
8552esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008553eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008554 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008555 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008556 grep -v '^ *+' conftest.er1 >conftest.err
8557 rm -f conftest.er1
8558 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008560 (exit $ac_status); } && {
8561 test -z "$ac_c_werror_flag" ||
8562 test ! -s conftest.err
8563 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008564 ac_lo=$ac_mid; break
8565else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008566 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008567sed 's/^/| /' conftest.$ac_ext >&5
8568
Martin v. Löwiseba40652007-08-30 20:10:57 +00008569 ac_hi=`expr '(' $ac_mid ')' - 1`
8570 if test $ac_mid -le $ac_hi; then
8571 ac_lo= ac_hi=
8572 break
8573 fi
8574 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008575fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008576
8577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008578 done
8579else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008580 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008581sed 's/^/| /' conftest.$ac_ext >&5
8582
Martin v. Löwiseba40652007-08-30 20:10:57 +00008583 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008584fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008585
8586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008587fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008588
8589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008590# Binary search between lo and hi bounds.
8591while test "x$ac_lo" != "x$ac_hi"; do
8592 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8593 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008594/* confdefs.h. */
8595_ACEOF
8596cat confdefs.h >>conftest.$ac_ext
8597cat >>conftest.$ac_ext <<_ACEOF
8598/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008599$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008600 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008601int
8602main ()
8603{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008604static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008605test_array [0] = 0
8606
8607 ;
8608 return 0;
8609}
8610_ACEOF
8611rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008612if { (ac_try="$ac_compile"
8613case "(($ac_try" in
8614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8615 *) ac_try_echo=$ac_try;;
8616esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008618 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008619 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008620 grep -v '^ *+' conftest.er1 >conftest.err
8621 rm -f conftest.er1
8622 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008624 (exit $ac_status); } && {
8625 test -z "$ac_c_werror_flag" ||
8626 test ! -s conftest.err
8627 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008628 ac_hi=$ac_mid
8629else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008630 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008631sed 's/^/| /' conftest.$ac_ext >&5
8632
Martin v. Löwiseba40652007-08-30 20:10:57 +00008633 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008634fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008635
8636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008637done
8638case $ac_lo in
8639?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008640'') if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008641 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008642See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008643echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008644See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008645 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008646 else
8647 ac_cv_sizeof_void_p=0
8648 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008649esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008650else
Martin v. Löwis11437992002-04-12 09:54:03 +00008651 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008652/* confdefs.h. */
8653_ACEOF
8654cat confdefs.h >>conftest.$ac_ext
8655cat >>conftest.$ac_ext <<_ACEOF
8656/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008657$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008658 typedef void * ac__type_sizeof_;
8659static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8660static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008661#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008662#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008663int
8664main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008665{
Martin v. Löwis11437992002-04-12 09:54:03 +00008666
8667 FILE *f = fopen ("conftest.val", "w");
8668 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008669 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008670 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008671 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008672 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008673 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008674 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008675 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008676 }
8677 else
8678 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008679 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008680 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008681 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008682 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008683 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008684 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008685
8686 ;
8687 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008688}
Martin v. Löwis11437992002-04-12 09:54:03 +00008689_ACEOF
8690rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008691if { (ac_try="$ac_link"
8692case "(($ac_try" in
8693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8694 *) ac_try_echo=$ac_try;;
8695esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008697 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008698 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008700 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008701 { (case "(($ac_try" in
8702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8703 *) ac_try_echo=$ac_try;;
8704esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008706 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008707 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008709 (exit $ac_status); }; }; then
8710 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008711else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008712 echo "$as_me: program exited with status $ac_status" >&5
8713echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008714sed 's/^/| /' conftest.$ac_ext >&5
8715
Martin v. Löwis11437992002-04-12 09:54:03 +00008716( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008717if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008718 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008719See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008720echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008721See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008722 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008723 else
8724 ac_cv_sizeof_void_p=0
8725 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008726fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008727rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008728fi
8729rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008730fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008731{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8732echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008733
8734
8735
Martin v. Löwis11437992002-04-12 09:54:03 +00008736cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008737#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008738_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008739
8740
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008741{ echo "$as_me:$LINENO: checking for short" >&5
8742echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8743if test "${ac_cv_type_short+set}" = set; then
8744 echo $ECHO_N "(cached) $ECHO_C" >&6
8745else
8746 cat >conftest.$ac_ext <<_ACEOF
8747/* confdefs.h. */
8748_ACEOF
8749cat confdefs.h >>conftest.$ac_ext
8750cat >>conftest.$ac_ext <<_ACEOF
8751/* end confdefs.h. */
8752$ac_includes_default
8753typedef short ac__type_new_;
8754int
8755main ()
8756{
8757if ((ac__type_new_ *) 0)
8758 return 0;
8759if (sizeof (ac__type_new_))
8760 return 0;
8761 ;
8762 return 0;
8763}
8764_ACEOF
8765rm -f conftest.$ac_objext
8766if { (ac_try="$ac_compile"
8767case "(($ac_try" in
8768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8769 *) ac_try_echo=$ac_try;;
8770esac
8771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8772 (eval "$ac_compile") 2>conftest.er1
8773 ac_status=$?
8774 grep -v '^ *+' conftest.er1 >conftest.err
8775 rm -f conftest.er1
8776 cat conftest.err >&5
8777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8778 (exit $ac_status); } && {
8779 test -z "$ac_c_werror_flag" ||
8780 test ! -s conftest.err
8781 } && test -s conftest.$ac_objext; then
8782 ac_cv_type_short=yes
8783else
8784 echo "$as_me: failed program was:" >&5
8785sed 's/^/| /' conftest.$ac_ext >&5
8786
8787 ac_cv_type_short=no
8788fi
8789
8790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8791fi
8792{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8793echo "${ECHO_T}$ac_cv_type_short" >&6; }
8794
Martin v. Löwiseba40652007-08-30 20:10:57 +00008795# The cast to long int works around a bug in the HP C Compiler
8796# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8797# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8798# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008799{ echo "$as_me:$LINENO: checking size of short" >&5
8800echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008801if test "${ac_cv_sizeof_short+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008802 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008803else
Martin v. Löwis11437992002-04-12 09:54:03 +00008804 if test "$cross_compiling" = yes; then
8805 # Depending upon the size, compute the lo and hi bounds.
8806cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008807/* confdefs.h. */
8808_ACEOF
8809cat confdefs.h >>conftest.$ac_ext
8810cat >>conftest.$ac_ext <<_ACEOF
8811/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008812$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008813 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008814int
8815main ()
8816{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008817static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008818test_array [0] = 0
8819
8820 ;
8821 return 0;
8822}
8823_ACEOF
8824rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008825if { (ac_try="$ac_compile"
8826case "(($ac_try" in
8827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8828 *) ac_try_echo=$ac_try;;
8829esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008831 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008832 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008833 grep -v '^ *+' conftest.er1 >conftest.err
8834 rm -f conftest.er1
8835 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008837 (exit $ac_status); } && {
8838 test -z "$ac_c_werror_flag" ||
8839 test ! -s conftest.err
8840 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008841 ac_lo=0 ac_mid=0
8842 while :; do
8843 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008844/* confdefs.h. */
8845_ACEOF
8846cat confdefs.h >>conftest.$ac_ext
8847cat >>conftest.$ac_ext <<_ACEOF
8848/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008849$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008850 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008851int
8852main ()
8853{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008854static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008855test_array [0] = 0
8856
8857 ;
8858 return 0;
8859}
8860_ACEOF
8861rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008862if { (ac_try="$ac_compile"
8863case "(($ac_try" in
8864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8865 *) ac_try_echo=$ac_try;;
8866esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008868 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008869 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008870 grep -v '^ *+' conftest.er1 >conftest.err
8871 rm -f conftest.er1
8872 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008874 (exit $ac_status); } && {
8875 test -z "$ac_c_werror_flag" ||
8876 test ! -s conftest.err
8877 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008878 ac_hi=$ac_mid; break
8879else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008880 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008881sed 's/^/| /' conftest.$ac_ext >&5
8882
Martin v. Löwiseba40652007-08-30 20:10:57 +00008883 ac_lo=`expr $ac_mid + 1`
8884 if test $ac_lo -le $ac_mid; then
8885 ac_lo= ac_hi=
8886 break
8887 fi
8888 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008889fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008890
8891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008892 done
8893else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008894 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008895sed 's/^/| /' conftest.$ac_ext >&5
8896
Martin v. Löwiseba40652007-08-30 20:10:57 +00008897 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008898/* confdefs.h. */
8899_ACEOF
8900cat confdefs.h >>conftest.$ac_ext
8901cat >>conftest.$ac_ext <<_ACEOF
8902/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008903$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008904 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008905int
8906main ()
8907{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008908static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008909test_array [0] = 0
8910
8911 ;
8912 return 0;
8913}
8914_ACEOF
8915rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008916if { (ac_try="$ac_compile"
8917case "(($ac_try" in
8918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8919 *) ac_try_echo=$ac_try;;
8920esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008922 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008923 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008924 grep -v '^ *+' conftest.er1 >conftest.err
8925 rm -f conftest.er1
8926 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008928 (exit $ac_status); } && {
8929 test -z "$ac_c_werror_flag" ||
8930 test ! -s conftest.err
8931 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008932 ac_hi=-1 ac_mid=-1
8933 while :; do
8934 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008935/* confdefs.h. */
8936_ACEOF
8937cat confdefs.h >>conftest.$ac_ext
8938cat >>conftest.$ac_ext <<_ACEOF
8939/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008940$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008941 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008942int
8943main ()
8944{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008945static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008946test_array [0] = 0
8947
8948 ;
8949 return 0;
8950}
8951_ACEOF
8952rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008953if { (ac_try="$ac_compile"
8954case "(($ac_try" in
8955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8956 *) ac_try_echo=$ac_try;;
8957esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008958eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008959 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008960 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008961 grep -v '^ *+' conftest.er1 >conftest.err
8962 rm -f conftest.er1
8963 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008965 (exit $ac_status); } && {
8966 test -z "$ac_c_werror_flag" ||
8967 test ! -s conftest.err
8968 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008969 ac_lo=$ac_mid; break
8970else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008971 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008972sed 's/^/| /' conftest.$ac_ext >&5
8973
Martin v. Löwiseba40652007-08-30 20:10:57 +00008974 ac_hi=`expr '(' $ac_mid ')' - 1`
8975 if test $ac_mid -le $ac_hi; then
8976 ac_lo= ac_hi=
8977 break
8978 fi
8979 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008980fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008981
8982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008983 done
8984else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008985 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008986sed 's/^/| /' conftest.$ac_ext >&5
8987
Martin v. Löwiseba40652007-08-30 20:10:57 +00008988 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008989fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008990
8991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008992fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008993
8994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008995# Binary search between lo and hi bounds.
8996while test "x$ac_lo" != "x$ac_hi"; do
8997 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8998 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008999/* confdefs.h. */
9000_ACEOF
9001cat confdefs.h >>conftest.$ac_ext
9002cat >>conftest.$ac_ext <<_ACEOF
9003/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009004$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009005 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009006int
9007main ()
9008{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009009static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009010test_array [0] = 0
9011
9012 ;
9013 return 0;
9014}
9015_ACEOF
9016rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009017if { (ac_try="$ac_compile"
9018case "(($ac_try" in
9019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9020 *) ac_try_echo=$ac_try;;
9021esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009023 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009024 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009025 grep -v '^ *+' conftest.er1 >conftest.err
9026 rm -f conftest.er1
9027 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009029 (exit $ac_status); } && {
9030 test -z "$ac_c_werror_flag" ||
9031 test ! -s conftest.err
9032 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009033 ac_hi=$ac_mid
9034else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009035 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009036sed 's/^/| /' conftest.$ac_ext >&5
9037
Martin v. Löwiseba40652007-08-30 20:10:57 +00009038 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009039fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009040
9041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009042done
9043case $ac_lo in
9044?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009045'') if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009046 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009047See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009048echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009049See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009050 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009051 else
9052 ac_cv_sizeof_short=0
9053 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009054esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009055else
Martin v. Löwis11437992002-04-12 09:54:03 +00009056 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009057/* confdefs.h. */
9058_ACEOF
9059cat confdefs.h >>conftest.$ac_ext
9060cat >>conftest.$ac_ext <<_ACEOF
9061/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009062$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009063 typedef short ac__type_sizeof_;
9064static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9065static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009066#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009067#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009068int
9069main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009070{
Martin v. Löwis11437992002-04-12 09:54:03 +00009071
9072 FILE *f = fopen ("conftest.val", "w");
9073 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009074 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009075 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009076 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009077 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009078 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009079 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009080 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009081 }
9082 else
9083 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009084 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009085 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009086 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009087 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009088 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009089 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009090
9091 ;
9092 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009093}
Martin v. Löwis11437992002-04-12 09:54:03 +00009094_ACEOF
9095rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009096if { (ac_try="$ac_link"
9097case "(($ac_try" in
9098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9099 *) ac_try_echo=$ac_try;;
9100esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009102 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009103 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009105 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009106 { (case "(($ac_try" in
9107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9108 *) ac_try_echo=$ac_try;;
9109esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009110eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009111 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009112 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009114 (exit $ac_status); }; }; then
9115 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009116else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009117 echo "$as_me: program exited with status $ac_status" >&5
9118echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009119sed 's/^/| /' conftest.$ac_ext >&5
9120
Martin v. Löwis11437992002-04-12 09:54:03 +00009121( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009122if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009123 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009124See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009125echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009126See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009127 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009128 else
9129 ac_cv_sizeof_short=0
9130 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009131fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009132rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009133fi
9134rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009135fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009136{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9137echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009138
9139
9140
Martin v. Löwis11437992002-04-12 09:54:03 +00009141cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009142#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009143_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009144
9145
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009146{ echo "$as_me:$LINENO: checking for float" >&5
9147echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9148if test "${ac_cv_type_float+set}" = set; then
9149 echo $ECHO_N "(cached) $ECHO_C" >&6
9150else
9151 cat >conftest.$ac_ext <<_ACEOF
9152/* confdefs.h. */
9153_ACEOF
9154cat confdefs.h >>conftest.$ac_ext
9155cat >>conftest.$ac_ext <<_ACEOF
9156/* end confdefs.h. */
9157$ac_includes_default
9158typedef float ac__type_new_;
9159int
9160main ()
9161{
9162if ((ac__type_new_ *) 0)
9163 return 0;
9164if (sizeof (ac__type_new_))
9165 return 0;
9166 ;
9167 return 0;
9168}
9169_ACEOF
9170rm -f conftest.$ac_objext
9171if { (ac_try="$ac_compile"
9172case "(($ac_try" in
9173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9174 *) ac_try_echo=$ac_try;;
9175esac
9176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9177 (eval "$ac_compile") 2>conftest.er1
9178 ac_status=$?
9179 grep -v '^ *+' conftest.er1 >conftest.err
9180 rm -f conftest.er1
9181 cat conftest.err >&5
9182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9183 (exit $ac_status); } && {
9184 test -z "$ac_c_werror_flag" ||
9185 test ! -s conftest.err
9186 } && test -s conftest.$ac_objext; then
9187 ac_cv_type_float=yes
9188else
9189 echo "$as_me: failed program was:" >&5
9190sed 's/^/| /' conftest.$ac_ext >&5
9191
9192 ac_cv_type_float=no
9193fi
9194
9195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9196fi
9197{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9198echo "${ECHO_T}$ac_cv_type_float" >&6; }
9199
Martin v. Löwiseba40652007-08-30 20:10:57 +00009200# The cast to long int works around a bug in the HP C Compiler
9201# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9202# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9203# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009204{ echo "$as_me:$LINENO: checking size of float" >&5
9205echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009206if test "${ac_cv_sizeof_float+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009207 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009208else
Martin v. Löwis11437992002-04-12 09:54:03 +00009209 if test "$cross_compiling" = yes; then
9210 # Depending upon the size, compute the lo and hi bounds.
9211cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009212/* confdefs.h. */
9213_ACEOF
9214cat confdefs.h >>conftest.$ac_ext
9215cat >>conftest.$ac_ext <<_ACEOF
9216/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009217$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009218 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009219int
9220main ()
9221{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009222static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009223test_array [0] = 0
9224
9225 ;
9226 return 0;
9227}
9228_ACEOF
9229rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009230if { (ac_try="$ac_compile"
9231case "(($ac_try" in
9232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9233 *) ac_try_echo=$ac_try;;
9234esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009236 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009237 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009238 grep -v '^ *+' conftest.er1 >conftest.err
9239 rm -f conftest.er1
9240 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009242 (exit $ac_status); } && {
9243 test -z "$ac_c_werror_flag" ||
9244 test ! -s conftest.err
9245 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009246 ac_lo=0 ac_mid=0
9247 while :; do
9248 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009249/* confdefs.h. */
9250_ACEOF
9251cat confdefs.h >>conftest.$ac_ext
9252cat >>conftest.$ac_ext <<_ACEOF
9253/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009254$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009255 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009256int
9257main ()
9258{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009259static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009260test_array [0] = 0
9261
9262 ;
9263 return 0;
9264}
9265_ACEOF
9266rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009267if { (ac_try="$ac_compile"
9268case "(($ac_try" in
9269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9270 *) ac_try_echo=$ac_try;;
9271esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009273 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009274 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009275 grep -v '^ *+' conftest.er1 >conftest.err
9276 rm -f conftest.er1
9277 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009279 (exit $ac_status); } && {
9280 test -z "$ac_c_werror_flag" ||
9281 test ! -s conftest.err
9282 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009283 ac_hi=$ac_mid; break
9284else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009285 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009286sed 's/^/| /' conftest.$ac_ext >&5
9287
Martin v. Löwiseba40652007-08-30 20:10:57 +00009288 ac_lo=`expr $ac_mid + 1`
9289 if test $ac_lo -le $ac_mid; then
9290 ac_lo= ac_hi=
9291 break
9292 fi
9293 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009294fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009295
9296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009297 done
9298else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009299 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009300sed 's/^/| /' conftest.$ac_ext >&5
9301
Martin v. Löwiseba40652007-08-30 20:10:57 +00009302 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009303/* confdefs.h. */
9304_ACEOF
9305cat confdefs.h >>conftest.$ac_ext
9306cat >>conftest.$ac_ext <<_ACEOF
9307/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009308$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009309 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009310int
9311main ()
9312{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009313static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009314test_array [0] = 0
9315
9316 ;
9317 return 0;
9318}
9319_ACEOF
9320rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009321if { (ac_try="$ac_compile"
9322case "(($ac_try" in
9323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9324 *) ac_try_echo=$ac_try;;
9325esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009327 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009328 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009329 grep -v '^ *+' conftest.er1 >conftest.err
9330 rm -f conftest.er1
9331 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009333 (exit $ac_status); } && {
9334 test -z "$ac_c_werror_flag" ||
9335 test ! -s conftest.err
9336 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009337 ac_hi=-1 ac_mid=-1
9338 while :; do
9339 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009340/* confdefs.h. */
9341_ACEOF
9342cat confdefs.h >>conftest.$ac_ext
9343cat >>conftest.$ac_ext <<_ACEOF
9344/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009345$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009346 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009347int
9348main ()
9349{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009350static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009351test_array [0] = 0
9352
9353 ;
9354 return 0;
9355}
9356_ACEOF
9357rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009358if { (ac_try="$ac_compile"
9359case "(($ac_try" in
9360 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9361 *) ac_try_echo=$ac_try;;
9362esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009363eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009364 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009365 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009366 grep -v '^ *+' conftest.er1 >conftest.err
9367 rm -f conftest.er1
9368 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009370 (exit $ac_status); } && {
9371 test -z "$ac_c_werror_flag" ||
9372 test ! -s conftest.err
9373 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009374 ac_lo=$ac_mid; break
9375else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009376 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009377sed 's/^/| /' conftest.$ac_ext >&5
9378
Martin v. Löwiseba40652007-08-30 20:10:57 +00009379 ac_hi=`expr '(' $ac_mid ')' - 1`
9380 if test $ac_mid -le $ac_hi; then
9381 ac_lo= ac_hi=
9382 break
9383 fi
9384 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009385fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009386
9387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009388 done
9389else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009390 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009391sed 's/^/| /' conftest.$ac_ext >&5
9392
Martin v. Löwiseba40652007-08-30 20:10:57 +00009393 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009394fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009395
9396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009397fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009398
9399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009400# Binary search between lo and hi bounds.
9401while test "x$ac_lo" != "x$ac_hi"; do
9402 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9403 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009404/* confdefs.h. */
9405_ACEOF
9406cat confdefs.h >>conftest.$ac_ext
9407cat >>conftest.$ac_ext <<_ACEOF
9408/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009409$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009410 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009411int
9412main ()
9413{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009414static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009415test_array [0] = 0
9416
9417 ;
9418 return 0;
9419}
9420_ACEOF
9421rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009422if { (ac_try="$ac_compile"
9423case "(($ac_try" in
9424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9425 *) ac_try_echo=$ac_try;;
9426esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009428 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009429 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009430 grep -v '^ *+' conftest.er1 >conftest.err
9431 rm -f conftest.er1
9432 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009434 (exit $ac_status); } && {
9435 test -z "$ac_c_werror_flag" ||
9436 test ! -s conftest.err
9437 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009438 ac_hi=$ac_mid
9439else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009440 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009441sed 's/^/| /' conftest.$ac_ext >&5
9442
Martin v. Löwiseba40652007-08-30 20:10:57 +00009443 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009444fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009445
9446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009447done
9448case $ac_lo in
9449?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009450'') if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009451 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009452See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009453echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009454See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009455 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009456 else
9457 ac_cv_sizeof_float=0
9458 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009459esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009460else
Martin v. Löwis11437992002-04-12 09:54:03 +00009461 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009462/* confdefs.h. */
9463_ACEOF
9464cat confdefs.h >>conftest.$ac_ext
9465cat >>conftest.$ac_ext <<_ACEOF
9466/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009467$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009468 typedef float ac__type_sizeof_;
9469static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9470static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009471#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009472#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009473int
9474main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009475{
Martin v. Löwis11437992002-04-12 09:54:03 +00009476
9477 FILE *f = fopen ("conftest.val", "w");
9478 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009479 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009480 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009481 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009482 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009483 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009484 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009485 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009486 }
9487 else
9488 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009489 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009490 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009491 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009492 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009493 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009494 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009495
9496 ;
9497 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009498}
Martin v. Löwis11437992002-04-12 09:54:03 +00009499_ACEOF
9500rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009501if { (ac_try="$ac_link"
9502case "(($ac_try" in
9503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9504 *) ac_try_echo=$ac_try;;
9505esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009507 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009508 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009510 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009511 { (case "(($ac_try" in
9512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9513 *) ac_try_echo=$ac_try;;
9514esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009516 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009517 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009519 (exit $ac_status); }; }; then
9520 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009521else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009522 echo "$as_me: program exited with status $ac_status" >&5
9523echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009524sed 's/^/| /' conftest.$ac_ext >&5
9525
Martin v. Löwis11437992002-04-12 09:54:03 +00009526( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009527if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009528 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009529See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009530echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009531See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009532 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009533 else
9534 ac_cv_sizeof_float=0
9535 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009536fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009537rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009538fi
9539rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009540fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009541{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9542echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009543
9544
9545
Martin v. Löwis11437992002-04-12 09:54:03 +00009546cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009547#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009548_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009549
9550
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009551{ echo "$as_me:$LINENO: checking for double" >&5
9552echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9553if test "${ac_cv_type_double+set}" = set; then
9554 echo $ECHO_N "(cached) $ECHO_C" >&6
9555else
9556 cat >conftest.$ac_ext <<_ACEOF
9557/* confdefs.h. */
9558_ACEOF
9559cat confdefs.h >>conftest.$ac_ext
9560cat >>conftest.$ac_ext <<_ACEOF
9561/* end confdefs.h. */
9562$ac_includes_default
9563typedef double ac__type_new_;
9564int
9565main ()
9566{
9567if ((ac__type_new_ *) 0)
9568 return 0;
9569if (sizeof (ac__type_new_))
9570 return 0;
9571 ;
9572 return 0;
9573}
9574_ACEOF
9575rm -f conftest.$ac_objext
9576if { (ac_try="$ac_compile"
9577case "(($ac_try" in
9578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9579 *) ac_try_echo=$ac_try;;
9580esac
9581eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9582 (eval "$ac_compile") 2>conftest.er1
9583 ac_status=$?
9584 grep -v '^ *+' conftest.er1 >conftest.err
9585 rm -f conftest.er1
9586 cat conftest.err >&5
9587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9588 (exit $ac_status); } && {
9589 test -z "$ac_c_werror_flag" ||
9590 test ! -s conftest.err
9591 } && test -s conftest.$ac_objext; then
9592 ac_cv_type_double=yes
9593else
9594 echo "$as_me: failed program was:" >&5
9595sed 's/^/| /' conftest.$ac_ext >&5
9596
9597 ac_cv_type_double=no
9598fi
9599
9600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9601fi
9602{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9603echo "${ECHO_T}$ac_cv_type_double" >&6; }
9604
Martin v. Löwiseba40652007-08-30 20:10:57 +00009605# The cast to long int works around a bug in the HP C Compiler
9606# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9607# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9608# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009609{ echo "$as_me:$LINENO: checking size of double" >&5
9610echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009611if test "${ac_cv_sizeof_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009612 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009613else
Martin v. Löwis11437992002-04-12 09:54:03 +00009614 if test "$cross_compiling" = yes; then
9615 # Depending upon the size, compute the lo and hi bounds.
9616cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009617/* confdefs.h. */
9618_ACEOF
9619cat confdefs.h >>conftest.$ac_ext
9620cat >>conftest.$ac_ext <<_ACEOF
9621/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009622$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009623 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009624int
9625main ()
9626{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009627static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009628test_array [0] = 0
9629
9630 ;
9631 return 0;
9632}
9633_ACEOF
9634rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009635if { (ac_try="$ac_compile"
9636case "(($ac_try" in
9637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9638 *) ac_try_echo=$ac_try;;
9639esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009641 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009642 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009643 grep -v '^ *+' conftest.er1 >conftest.err
9644 rm -f conftest.er1
9645 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009647 (exit $ac_status); } && {
9648 test -z "$ac_c_werror_flag" ||
9649 test ! -s conftest.err
9650 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009651 ac_lo=0 ac_mid=0
9652 while :; do
9653 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009654/* confdefs.h. */
9655_ACEOF
9656cat confdefs.h >>conftest.$ac_ext
9657cat >>conftest.$ac_ext <<_ACEOF
9658/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009659$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009660 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009661int
9662main ()
9663{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009664static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009665test_array [0] = 0
9666
9667 ;
9668 return 0;
9669}
9670_ACEOF
9671rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009672if { (ac_try="$ac_compile"
9673case "(($ac_try" in
9674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9675 *) ac_try_echo=$ac_try;;
9676esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009678 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009679 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009680 grep -v '^ *+' conftest.er1 >conftest.err
9681 rm -f conftest.er1
9682 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009684 (exit $ac_status); } && {
9685 test -z "$ac_c_werror_flag" ||
9686 test ! -s conftest.err
9687 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009688 ac_hi=$ac_mid; break
9689else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009690 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009691sed 's/^/| /' conftest.$ac_ext >&5
9692
Martin v. Löwiseba40652007-08-30 20:10:57 +00009693 ac_lo=`expr $ac_mid + 1`
9694 if test $ac_lo -le $ac_mid; then
9695 ac_lo= ac_hi=
9696 break
9697 fi
9698 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009699fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009700
9701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009702 done
9703else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009704 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009705sed 's/^/| /' conftest.$ac_ext >&5
9706
Martin v. Löwiseba40652007-08-30 20:10:57 +00009707 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009708/* confdefs.h. */
9709_ACEOF
9710cat confdefs.h >>conftest.$ac_ext
9711cat >>conftest.$ac_ext <<_ACEOF
9712/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009713$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009714 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009715int
9716main ()
9717{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009718static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009719test_array [0] = 0
9720
9721 ;
9722 return 0;
9723}
9724_ACEOF
9725rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009726if { (ac_try="$ac_compile"
9727case "(($ac_try" in
9728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9729 *) ac_try_echo=$ac_try;;
9730esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009732 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009733 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009734 grep -v '^ *+' conftest.er1 >conftest.err
9735 rm -f conftest.er1
9736 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009738 (exit $ac_status); } && {
9739 test -z "$ac_c_werror_flag" ||
9740 test ! -s conftest.err
9741 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009742 ac_hi=-1 ac_mid=-1
9743 while :; do
9744 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009745/* confdefs.h. */
9746_ACEOF
9747cat confdefs.h >>conftest.$ac_ext
9748cat >>conftest.$ac_ext <<_ACEOF
9749/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009750$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009751 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009752int
9753main ()
9754{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009755static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009756test_array [0] = 0
9757
9758 ;
9759 return 0;
9760}
9761_ACEOF
9762rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009763if { (ac_try="$ac_compile"
9764case "(($ac_try" in
9765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9766 *) ac_try_echo=$ac_try;;
9767esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009769 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009770 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009771 grep -v '^ *+' conftest.er1 >conftest.err
9772 rm -f conftest.er1
9773 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009775 (exit $ac_status); } && {
9776 test -z "$ac_c_werror_flag" ||
9777 test ! -s conftest.err
9778 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009779 ac_lo=$ac_mid; break
9780else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009781 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009782sed 's/^/| /' conftest.$ac_ext >&5
9783
Martin v. Löwiseba40652007-08-30 20:10:57 +00009784 ac_hi=`expr '(' $ac_mid ')' - 1`
9785 if test $ac_mid -le $ac_hi; then
9786 ac_lo= ac_hi=
9787 break
9788 fi
9789 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009790fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009791
9792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009793 done
9794else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009795 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009796sed 's/^/| /' conftest.$ac_ext >&5
9797
Martin v. Löwiseba40652007-08-30 20:10:57 +00009798 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009799fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009800
9801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009802fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009803
9804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009805# Binary search between lo and hi bounds.
9806while test "x$ac_lo" != "x$ac_hi"; do
9807 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9808 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009809/* confdefs.h. */
9810_ACEOF
9811cat confdefs.h >>conftest.$ac_ext
9812cat >>conftest.$ac_ext <<_ACEOF
9813/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009814$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009815 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009816int
9817main ()
9818{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009819static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009820test_array [0] = 0
9821
9822 ;
9823 return 0;
9824}
9825_ACEOF
9826rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009827if { (ac_try="$ac_compile"
9828case "(($ac_try" in
9829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9830 *) ac_try_echo=$ac_try;;
9831esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009833 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009834 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009835 grep -v '^ *+' conftest.er1 >conftest.err
9836 rm -f conftest.er1
9837 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009839 (exit $ac_status); } && {
9840 test -z "$ac_c_werror_flag" ||
9841 test ! -s conftest.err
9842 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009843 ac_hi=$ac_mid
9844else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009845 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009846sed 's/^/| /' conftest.$ac_ext >&5
9847
Martin v. Löwiseba40652007-08-30 20:10:57 +00009848 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009849fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009850
9851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009852done
9853case $ac_lo in
9854?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009855'') if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009856 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009857See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009858echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009859See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009860 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009861 else
9862 ac_cv_sizeof_double=0
9863 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009864esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009865else
Martin v. Löwis11437992002-04-12 09:54:03 +00009866 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009867/* confdefs.h. */
9868_ACEOF
9869cat confdefs.h >>conftest.$ac_ext
9870cat >>conftest.$ac_ext <<_ACEOF
9871/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009872$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009873 typedef double ac__type_sizeof_;
9874static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9875static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009876#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009877#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009878int
9879main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009880{
Martin v. Löwis11437992002-04-12 09:54:03 +00009881
9882 FILE *f = fopen ("conftest.val", "w");
9883 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009884 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009885 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009886 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009887 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009888 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009889 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009890 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009891 }
9892 else
9893 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009894 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009895 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009896 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009897 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009898 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009899 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009900
9901 ;
9902 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009903}
Martin v. Löwis11437992002-04-12 09:54:03 +00009904_ACEOF
9905rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009906if { (ac_try="$ac_link"
9907case "(($ac_try" in
9908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9909 *) ac_try_echo=$ac_try;;
9910esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009912 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009913 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009915 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009916 { (case "(($ac_try" in
9917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9918 *) ac_try_echo=$ac_try;;
9919esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009921 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009922 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009924 (exit $ac_status); }; }; then
9925 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009926else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009927 echo "$as_me: program exited with status $ac_status" >&5
9928echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009929sed 's/^/| /' conftest.$ac_ext >&5
9930
Martin v. Löwis11437992002-04-12 09:54:03 +00009931( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009932if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009933 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009934See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009935echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009936See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009937 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009938 else
9939 ac_cv_sizeof_double=0
9940 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009941fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009942rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009943fi
9944rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009945fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009946{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9947echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009948
9949
9950
Martin v. Löwis11437992002-04-12 09:54:03 +00009951cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009952#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009953_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009954
9955
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009956{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9957echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9958if test "${ac_cv_type_fpos_t+set}" = set; then
9959 echo $ECHO_N "(cached) $ECHO_C" >&6
9960else
9961 cat >conftest.$ac_ext <<_ACEOF
9962/* confdefs.h. */
9963_ACEOF
9964cat confdefs.h >>conftest.$ac_ext
9965cat >>conftest.$ac_ext <<_ACEOF
9966/* end confdefs.h. */
9967$ac_includes_default
9968typedef fpos_t ac__type_new_;
9969int
9970main ()
9971{
9972if ((ac__type_new_ *) 0)
9973 return 0;
9974if (sizeof (ac__type_new_))
9975 return 0;
9976 ;
9977 return 0;
9978}
9979_ACEOF
9980rm -f conftest.$ac_objext
9981if { (ac_try="$ac_compile"
9982case "(($ac_try" in
9983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9984 *) ac_try_echo=$ac_try;;
9985esac
9986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9987 (eval "$ac_compile") 2>conftest.er1
9988 ac_status=$?
9989 grep -v '^ *+' conftest.er1 >conftest.err
9990 rm -f conftest.er1
9991 cat conftest.err >&5
9992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9993 (exit $ac_status); } && {
9994 test -z "$ac_c_werror_flag" ||
9995 test ! -s conftest.err
9996 } && test -s conftest.$ac_objext; then
9997 ac_cv_type_fpos_t=yes
9998else
9999 echo "$as_me: failed program was:" >&5
10000sed 's/^/| /' conftest.$ac_ext >&5
10001
10002 ac_cv_type_fpos_t=no
10003fi
10004
10005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10006fi
10007{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
10008echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
10009
Martin v. Löwiseba40652007-08-30 20:10:57 +000010010# The cast to long int works around a bug in the HP C Compiler
10011# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10012# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10013# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010014{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
10015echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010016if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010017 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010018else
Martin v. Löwis11437992002-04-12 09:54:03 +000010019 if test "$cross_compiling" = yes; then
10020 # Depending upon the size, compute the lo and hi bounds.
10021cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010022/* confdefs.h. */
10023_ACEOF
10024cat confdefs.h >>conftest.$ac_ext
10025cat >>conftest.$ac_ext <<_ACEOF
10026/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010027$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010028 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010029int
10030main ()
10031{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010032static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010033test_array [0] = 0
10034
10035 ;
10036 return 0;
10037}
10038_ACEOF
10039rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010040if { (ac_try="$ac_compile"
10041case "(($ac_try" in
10042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10043 *) ac_try_echo=$ac_try;;
10044esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010046 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010047 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010048 grep -v '^ *+' conftest.er1 >conftest.err
10049 rm -f conftest.er1
10050 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010052 (exit $ac_status); } && {
10053 test -z "$ac_c_werror_flag" ||
10054 test ! -s conftest.err
10055 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010056 ac_lo=0 ac_mid=0
10057 while :; do
10058 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010059/* confdefs.h. */
10060_ACEOF
10061cat confdefs.h >>conftest.$ac_ext
10062cat >>conftest.$ac_ext <<_ACEOF
10063/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010064$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010065 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010066int
10067main ()
10068{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010069static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010070test_array [0] = 0
10071
10072 ;
10073 return 0;
10074}
10075_ACEOF
10076rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010077if { (ac_try="$ac_compile"
10078case "(($ac_try" in
10079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10080 *) ac_try_echo=$ac_try;;
10081esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010083 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010084 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010085 grep -v '^ *+' conftest.er1 >conftest.err
10086 rm -f conftest.er1
10087 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010089 (exit $ac_status); } && {
10090 test -z "$ac_c_werror_flag" ||
10091 test ! -s conftest.err
10092 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010093 ac_hi=$ac_mid; break
10094else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010095 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010096sed 's/^/| /' conftest.$ac_ext >&5
10097
Martin v. Löwiseba40652007-08-30 20:10:57 +000010098 ac_lo=`expr $ac_mid + 1`
10099 if test $ac_lo -le $ac_mid; then
10100 ac_lo= ac_hi=
10101 break
10102 fi
10103 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010104fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010105
10106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010107 done
10108else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010109 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010110sed 's/^/| /' conftest.$ac_ext >&5
10111
Martin v. Löwiseba40652007-08-30 20:10:57 +000010112 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010113/* confdefs.h. */
10114_ACEOF
10115cat confdefs.h >>conftest.$ac_ext
10116cat >>conftest.$ac_ext <<_ACEOF
10117/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010118$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010119 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010120int
10121main ()
10122{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010123static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010124test_array [0] = 0
10125
10126 ;
10127 return 0;
10128}
10129_ACEOF
10130rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010131if { (ac_try="$ac_compile"
10132case "(($ac_try" in
10133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10134 *) ac_try_echo=$ac_try;;
10135esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010137 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010138 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010139 grep -v '^ *+' conftest.er1 >conftest.err
10140 rm -f conftest.er1
10141 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010143 (exit $ac_status); } && {
10144 test -z "$ac_c_werror_flag" ||
10145 test ! -s conftest.err
10146 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010147 ac_hi=-1 ac_mid=-1
10148 while :; do
10149 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010150/* confdefs.h. */
10151_ACEOF
10152cat confdefs.h >>conftest.$ac_ext
10153cat >>conftest.$ac_ext <<_ACEOF
10154/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010155$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010156 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010157int
10158main ()
10159{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010160static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010161test_array [0] = 0
10162
10163 ;
10164 return 0;
10165}
10166_ACEOF
10167rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010168if { (ac_try="$ac_compile"
10169case "(($ac_try" in
10170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10171 *) ac_try_echo=$ac_try;;
10172esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010174 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010175 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010176 grep -v '^ *+' conftest.er1 >conftest.err
10177 rm -f conftest.er1
10178 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010180 (exit $ac_status); } && {
10181 test -z "$ac_c_werror_flag" ||
10182 test ! -s conftest.err
10183 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010184 ac_lo=$ac_mid; break
10185else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010186 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010187sed 's/^/| /' conftest.$ac_ext >&5
10188
Martin v. Löwiseba40652007-08-30 20:10:57 +000010189 ac_hi=`expr '(' $ac_mid ')' - 1`
10190 if test $ac_mid -le $ac_hi; then
10191 ac_lo= ac_hi=
10192 break
10193 fi
10194 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010195fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010196
10197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010198 done
10199else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010200 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010201sed 's/^/| /' conftest.$ac_ext >&5
10202
Martin v. Löwiseba40652007-08-30 20:10:57 +000010203 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010204fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010205
10206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010207fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010208
10209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010210# Binary search between lo and hi bounds.
10211while test "x$ac_lo" != "x$ac_hi"; do
10212 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10213 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010214/* confdefs.h. */
10215_ACEOF
10216cat confdefs.h >>conftest.$ac_ext
10217cat >>conftest.$ac_ext <<_ACEOF
10218/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010219$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010220 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010221int
10222main ()
10223{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010224static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010225test_array [0] = 0
10226
10227 ;
10228 return 0;
10229}
10230_ACEOF
10231rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010232if { (ac_try="$ac_compile"
10233case "(($ac_try" in
10234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10235 *) ac_try_echo=$ac_try;;
10236esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010238 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010239 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010240 grep -v '^ *+' conftest.er1 >conftest.err
10241 rm -f conftest.er1
10242 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010244 (exit $ac_status); } && {
10245 test -z "$ac_c_werror_flag" ||
10246 test ! -s conftest.err
10247 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010248 ac_hi=$ac_mid
10249else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010250 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010251sed 's/^/| /' conftest.$ac_ext >&5
10252
Martin v. Löwiseba40652007-08-30 20:10:57 +000010253 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010254fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010255
10256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010257done
10258case $ac_lo in
10259?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010260'') if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010261 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010262See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010263echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010264See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010265 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010266 else
10267 ac_cv_sizeof_fpos_t=0
10268 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010269esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010270else
Martin v. Löwis11437992002-04-12 09:54:03 +000010271 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010272/* confdefs.h. */
10273_ACEOF
10274cat confdefs.h >>conftest.$ac_ext
10275cat >>conftest.$ac_ext <<_ACEOF
10276/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010277$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010278 typedef fpos_t ac__type_sizeof_;
10279static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10280static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010281#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010282#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010283int
10284main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010285{
Martin v. Löwis11437992002-04-12 09:54:03 +000010286
10287 FILE *f = fopen ("conftest.val", "w");
10288 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010289 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010290 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010291 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010292 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010293 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010294 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010295 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010296 }
10297 else
10298 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010299 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010300 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010301 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010302 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010303 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010304 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010305
10306 ;
10307 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010308}
Martin v. Löwis11437992002-04-12 09:54:03 +000010309_ACEOF
10310rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010311if { (ac_try="$ac_link"
10312case "(($ac_try" in
10313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10314 *) ac_try_echo=$ac_try;;
10315esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010317 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010318 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010320 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010321 { (case "(($ac_try" in
10322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10323 *) ac_try_echo=$ac_try;;
10324esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010326 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010327 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010329 (exit $ac_status); }; }; then
10330 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010331else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010332 echo "$as_me: program exited with status $ac_status" >&5
10333echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010334sed 's/^/| /' conftest.$ac_ext >&5
10335
Martin v. Löwis11437992002-04-12 09:54:03 +000010336( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010337if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010338 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010339See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010340echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010341See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010342 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010343 else
10344 ac_cv_sizeof_fpos_t=0
10345 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010346fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010347rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010348fi
10349rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010350fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010351{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10352echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010353
10354
10355
Martin v. Löwis11437992002-04-12 09:54:03 +000010356cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010357#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010358_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010359
Michael W. Hudson54241132001-12-07 15:38:26 +000010360
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010361{ echo "$as_me:$LINENO: checking for size_t" >&5
10362echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10363if test "${ac_cv_type_size_t+set}" = set; then
10364 echo $ECHO_N "(cached) $ECHO_C" >&6
10365else
10366 cat >conftest.$ac_ext <<_ACEOF
10367/* confdefs.h. */
10368_ACEOF
10369cat confdefs.h >>conftest.$ac_ext
10370cat >>conftest.$ac_ext <<_ACEOF
10371/* end confdefs.h. */
10372$ac_includes_default
10373typedef size_t ac__type_new_;
10374int
10375main ()
10376{
10377if ((ac__type_new_ *) 0)
10378 return 0;
10379if (sizeof (ac__type_new_))
10380 return 0;
10381 ;
10382 return 0;
10383}
10384_ACEOF
10385rm -f conftest.$ac_objext
10386if { (ac_try="$ac_compile"
10387case "(($ac_try" in
10388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10389 *) ac_try_echo=$ac_try;;
10390esac
10391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10392 (eval "$ac_compile") 2>conftest.er1
10393 ac_status=$?
10394 grep -v '^ *+' conftest.er1 >conftest.err
10395 rm -f conftest.er1
10396 cat conftest.err >&5
10397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10398 (exit $ac_status); } && {
10399 test -z "$ac_c_werror_flag" ||
10400 test ! -s conftest.err
10401 } && test -s conftest.$ac_objext; then
10402 ac_cv_type_size_t=yes
10403else
10404 echo "$as_me: failed program was:" >&5
10405sed 's/^/| /' conftest.$ac_ext >&5
10406
10407 ac_cv_type_size_t=no
10408fi
10409
10410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10411fi
10412{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10413echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10414
Martin v. Löwiseba40652007-08-30 20:10:57 +000010415# The cast to long int works around a bug in the HP C Compiler
10416# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10417# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10418# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010419{ echo "$as_me:$LINENO: checking size of size_t" >&5
10420echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010421if test "${ac_cv_sizeof_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010422 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010423else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010424 if test "$cross_compiling" = yes; then
10425 # Depending upon the size, compute the lo and hi bounds.
10426cat >conftest.$ac_ext <<_ACEOF
10427/* confdefs.h. */
10428_ACEOF
10429cat confdefs.h >>conftest.$ac_ext
10430cat >>conftest.$ac_ext <<_ACEOF
10431/* end confdefs.h. */
10432$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010433 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010434int
10435main ()
10436{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010437static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010438test_array [0] = 0
10439
10440 ;
10441 return 0;
10442}
10443_ACEOF
10444rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010445if { (ac_try="$ac_compile"
10446case "(($ac_try" in
10447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10448 *) ac_try_echo=$ac_try;;
10449esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010451 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010452 ac_status=$?
10453 grep -v '^ *+' conftest.er1 >conftest.err
10454 rm -f conftest.er1
10455 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010457 (exit $ac_status); } && {
10458 test -z "$ac_c_werror_flag" ||
10459 test ! -s conftest.err
10460 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010461 ac_lo=0 ac_mid=0
10462 while :; do
10463 cat >conftest.$ac_ext <<_ACEOF
10464/* confdefs.h. */
10465_ACEOF
10466cat confdefs.h >>conftest.$ac_ext
10467cat >>conftest.$ac_ext <<_ACEOF
10468/* end confdefs.h. */
10469$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010470 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010471int
10472main ()
10473{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010474static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010475test_array [0] = 0
10476
10477 ;
10478 return 0;
10479}
10480_ACEOF
10481rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010482if { (ac_try="$ac_compile"
10483case "(($ac_try" in
10484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10485 *) ac_try_echo=$ac_try;;
10486esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010488 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010489 ac_status=$?
10490 grep -v '^ *+' conftest.er1 >conftest.err
10491 rm -f conftest.er1
10492 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010494 (exit $ac_status); } && {
10495 test -z "$ac_c_werror_flag" ||
10496 test ! -s conftest.err
10497 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010498 ac_hi=$ac_mid; break
10499else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010500 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010501sed 's/^/| /' conftest.$ac_ext >&5
10502
Martin v. Löwiseba40652007-08-30 20:10:57 +000010503 ac_lo=`expr $ac_mid + 1`
10504 if test $ac_lo -le $ac_mid; then
10505 ac_lo= ac_hi=
10506 break
10507 fi
10508 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010509fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010510
10511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010512 done
10513else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010514 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010515sed 's/^/| /' conftest.$ac_ext >&5
10516
Martin v. Löwiseba40652007-08-30 20:10:57 +000010517 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010518/* confdefs.h. */
10519_ACEOF
10520cat confdefs.h >>conftest.$ac_ext
10521cat >>conftest.$ac_ext <<_ACEOF
10522/* end confdefs.h. */
10523$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010524 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010525int
10526main ()
10527{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010528static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010529test_array [0] = 0
10530
10531 ;
10532 return 0;
10533}
10534_ACEOF
10535rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010536if { (ac_try="$ac_compile"
10537case "(($ac_try" in
10538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10539 *) ac_try_echo=$ac_try;;
10540esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010542 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010543 ac_status=$?
10544 grep -v '^ *+' conftest.er1 >conftest.err
10545 rm -f conftest.er1
10546 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010548 (exit $ac_status); } && {
10549 test -z "$ac_c_werror_flag" ||
10550 test ! -s conftest.err
10551 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010552 ac_hi=-1 ac_mid=-1
10553 while :; do
10554 cat >conftest.$ac_ext <<_ACEOF
10555/* confdefs.h. */
10556_ACEOF
10557cat confdefs.h >>conftest.$ac_ext
10558cat >>conftest.$ac_ext <<_ACEOF
10559/* end confdefs.h. */
10560$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010561 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010562int
10563main ()
10564{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010565static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010566test_array [0] = 0
10567
10568 ;
10569 return 0;
10570}
10571_ACEOF
10572rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010573if { (ac_try="$ac_compile"
10574case "(($ac_try" in
10575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10576 *) ac_try_echo=$ac_try;;
10577esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010579 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010580 ac_status=$?
10581 grep -v '^ *+' conftest.er1 >conftest.err
10582 rm -f conftest.er1
10583 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010585 (exit $ac_status); } && {
10586 test -z "$ac_c_werror_flag" ||
10587 test ! -s conftest.err
10588 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010589 ac_lo=$ac_mid; break
10590else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010591 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010592sed 's/^/| /' conftest.$ac_ext >&5
10593
Martin v. Löwiseba40652007-08-30 20:10:57 +000010594 ac_hi=`expr '(' $ac_mid ')' - 1`
10595 if test $ac_mid -le $ac_hi; then
10596 ac_lo= ac_hi=
10597 break
10598 fi
10599 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010600fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010601
10602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010603 done
10604else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010605 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010606sed 's/^/| /' conftest.$ac_ext >&5
10607
Martin v. Löwiseba40652007-08-30 20:10:57 +000010608 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010609fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010610
10611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010612fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010613
10614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010615# Binary search between lo and hi bounds.
10616while test "x$ac_lo" != "x$ac_hi"; do
10617 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10618 cat >conftest.$ac_ext <<_ACEOF
10619/* confdefs.h. */
10620_ACEOF
10621cat confdefs.h >>conftest.$ac_ext
10622cat >>conftest.$ac_ext <<_ACEOF
10623/* end confdefs.h. */
10624$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010625 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010626int
10627main ()
10628{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010629static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010630test_array [0] = 0
10631
10632 ;
10633 return 0;
10634}
10635_ACEOF
10636rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010637if { (ac_try="$ac_compile"
10638case "(($ac_try" in
10639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10640 *) ac_try_echo=$ac_try;;
10641esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010643 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010644 ac_status=$?
10645 grep -v '^ *+' conftest.er1 >conftest.err
10646 rm -f conftest.er1
10647 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010649 (exit $ac_status); } && {
10650 test -z "$ac_c_werror_flag" ||
10651 test ! -s conftest.err
10652 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010653 ac_hi=$ac_mid
10654else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010655 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010656sed 's/^/| /' conftest.$ac_ext >&5
10657
Martin v. Löwiseba40652007-08-30 20:10:57 +000010658 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010659fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010660
10661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010662done
10663case $ac_lo in
10664?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010665'') if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010666 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010667See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010668echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010669See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010670 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010671 else
10672 ac_cv_sizeof_size_t=0
10673 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010674esac
10675else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010676 cat >conftest.$ac_ext <<_ACEOF
10677/* confdefs.h. */
10678_ACEOF
10679cat confdefs.h >>conftest.$ac_ext
10680cat >>conftest.$ac_ext <<_ACEOF
10681/* end confdefs.h. */
10682$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010683 typedef size_t ac__type_sizeof_;
10684static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10685static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010686#include <stdio.h>
10687#include <stdlib.h>
10688int
10689main ()
10690{
10691
10692 FILE *f = fopen ("conftest.val", "w");
10693 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010694 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010695 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010696 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010697 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010698 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010699 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010700 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010701 }
10702 else
10703 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010704 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010705 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010706 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010707 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010708 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010709 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010710
10711 ;
10712 return 0;
10713}
10714_ACEOF
10715rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010716if { (ac_try="$ac_link"
10717case "(($ac_try" in
10718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10719 *) ac_try_echo=$ac_try;;
10720esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010722 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010723 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010725 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010726 { (case "(($ac_try" in
10727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10728 *) ac_try_echo=$ac_try;;
10729esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010731 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010732 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010734 (exit $ac_status); }; }; then
10735 ac_cv_sizeof_size_t=`cat conftest.val`
10736else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010737 echo "$as_me: program exited with status $ac_status" >&5
10738echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010739sed 's/^/| /' conftest.$ac_ext >&5
10740
10741( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010742if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010743 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010744See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010745echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010746See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010747 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010748 else
10749 ac_cv_sizeof_size_t=0
10750 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010751fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010752rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010753fi
10754rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010755fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010756{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10757echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010758
10759
10760
Martin v. Löwis18e16552006-02-15 17:27:45 +000010761cat >>confdefs.h <<_ACEOF
10762#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10763_ACEOF
10764
10765
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010766{ echo "$as_me:$LINENO: checking for pid_t" >&5
10767echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10768if test "${ac_cv_type_pid_t+set}" = set; then
10769 echo $ECHO_N "(cached) $ECHO_C" >&6
10770else
10771 cat >conftest.$ac_ext <<_ACEOF
10772/* confdefs.h. */
10773_ACEOF
10774cat confdefs.h >>conftest.$ac_ext
10775cat >>conftest.$ac_ext <<_ACEOF
10776/* end confdefs.h. */
10777$ac_includes_default
10778typedef pid_t ac__type_new_;
10779int
10780main ()
10781{
10782if ((ac__type_new_ *) 0)
10783 return 0;
10784if (sizeof (ac__type_new_))
10785 return 0;
10786 ;
10787 return 0;
10788}
10789_ACEOF
10790rm -f conftest.$ac_objext
10791if { (ac_try="$ac_compile"
10792case "(($ac_try" in
10793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10794 *) ac_try_echo=$ac_try;;
10795esac
10796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10797 (eval "$ac_compile") 2>conftest.er1
10798 ac_status=$?
10799 grep -v '^ *+' conftest.er1 >conftest.err
10800 rm -f conftest.er1
10801 cat conftest.err >&5
10802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10803 (exit $ac_status); } && {
10804 test -z "$ac_c_werror_flag" ||
10805 test ! -s conftest.err
10806 } && test -s conftest.$ac_objext; then
10807 ac_cv_type_pid_t=yes
10808else
10809 echo "$as_me: failed program was:" >&5
10810sed 's/^/| /' conftest.$ac_ext >&5
10811
10812 ac_cv_type_pid_t=no
10813fi
10814
10815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10816fi
10817{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10818echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10819
Christian Heimes951cc0f2008-01-31 23:08:23 +000010820# The cast to long int works around a bug in the HP C Compiler
10821# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10822# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10823# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010824{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10825echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000010826if test "${ac_cv_sizeof_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010827 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +000010828else
10829 if test "$cross_compiling" = yes; then
10830 # Depending upon the size, compute the lo and hi bounds.
10831cat >conftest.$ac_ext <<_ACEOF
10832/* confdefs.h. */
10833_ACEOF
10834cat confdefs.h >>conftest.$ac_ext
10835cat >>conftest.$ac_ext <<_ACEOF
10836/* end confdefs.h. */
10837$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010838 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010839int
10840main ()
10841{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010842static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010843test_array [0] = 0
10844
10845 ;
10846 return 0;
10847}
10848_ACEOF
10849rm -f conftest.$ac_objext
10850if { (ac_try="$ac_compile"
10851case "(($ac_try" in
10852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10853 *) ac_try_echo=$ac_try;;
10854esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010856 (eval "$ac_compile") 2>conftest.er1
10857 ac_status=$?
10858 grep -v '^ *+' conftest.er1 >conftest.err
10859 rm -f conftest.er1
10860 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010862 (exit $ac_status); } && {
10863 test -z "$ac_c_werror_flag" ||
10864 test ! -s conftest.err
10865 } && test -s conftest.$ac_objext; then
10866 ac_lo=0 ac_mid=0
10867 while :; do
10868 cat >conftest.$ac_ext <<_ACEOF
10869/* confdefs.h. */
10870_ACEOF
10871cat confdefs.h >>conftest.$ac_ext
10872cat >>conftest.$ac_ext <<_ACEOF
10873/* end confdefs.h. */
10874$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010875 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010876int
10877main ()
10878{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010879static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010880test_array [0] = 0
10881
10882 ;
10883 return 0;
10884}
10885_ACEOF
10886rm -f conftest.$ac_objext
10887if { (ac_try="$ac_compile"
10888case "(($ac_try" in
10889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10890 *) ac_try_echo=$ac_try;;
10891esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010893 (eval "$ac_compile") 2>conftest.er1
10894 ac_status=$?
10895 grep -v '^ *+' conftest.er1 >conftest.err
10896 rm -f conftest.er1
10897 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010899 (exit $ac_status); } && {
10900 test -z "$ac_c_werror_flag" ||
10901 test ! -s conftest.err
10902 } && test -s conftest.$ac_objext; then
10903 ac_hi=$ac_mid; break
10904else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010905 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010906sed 's/^/| /' conftest.$ac_ext >&5
10907
10908 ac_lo=`expr $ac_mid + 1`
10909 if test $ac_lo -le $ac_mid; then
10910 ac_lo= ac_hi=
10911 break
10912 fi
10913 ac_mid=`expr 2 '*' $ac_mid + 1`
10914fi
10915
10916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10917 done
10918else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010919 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010920sed 's/^/| /' conftest.$ac_ext >&5
10921
10922 cat >conftest.$ac_ext <<_ACEOF
10923/* confdefs.h. */
10924_ACEOF
10925cat confdefs.h >>conftest.$ac_ext
10926cat >>conftest.$ac_ext <<_ACEOF
10927/* end confdefs.h. */
10928$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010929 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010930int
10931main ()
10932{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010933static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010934test_array [0] = 0
10935
10936 ;
10937 return 0;
10938}
10939_ACEOF
10940rm -f conftest.$ac_objext
10941if { (ac_try="$ac_compile"
10942case "(($ac_try" in
10943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10944 *) ac_try_echo=$ac_try;;
10945esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010947 (eval "$ac_compile") 2>conftest.er1
10948 ac_status=$?
10949 grep -v '^ *+' conftest.er1 >conftest.err
10950 rm -f conftest.er1
10951 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010953 (exit $ac_status); } && {
10954 test -z "$ac_c_werror_flag" ||
10955 test ! -s conftest.err
10956 } && test -s conftest.$ac_objext; then
10957 ac_hi=-1 ac_mid=-1
10958 while :; do
10959 cat >conftest.$ac_ext <<_ACEOF
10960/* confdefs.h. */
10961_ACEOF
10962cat confdefs.h >>conftest.$ac_ext
10963cat >>conftest.$ac_ext <<_ACEOF
10964/* end confdefs.h. */
10965$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010966 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010967int
10968main ()
10969{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010970static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010971test_array [0] = 0
10972
10973 ;
10974 return 0;
10975}
10976_ACEOF
10977rm -f conftest.$ac_objext
10978if { (ac_try="$ac_compile"
10979case "(($ac_try" in
10980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10981 *) ac_try_echo=$ac_try;;
10982esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010984 (eval "$ac_compile") 2>conftest.er1
10985 ac_status=$?
10986 grep -v '^ *+' conftest.er1 >conftest.err
10987 rm -f conftest.er1
10988 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010990 (exit $ac_status); } && {
10991 test -z "$ac_c_werror_flag" ||
10992 test ! -s conftest.err
10993 } && test -s conftest.$ac_objext; then
10994 ac_lo=$ac_mid; break
10995else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010996 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010997sed 's/^/| /' conftest.$ac_ext >&5
10998
10999 ac_hi=`expr '(' $ac_mid ')' - 1`
11000 if test $ac_mid -le $ac_hi; then
11001 ac_lo= ac_hi=
11002 break
11003 fi
11004 ac_mid=`expr 2 '*' $ac_mid`
11005fi
11006
11007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11008 done
11009else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011010 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011011sed 's/^/| /' conftest.$ac_ext >&5
11012
11013 ac_lo= ac_hi=
11014fi
11015
11016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11017fi
11018
11019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11020# Binary search between lo and hi bounds.
11021while test "x$ac_lo" != "x$ac_hi"; do
11022 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11023 cat >conftest.$ac_ext <<_ACEOF
11024/* confdefs.h. */
11025_ACEOF
11026cat confdefs.h >>conftest.$ac_ext
11027cat >>conftest.$ac_ext <<_ACEOF
11028/* end confdefs.h. */
11029$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011030 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011031int
11032main ()
11033{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011034static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011035test_array [0] = 0
11036
11037 ;
11038 return 0;
11039}
11040_ACEOF
11041rm -f conftest.$ac_objext
11042if { (ac_try="$ac_compile"
11043case "(($ac_try" in
11044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11045 *) ac_try_echo=$ac_try;;
11046esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011048 (eval "$ac_compile") 2>conftest.er1
11049 ac_status=$?
11050 grep -v '^ *+' conftest.er1 >conftest.err
11051 rm -f conftest.er1
11052 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011054 (exit $ac_status); } && {
11055 test -z "$ac_c_werror_flag" ||
11056 test ! -s conftest.err
11057 } && test -s conftest.$ac_objext; then
11058 ac_hi=$ac_mid
11059else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011060 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011061sed 's/^/| /' conftest.$ac_ext >&5
11062
11063 ac_lo=`expr '(' $ac_mid ')' + 1`
11064fi
11065
11066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11067done
11068case $ac_lo in
11069?*) ac_cv_sizeof_pid_t=$ac_lo;;
11070'') if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011071 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011072See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011073echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011074See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011075 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011076 else
11077 ac_cv_sizeof_pid_t=0
11078 fi ;;
11079esac
11080else
11081 cat >conftest.$ac_ext <<_ACEOF
11082/* confdefs.h. */
11083_ACEOF
11084cat confdefs.h >>conftest.$ac_ext
11085cat >>conftest.$ac_ext <<_ACEOF
11086/* end confdefs.h. */
11087$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011088 typedef pid_t ac__type_sizeof_;
11089static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11090static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011091#include <stdio.h>
11092#include <stdlib.h>
11093int
11094main ()
11095{
11096
11097 FILE *f = fopen ("conftest.val", "w");
11098 if (! f)
11099 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011100 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011101 {
11102 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011103 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011104 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011105 fprintf (f, "%ld\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011106 }
11107 else
11108 {
11109 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011110 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011111 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011112 fprintf (f, "%lu\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011113 }
11114 return ferror (f) || fclose (f) != 0;
11115
11116 ;
11117 return 0;
11118}
11119_ACEOF
11120rm -f conftest$ac_exeext
11121if { (ac_try="$ac_link"
11122case "(($ac_try" in
11123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11124 *) ac_try_echo=$ac_try;;
11125esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011127 (eval "$ac_link") 2>&5
11128 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011130 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11131 { (case "(($ac_try" in
11132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11133 *) ac_try_echo=$ac_try;;
11134esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011136 (eval "$ac_try") 2>&5
11137 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011139 (exit $ac_status); }; }; then
11140 ac_cv_sizeof_pid_t=`cat conftest.val`
11141else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011142 echo "$as_me: program exited with status $ac_status" >&5
11143echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011144sed 's/^/| /' conftest.$ac_ext >&5
11145
11146( exit $ac_status )
11147if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011148 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011149See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011150echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011151See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011152 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011153 else
11154 ac_cv_sizeof_pid_t=0
11155 fi
11156fi
11157rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11158fi
11159rm -f conftest.val
11160fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011161{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11162echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011163
11164
11165
11166cat >>confdefs.h <<_ACEOF
11167#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11168_ACEOF
11169
11170
Michael W. Hudson54241132001-12-07 15:38:26 +000011171
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011172{ echo "$as_me:$LINENO: checking for long long support" >&5
11173echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011174have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011175cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011176/* confdefs.h. */
11177_ACEOF
11178cat confdefs.h >>conftest.$ac_ext
11179cat >>conftest.$ac_ext <<_ACEOF
11180/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011181
Martin v. Löwis11437992002-04-12 09:54:03 +000011182int
11183main ()
11184{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011185long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011186 ;
11187 return 0;
11188}
11189_ACEOF
11190rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011191if { (ac_try="$ac_compile"
11192case "(($ac_try" in
11193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11194 *) ac_try_echo=$ac_try;;
11195esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011197 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011198 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011199 grep -v '^ *+' conftest.er1 >conftest.err
11200 rm -f conftest.er1
11201 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011203 (exit $ac_status); } && {
11204 test -z "$ac_c_werror_flag" ||
11205 test ! -s conftest.err
11206 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011207
11208
11209cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011210#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011211_ACEOF
11212
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011213 have_long_long=yes
11214
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011215else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011216 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011217sed 's/^/| /' conftest.$ac_ext >&5
11218
Martin v. Löwiseba40652007-08-30 20:10:57 +000011219
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011220fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011221
11222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011223{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11224echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011225if test "$have_long_long" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011226{ echo "$as_me:$LINENO: checking for long long" >&5
11227echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11228if test "${ac_cv_type_long_long+set}" = set; then
11229 echo $ECHO_N "(cached) $ECHO_C" >&6
11230else
11231 cat >conftest.$ac_ext <<_ACEOF
11232/* confdefs.h. */
11233_ACEOF
11234cat confdefs.h >>conftest.$ac_ext
11235cat >>conftest.$ac_ext <<_ACEOF
11236/* end confdefs.h. */
11237$ac_includes_default
11238typedef long long ac__type_new_;
11239int
11240main ()
11241{
11242if ((ac__type_new_ *) 0)
11243 return 0;
11244if (sizeof (ac__type_new_))
11245 return 0;
11246 ;
11247 return 0;
11248}
11249_ACEOF
11250rm -f conftest.$ac_objext
11251if { (ac_try="$ac_compile"
11252case "(($ac_try" in
11253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11254 *) ac_try_echo=$ac_try;;
11255esac
11256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11257 (eval "$ac_compile") 2>conftest.er1
11258 ac_status=$?
11259 grep -v '^ *+' conftest.er1 >conftest.err
11260 rm -f conftest.er1
11261 cat conftest.err >&5
11262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11263 (exit $ac_status); } && {
11264 test -z "$ac_c_werror_flag" ||
11265 test ! -s conftest.err
11266 } && test -s conftest.$ac_objext; then
11267 ac_cv_type_long_long=yes
11268else
11269 echo "$as_me: failed program was:" >&5
11270sed 's/^/| /' conftest.$ac_ext >&5
11271
11272 ac_cv_type_long_long=no
11273fi
11274
11275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11276fi
11277{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11278echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11279
Martin v. Löwiseba40652007-08-30 20:10:57 +000011280# The cast to long int works around a bug in the HP C Compiler
11281# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11282# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11283# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011284{ echo "$as_me:$LINENO: checking size of long long" >&5
11285echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011286if test "${ac_cv_sizeof_long_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011287 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011288else
Martin v. Löwis11437992002-04-12 09:54:03 +000011289 if test "$cross_compiling" = yes; then
11290 # Depending upon the size, compute the lo and hi bounds.
11291cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011292/* confdefs.h. */
11293_ACEOF
11294cat confdefs.h >>conftest.$ac_ext
11295cat >>conftest.$ac_ext <<_ACEOF
11296/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011297$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011298 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011299int
11300main ()
11301{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011302static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011303test_array [0] = 0
11304
11305 ;
11306 return 0;
11307}
11308_ACEOF
11309rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011310if { (ac_try="$ac_compile"
11311case "(($ac_try" in
11312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11313 *) ac_try_echo=$ac_try;;
11314esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011316 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011317 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011318 grep -v '^ *+' conftest.er1 >conftest.err
11319 rm -f conftest.er1
11320 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011322 (exit $ac_status); } && {
11323 test -z "$ac_c_werror_flag" ||
11324 test ! -s conftest.err
11325 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011326 ac_lo=0 ac_mid=0
11327 while :; do
11328 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011329/* confdefs.h. */
11330_ACEOF
11331cat confdefs.h >>conftest.$ac_ext
11332cat >>conftest.$ac_ext <<_ACEOF
11333/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011334$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011335 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011336int
11337main ()
11338{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011339static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011340test_array [0] = 0
11341
11342 ;
11343 return 0;
11344}
11345_ACEOF
11346rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011347if { (ac_try="$ac_compile"
11348case "(($ac_try" in
11349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11350 *) ac_try_echo=$ac_try;;
11351esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011353 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011354 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011355 grep -v '^ *+' conftest.er1 >conftest.err
11356 rm -f conftest.er1
11357 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011359 (exit $ac_status); } && {
11360 test -z "$ac_c_werror_flag" ||
11361 test ! -s conftest.err
11362 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011363 ac_hi=$ac_mid; break
11364else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011365 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011366sed 's/^/| /' conftest.$ac_ext >&5
11367
Martin v. Löwiseba40652007-08-30 20:10:57 +000011368 ac_lo=`expr $ac_mid + 1`
11369 if test $ac_lo -le $ac_mid; then
11370 ac_lo= ac_hi=
11371 break
11372 fi
11373 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011374fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011375
11376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011377 done
11378else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011379 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011380sed 's/^/| /' conftest.$ac_ext >&5
11381
Martin v. Löwiseba40652007-08-30 20:10:57 +000011382 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011383/* confdefs.h. */
11384_ACEOF
11385cat confdefs.h >>conftest.$ac_ext
11386cat >>conftest.$ac_ext <<_ACEOF
11387/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011388$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011389 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011390int
11391main ()
11392{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011393static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011394test_array [0] = 0
11395
11396 ;
11397 return 0;
11398}
11399_ACEOF
11400rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011401if { (ac_try="$ac_compile"
11402case "(($ac_try" in
11403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11404 *) ac_try_echo=$ac_try;;
11405esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011407 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011408 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011409 grep -v '^ *+' conftest.er1 >conftest.err
11410 rm -f conftest.er1
11411 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011413 (exit $ac_status); } && {
11414 test -z "$ac_c_werror_flag" ||
11415 test ! -s conftest.err
11416 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011417 ac_hi=-1 ac_mid=-1
11418 while :; do
11419 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011420/* confdefs.h. */
11421_ACEOF
11422cat confdefs.h >>conftest.$ac_ext
11423cat >>conftest.$ac_ext <<_ACEOF
11424/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011425$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011426 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011427int
11428main ()
11429{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011430static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011431test_array [0] = 0
11432
11433 ;
11434 return 0;
11435}
11436_ACEOF
11437rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011438if { (ac_try="$ac_compile"
11439case "(($ac_try" in
11440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11441 *) ac_try_echo=$ac_try;;
11442esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011444 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011445 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011446 grep -v '^ *+' conftest.er1 >conftest.err
11447 rm -f conftest.er1
11448 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011450 (exit $ac_status); } && {
11451 test -z "$ac_c_werror_flag" ||
11452 test ! -s conftest.err
11453 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011454 ac_lo=$ac_mid; break
11455else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011456 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011457sed 's/^/| /' conftest.$ac_ext >&5
11458
Martin v. Löwiseba40652007-08-30 20:10:57 +000011459 ac_hi=`expr '(' $ac_mid ')' - 1`
11460 if test $ac_mid -le $ac_hi; then
11461 ac_lo= ac_hi=
11462 break
11463 fi
11464 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011465fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011466
11467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011468 done
11469else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011470 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011471sed 's/^/| /' conftest.$ac_ext >&5
11472
Martin v. Löwiseba40652007-08-30 20:10:57 +000011473 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011474fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011475
11476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011477fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011478
11479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011480# Binary search between lo and hi bounds.
11481while test "x$ac_lo" != "x$ac_hi"; do
11482 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11483 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011484/* confdefs.h. */
11485_ACEOF
11486cat confdefs.h >>conftest.$ac_ext
11487cat >>conftest.$ac_ext <<_ACEOF
11488/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011489$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011490 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011491int
11492main ()
11493{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011494static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011495test_array [0] = 0
11496
11497 ;
11498 return 0;
11499}
11500_ACEOF
11501rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011502if { (ac_try="$ac_compile"
11503case "(($ac_try" in
11504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11505 *) ac_try_echo=$ac_try;;
11506esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011508 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011509 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011510 grep -v '^ *+' conftest.er1 >conftest.err
11511 rm -f conftest.er1
11512 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011514 (exit $ac_status); } && {
11515 test -z "$ac_c_werror_flag" ||
11516 test ! -s conftest.err
11517 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011518 ac_hi=$ac_mid
11519else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011520 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011521sed 's/^/| /' conftest.$ac_ext >&5
11522
Martin v. Löwiseba40652007-08-30 20:10:57 +000011523 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011524fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011525
11526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011527done
11528case $ac_lo in
11529?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011530'') if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011531 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011532See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011533echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011534See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011535 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011536 else
11537 ac_cv_sizeof_long_long=0
11538 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011539esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011540else
Martin v. Löwis11437992002-04-12 09:54:03 +000011541 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011542/* confdefs.h. */
11543_ACEOF
11544cat confdefs.h >>conftest.$ac_ext
11545cat >>conftest.$ac_ext <<_ACEOF
11546/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011547$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011548 typedef long long ac__type_sizeof_;
11549static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11550static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011551#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011552#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011553int
11554main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011555{
Martin v. Löwis11437992002-04-12 09:54:03 +000011556
11557 FILE *f = fopen ("conftest.val", "w");
11558 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011559 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011560 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011561 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011562 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011563 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011564 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011565 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011566 }
11567 else
11568 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011569 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011570 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011571 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011572 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011573 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011574 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011575
11576 ;
11577 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011578}
Martin v. Löwis11437992002-04-12 09:54:03 +000011579_ACEOF
11580rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011581if { (ac_try="$ac_link"
11582case "(($ac_try" in
11583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11584 *) ac_try_echo=$ac_try;;
11585esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011587 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011588 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011590 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011591 { (case "(($ac_try" in
11592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11593 *) ac_try_echo=$ac_try;;
11594esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011596 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011597 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011599 (exit $ac_status); }; }; then
11600 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011601else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011602 echo "$as_me: program exited with status $ac_status" >&5
11603echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011604sed 's/^/| /' conftest.$ac_ext >&5
11605
Martin v. Löwis11437992002-04-12 09:54:03 +000011606( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011607if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011608 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011609See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011610echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011611See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011612 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011613 else
11614 ac_cv_sizeof_long_long=0
11615 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011616fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011617rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011618fi
11619rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011620fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011621{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11622echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011623
11624
11625
Martin v. Löwis11437992002-04-12 09:54:03 +000011626cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011627#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011628_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011629
Michael W. Hudson54241132001-12-07 15:38:26 +000011630
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011631fi
11632
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011633{ echo "$as_me:$LINENO: checking for long double support" >&5
11634echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011635have_long_double=no
11636cat >conftest.$ac_ext <<_ACEOF
11637/* confdefs.h. */
11638_ACEOF
11639cat confdefs.h >>conftest.$ac_ext
11640cat >>conftest.$ac_ext <<_ACEOF
11641/* end confdefs.h. */
11642
11643int
11644main ()
11645{
11646long double x; x = (long double)0.;
11647 ;
11648 return 0;
11649}
11650_ACEOF
11651rm -f conftest.$ac_objext
11652if { (ac_try="$ac_compile"
11653case "(($ac_try" in
11654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11655 *) ac_try_echo=$ac_try;;
11656esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011658 (eval "$ac_compile") 2>conftest.er1
11659 ac_status=$?
11660 grep -v '^ *+' conftest.er1 >conftest.err
11661 rm -f conftest.er1
11662 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011664 (exit $ac_status); } && {
11665 test -z "$ac_c_werror_flag" ||
11666 test ! -s conftest.err
11667 } && test -s conftest.$ac_objext; then
11668
11669
11670cat >>confdefs.h <<\_ACEOF
11671#define HAVE_LONG_DOUBLE 1
11672_ACEOF
11673
11674 have_long_double=yes
11675
11676else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011677 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011678sed 's/^/| /' conftest.$ac_ext >&5
11679
11680
11681fi
11682
11683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011684{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11685echo "${ECHO_T}$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011686if test "$have_long_double" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011687{ echo "$as_me:$LINENO: checking for long double" >&5
11688echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11689if test "${ac_cv_type_long_double+set}" = set; then
11690 echo $ECHO_N "(cached) $ECHO_C" >&6
11691else
11692 cat >conftest.$ac_ext <<_ACEOF
11693/* confdefs.h. */
11694_ACEOF
11695cat confdefs.h >>conftest.$ac_ext
11696cat >>conftest.$ac_ext <<_ACEOF
11697/* end confdefs.h. */
11698$ac_includes_default
11699typedef long double ac__type_new_;
11700int
11701main ()
11702{
11703if ((ac__type_new_ *) 0)
11704 return 0;
11705if (sizeof (ac__type_new_))
11706 return 0;
11707 ;
11708 return 0;
11709}
11710_ACEOF
11711rm -f conftest.$ac_objext
11712if { (ac_try="$ac_compile"
11713case "(($ac_try" in
11714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11715 *) ac_try_echo=$ac_try;;
11716esac
11717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11718 (eval "$ac_compile") 2>conftest.er1
11719 ac_status=$?
11720 grep -v '^ *+' conftest.er1 >conftest.err
11721 rm -f conftest.er1
11722 cat conftest.err >&5
11723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11724 (exit $ac_status); } && {
11725 test -z "$ac_c_werror_flag" ||
11726 test ! -s conftest.err
11727 } && test -s conftest.$ac_objext; then
11728 ac_cv_type_long_double=yes
11729else
11730 echo "$as_me: failed program was:" >&5
11731sed 's/^/| /' conftest.$ac_ext >&5
11732
11733 ac_cv_type_long_double=no
11734fi
11735
11736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11737fi
11738{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11739echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11740
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011741# The cast to long int works around a bug in the HP C Compiler
11742# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11743# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11744# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011745{ echo "$as_me:$LINENO: checking size of long double" >&5
11746echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011747if test "${ac_cv_sizeof_long_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011748 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011749else
11750 if test "$cross_compiling" = yes; then
11751 # Depending upon the size, compute the lo and hi bounds.
11752cat >conftest.$ac_ext <<_ACEOF
11753/* confdefs.h. */
11754_ACEOF
11755cat confdefs.h >>conftest.$ac_ext
11756cat >>conftest.$ac_ext <<_ACEOF
11757/* end confdefs.h. */
11758$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011759 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011760int
11761main ()
11762{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011763static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011764test_array [0] = 0
11765
11766 ;
11767 return 0;
11768}
11769_ACEOF
11770rm -f conftest.$ac_objext
11771if { (ac_try="$ac_compile"
11772case "(($ac_try" in
11773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11774 *) ac_try_echo=$ac_try;;
11775esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011777 (eval "$ac_compile") 2>conftest.er1
11778 ac_status=$?
11779 grep -v '^ *+' conftest.er1 >conftest.err
11780 rm -f conftest.er1
11781 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011783 (exit $ac_status); } && {
11784 test -z "$ac_c_werror_flag" ||
11785 test ! -s conftest.err
11786 } && test -s conftest.$ac_objext; then
11787 ac_lo=0 ac_mid=0
11788 while :; do
11789 cat >conftest.$ac_ext <<_ACEOF
11790/* confdefs.h. */
11791_ACEOF
11792cat confdefs.h >>conftest.$ac_ext
11793cat >>conftest.$ac_ext <<_ACEOF
11794/* end confdefs.h. */
11795$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011796 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011797int
11798main ()
11799{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011800static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011801test_array [0] = 0
11802
11803 ;
11804 return 0;
11805}
11806_ACEOF
11807rm -f conftest.$ac_objext
11808if { (ac_try="$ac_compile"
11809case "(($ac_try" in
11810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11811 *) ac_try_echo=$ac_try;;
11812esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011814 (eval "$ac_compile") 2>conftest.er1
11815 ac_status=$?
11816 grep -v '^ *+' conftest.er1 >conftest.err
11817 rm -f conftest.er1
11818 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011820 (exit $ac_status); } && {
11821 test -z "$ac_c_werror_flag" ||
11822 test ! -s conftest.err
11823 } && test -s conftest.$ac_objext; then
11824 ac_hi=$ac_mid; break
11825else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011826 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011827sed 's/^/| /' conftest.$ac_ext >&5
11828
11829 ac_lo=`expr $ac_mid + 1`
11830 if test $ac_lo -le $ac_mid; then
11831 ac_lo= ac_hi=
11832 break
11833 fi
11834 ac_mid=`expr 2 '*' $ac_mid + 1`
11835fi
11836
11837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11838 done
11839else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011840 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011841sed 's/^/| /' conftest.$ac_ext >&5
11842
11843 cat >conftest.$ac_ext <<_ACEOF
11844/* confdefs.h. */
11845_ACEOF
11846cat confdefs.h >>conftest.$ac_ext
11847cat >>conftest.$ac_ext <<_ACEOF
11848/* end confdefs.h. */
11849$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011850 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011851int
11852main ()
11853{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011854static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011855test_array [0] = 0
11856
11857 ;
11858 return 0;
11859}
11860_ACEOF
11861rm -f conftest.$ac_objext
11862if { (ac_try="$ac_compile"
11863case "(($ac_try" in
11864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11865 *) ac_try_echo=$ac_try;;
11866esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011868 (eval "$ac_compile") 2>conftest.er1
11869 ac_status=$?
11870 grep -v '^ *+' conftest.er1 >conftest.err
11871 rm -f conftest.er1
11872 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011874 (exit $ac_status); } && {
11875 test -z "$ac_c_werror_flag" ||
11876 test ! -s conftest.err
11877 } && test -s conftest.$ac_objext; then
11878 ac_hi=-1 ac_mid=-1
11879 while :; do
11880 cat >conftest.$ac_ext <<_ACEOF
11881/* confdefs.h. */
11882_ACEOF
11883cat confdefs.h >>conftest.$ac_ext
11884cat >>conftest.$ac_ext <<_ACEOF
11885/* end confdefs.h. */
11886$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011887 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011888int
11889main ()
11890{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011891static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011892test_array [0] = 0
11893
11894 ;
11895 return 0;
11896}
11897_ACEOF
11898rm -f conftest.$ac_objext
11899if { (ac_try="$ac_compile"
11900case "(($ac_try" in
11901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11902 *) ac_try_echo=$ac_try;;
11903esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011905 (eval "$ac_compile") 2>conftest.er1
11906 ac_status=$?
11907 grep -v '^ *+' conftest.er1 >conftest.err
11908 rm -f conftest.er1
11909 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011911 (exit $ac_status); } && {
11912 test -z "$ac_c_werror_flag" ||
11913 test ! -s conftest.err
11914 } && test -s conftest.$ac_objext; then
11915 ac_lo=$ac_mid; break
11916else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011917 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011918sed 's/^/| /' conftest.$ac_ext >&5
11919
11920 ac_hi=`expr '(' $ac_mid ')' - 1`
11921 if test $ac_mid -le $ac_hi; then
11922 ac_lo= ac_hi=
11923 break
11924 fi
11925 ac_mid=`expr 2 '*' $ac_mid`
11926fi
11927
11928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11929 done
11930else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011931 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011932sed 's/^/| /' conftest.$ac_ext >&5
11933
11934 ac_lo= ac_hi=
11935fi
11936
11937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11938fi
11939
11940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11941# Binary search between lo and hi bounds.
11942while test "x$ac_lo" != "x$ac_hi"; do
11943 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11944 cat >conftest.$ac_ext <<_ACEOF
11945/* confdefs.h. */
11946_ACEOF
11947cat confdefs.h >>conftest.$ac_ext
11948cat >>conftest.$ac_ext <<_ACEOF
11949/* end confdefs.h. */
11950$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011951 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011952int
11953main ()
11954{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011955static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011956test_array [0] = 0
11957
11958 ;
11959 return 0;
11960}
11961_ACEOF
11962rm -f conftest.$ac_objext
11963if { (ac_try="$ac_compile"
11964case "(($ac_try" in
11965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11966 *) ac_try_echo=$ac_try;;
11967esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011969 (eval "$ac_compile") 2>conftest.er1
11970 ac_status=$?
11971 grep -v '^ *+' conftest.er1 >conftest.err
11972 rm -f conftest.er1
11973 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011975 (exit $ac_status); } && {
11976 test -z "$ac_c_werror_flag" ||
11977 test ! -s conftest.err
11978 } && test -s conftest.$ac_objext; then
11979 ac_hi=$ac_mid
11980else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011981 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011982sed 's/^/| /' conftest.$ac_ext >&5
11983
11984 ac_lo=`expr '(' $ac_mid ')' + 1`
11985fi
11986
11987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11988done
11989case $ac_lo in
11990?*) ac_cv_sizeof_long_double=$ac_lo;;
11991'') if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011992 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011993See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011994echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011995See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011996 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011997 else
11998 ac_cv_sizeof_long_double=0
11999 fi ;;
12000esac
12001else
12002 cat >conftest.$ac_ext <<_ACEOF
12003/* confdefs.h. */
12004_ACEOF
12005cat confdefs.h >>conftest.$ac_ext
12006cat >>conftest.$ac_ext <<_ACEOF
12007/* end confdefs.h. */
12008$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012009 typedef long double ac__type_sizeof_;
12010static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12011static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012012#include <stdio.h>
12013#include <stdlib.h>
12014int
12015main ()
12016{
12017
12018 FILE *f = fopen ("conftest.val", "w");
12019 if (! f)
12020 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012021 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012022 {
12023 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012024 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012025 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012026 fprintf (f, "%ld\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012027 }
12028 else
12029 {
12030 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012031 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012032 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012033 fprintf (f, "%lu\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012034 }
12035 return ferror (f) || fclose (f) != 0;
12036
12037 ;
12038 return 0;
12039}
12040_ACEOF
12041rm -f conftest$ac_exeext
12042if { (ac_try="$ac_link"
12043case "(($ac_try" in
12044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12045 *) ac_try_echo=$ac_try;;
12046esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012048 (eval "$ac_link") 2>&5
12049 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012051 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12052 { (case "(($ac_try" in
12053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12054 *) ac_try_echo=$ac_try;;
12055esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012057 (eval "$ac_try") 2>&5
12058 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012060 (exit $ac_status); }; }; then
12061 ac_cv_sizeof_long_double=`cat conftest.val`
12062else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012063 echo "$as_me: program exited with status $ac_status" >&5
12064echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012065sed 's/^/| /' conftest.$ac_ext >&5
12066
12067( exit $ac_status )
12068if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012069 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012070See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012071echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012072See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012073 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012074 else
12075 ac_cv_sizeof_long_double=0
12076 fi
12077fi
12078rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12079fi
12080rm -f conftest.val
12081fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012082{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12083echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012084
12085
12086
12087cat >>confdefs.h <<_ACEOF
12088#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12089_ACEOF
12090
12091
12092fi
12093
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012094{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12095echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012096have_c99_bool=no
12097cat >conftest.$ac_ext <<_ACEOF
12098/* confdefs.h. */
12099_ACEOF
12100cat confdefs.h >>conftest.$ac_ext
12101cat >>conftest.$ac_ext <<_ACEOF
12102/* end confdefs.h. */
12103
12104int
12105main ()
12106{
12107_Bool x; x = (_Bool)0;
12108 ;
12109 return 0;
12110}
12111_ACEOF
12112rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012113if { (ac_try="$ac_compile"
12114case "(($ac_try" in
12115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12116 *) ac_try_echo=$ac_try;;
12117esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012119 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012120 ac_status=$?
12121 grep -v '^ *+' conftest.er1 >conftest.err
12122 rm -f conftest.er1
12123 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012125 (exit $ac_status); } && {
12126 test -z "$ac_c_werror_flag" ||
12127 test ! -s conftest.err
12128 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012129
12130
12131cat >>confdefs.h <<\_ACEOF
12132#define HAVE_C99_BOOL 1
12133_ACEOF
12134
12135 have_c99_bool=yes
12136
12137else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012138 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012139sed 's/^/| /' conftest.$ac_ext >&5
12140
Martin v. Löwiseba40652007-08-30 20:10:57 +000012141
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012142fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012143
12144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012145{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12146echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012147if test "$have_c99_bool" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012148{ echo "$as_me:$LINENO: checking for _Bool" >&5
12149echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12150if test "${ac_cv_type__Bool+set}" = set; then
12151 echo $ECHO_N "(cached) $ECHO_C" >&6
12152else
12153 cat >conftest.$ac_ext <<_ACEOF
12154/* confdefs.h. */
12155_ACEOF
12156cat confdefs.h >>conftest.$ac_ext
12157cat >>conftest.$ac_ext <<_ACEOF
12158/* end confdefs.h. */
12159$ac_includes_default
12160typedef _Bool ac__type_new_;
12161int
12162main ()
12163{
12164if ((ac__type_new_ *) 0)
12165 return 0;
12166if (sizeof (ac__type_new_))
12167 return 0;
12168 ;
12169 return 0;
12170}
12171_ACEOF
12172rm -f conftest.$ac_objext
12173if { (ac_try="$ac_compile"
12174case "(($ac_try" in
12175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12176 *) ac_try_echo=$ac_try;;
12177esac
12178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12179 (eval "$ac_compile") 2>conftest.er1
12180 ac_status=$?
12181 grep -v '^ *+' conftest.er1 >conftest.err
12182 rm -f conftest.er1
12183 cat conftest.err >&5
12184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12185 (exit $ac_status); } && {
12186 test -z "$ac_c_werror_flag" ||
12187 test ! -s conftest.err
12188 } && test -s conftest.$ac_objext; then
12189 ac_cv_type__Bool=yes
12190else
12191 echo "$as_me: failed program was:" >&5
12192sed 's/^/| /' conftest.$ac_ext >&5
12193
12194 ac_cv_type__Bool=no
12195fi
12196
12197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12198fi
12199{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12200echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12201
Martin v. Löwiseba40652007-08-30 20:10:57 +000012202# The cast to long int works around a bug in the HP C Compiler
12203# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12204# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12205# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012206{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12207echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012208if test "${ac_cv_sizeof__Bool+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012209 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012210else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012211 if test "$cross_compiling" = yes; then
12212 # Depending upon the size, compute the lo and hi bounds.
12213cat >conftest.$ac_ext <<_ACEOF
12214/* confdefs.h. */
12215_ACEOF
12216cat confdefs.h >>conftest.$ac_ext
12217cat >>conftest.$ac_ext <<_ACEOF
12218/* end confdefs.h. */
12219$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012220 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012221int
12222main ()
12223{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012224static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012225test_array [0] = 0
12226
12227 ;
12228 return 0;
12229}
12230_ACEOF
12231rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012232if { (ac_try="$ac_compile"
12233case "(($ac_try" in
12234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12235 *) ac_try_echo=$ac_try;;
12236esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012238 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012239 ac_status=$?
12240 grep -v '^ *+' conftest.er1 >conftest.err
12241 rm -f conftest.er1
12242 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012244 (exit $ac_status); } && {
12245 test -z "$ac_c_werror_flag" ||
12246 test ! -s conftest.err
12247 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012248 ac_lo=0 ac_mid=0
12249 while :; do
12250 cat >conftest.$ac_ext <<_ACEOF
12251/* confdefs.h. */
12252_ACEOF
12253cat confdefs.h >>conftest.$ac_ext
12254cat >>conftest.$ac_ext <<_ACEOF
12255/* end confdefs.h. */
12256$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012257 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012258int
12259main ()
12260{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012261static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012262test_array [0] = 0
12263
12264 ;
12265 return 0;
12266}
12267_ACEOF
12268rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012269if { (ac_try="$ac_compile"
12270case "(($ac_try" in
12271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12272 *) ac_try_echo=$ac_try;;
12273esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012274eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012275 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012276 ac_status=$?
12277 grep -v '^ *+' conftest.er1 >conftest.err
12278 rm -f conftest.er1
12279 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012281 (exit $ac_status); } && {
12282 test -z "$ac_c_werror_flag" ||
12283 test ! -s conftest.err
12284 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012285 ac_hi=$ac_mid; break
12286else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012287 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012288sed 's/^/| /' conftest.$ac_ext >&5
12289
Martin v. Löwiseba40652007-08-30 20:10:57 +000012290 ac_lo=`expr $ac_mid + 1`
12291 if test $ac_lo -le $ac_mid; then
12292 ac_lo= ac_hi=
12293 break
12294 fi
12295 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012296fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012297
12298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012299 done
12300else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012301 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012302sed 's/^/| /' conftest.$ac_ext >&5
12303
Martin v. Löwiseba40652007-08-30 20:10:57 +000012304 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012305/* confdefs.h. */
12306_ACEOF
12307cat confdefs.h >>conftest.$ac_ext
12308cat >>conftest.$ac_ext <<_ACEOF
12309/* end confdefs.h. */
12310$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012311 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012312int
12313main ()
12314{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012315static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012316test_array [0] = 0
12317
12318 ;
12319 return 0;
12320}
12321_ACEOF
12322rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012323if { (ac_try="$ac_compile"
12324case "(($ac_try" in
12325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12326 *) ac_try_echo=$ac_try;;
12327esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012329 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012330 ac_status=$?
12331 grep -v '^ *+' conftest.er1 >conftest.err
12332 rm -f conftest.er1
12333 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012335 (exit $ac_status); } && {
12336 test -z "$ac_c_werror_flag" ||
12337 test ! -s conftest.err
12338 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012339 ac_hi=-1 ac_mid=-1
12340 while :; do
12341 cat >conftest.$ac_ext <<_ACEOF
12342/* confdefs.h. */
12343_ACEOF
12344cat confdefs.h >>conftest.$ac_ext
12345cat >>conftest.$ac_ext <<_ACEOF
12346/* end confdefs.h. */
12347$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012348 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012349int
12350main ()
12351{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012352static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012353test_array [0] = 0
12354
12355 ;
12356 return 0;
12357}
12358_ACEOF
12359rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012360if { (ac_try="$ac_compile"
12361case "(($ac_try" in
12362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12363 *) ac_try_echo=$ac_try;;
12364esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012366 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012367 ac_status=$?
12368 grep -v '^ *+' conftest.er1 >conftest.err
12369 rm -f conftest.er1
12370 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012372 (exit $ac_status); } && {
12373 test -z "$ac_c_werror_flag" ||
12374 test ! -s conftest.err
12375 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012376 ac_lo=$ac_mid; break
12377else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012378 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012379sed 's/^/| /' conftest.$ac_ext >&5
12380
Martin v. Löwiseba40652007-08-30 20:10:57 +000012381 ac_hi=`expr '(' $ac_mid ')' - 1`
12382 if test $ac_mid -le $ac_hi; then
12383 ac_lo= ac_hi=
12384 break
12385 fi
12386 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012387fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012388
12389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012390 done
12391else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012392 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012393sed 's/^/| /' conftest.$ac_ext >&5
12394
Martin v. Löwiseba40652007-08-30 20:10:57 +000012395 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012396fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012397
12398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012399fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012400
12401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012402# Binary search between lo and hi bounds.
12403while test "x$ac_lo" != "x$ac_hi"; do
12404 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12405 cat >conftest.$ac_ext <<_ACEOF
12406/* confdefs.h. */
12407_ACEOF
12408cat confdefs.h >>conftest.$ac_ext
12409cat >>conftest.$ac_ext <<_ACEOF
12410/* end confdefs.h. */
12411$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012412 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012413int
12414main ()
12415{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012416static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012417test_array [0] = 0
12418
12419 ;
12420 return 0;
12421}
12422_ACEOF
12423rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012424if { (ac_try="$ac_compile"
12425case "(($ac_try" in
12426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12427 *) ac_try_echo=$ac_try;;
12428esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012430 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012431 ac_status=$?
12432 grep -v '^ *+' conftest.er1 >conftest.err
12433 rm -f conftest.er1
12434 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012436 (exit $ac_status); } && {
12437 test -z "$ac_c_werror_flag" ||
12438 test ! -s conftest.err
12439 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012440 ac_hi=$ac_mid
12441else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012442 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012443sed 's/^/| /' conftest.$ac_ext >&5
12444
Martin v. Löwiseba40652007-08-30 20:10:57 +000012445 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012446fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012447
12448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012449done
12450case $ac_lo in
12451?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012452'') if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012453 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012454See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012455echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012456See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012457 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012458 else
12459 ac_cv_sizeof__Bool=0
12460 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012461esac
12462else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012463 cat >conftest.$ac_ext <<_ACEOF
12464/* confdefs.h. */
12465_ACEOF
12466cat confdefs.h >>conftest.$ac_ext
12467cat >>conftest.$ac_ext <<_ACEOF
12468/* end confdefs.h. */
12469$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012470 typedef _Bool ac__type_sizeof_;
12471static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12472static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012473#include <stdio.h>
12474#include <stdlib.h>
12475int
12476main ()
12477{
12478
12479 FILE *f = fopen ("conftest.val", "w");
12480 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012481 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012482 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012483 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012484 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012485 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012486 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012487 fprintf (f, "%ld\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012488 }
12489 else
12490 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012491 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012492 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012493 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012494 fprintf (f, "%lu\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012495 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012496 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012497
12498 ;
12499 return 0;
12500}
12501_ACEOF
12502rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012503if { (ac_try="$ac_link"
12504case "(($ac_try" in
12505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12506 *) ac_try_echo=$ac_try;;
12507esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012509 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012510 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012512 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012513 { (case "(($ac_try" in
12514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12515 *) ac_try_echo=$ac_try;;
12516esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012518 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012519 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012521 (exit $ac_status); }; }; then
12522 ac_cv_sizeof__Bool=`cat conftest.val`
12523else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012524 echo "$as_me: program exited with status $ac_status" >&5
12525echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012526sed 's/^/| /' conftest.$ac_ext >&5
12527
12528( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012529if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012530 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012531See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012532echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012533See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012534 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012535 else
12536 ac_cv_sizeof__Bool=0
12537 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012539rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012540fi
12541rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012542fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012543{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12544echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012545
12546
12547
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012548cat >>confdefs.h <<_ACEOF
12549#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12550_ACEOF
12551
12552
12553fi
12554
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012555{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12556echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012557if test "${ac_cv_type_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012558 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebe26702006-10-02 14:55:51 +000012559else
12560 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012561/* confdefs.h. */
12562_ACEOF
12563cat confdefs.h >>conftest.$ac_ext
12564cat >>conftest.$ac_ext <<_ACEOF
12565/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012566#ifdef HAVE_STDINT_H
12567 #include <stdint.h>
12568 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012569
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012570typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012571int
12572main ()
12573{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012574if ((ac__type_new_ *) 0)
12575 return 0;
12576if (sizeof (ac__type_new_))
12577 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012578 ;
12579 return 0;
12580}
12581_ACEOF
12582rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012583if { (ac_try="$ac_compile"
12584case "(($ac_try" in
12585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12586 *) ac_try_echo=$ac_try;;
12587esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012589 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012590 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012591 grep -v '^ *+' conftest.er1 >conftest.err
12592 rm -f conftest.er1
12593 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012595 (exit $ac_status); } && {
12596 test -z "$ac_c_werror_flag" ||
12597 test ! -s conftest.err
12598 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012599 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012600else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012601 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012602sed 's/^/| /' conftest.$ac_ext >&5
12603
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012604 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012605fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012606
12607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012608fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012609{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12610echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12611if test $ac_cv_type_uintptr_t = yes; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012612
12613cat >>confdefs.h <<_ACEOF
12614#define HAVE_UINTPTR_T 1
12615_ACEOF
12616
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012617{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12618echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12619if test "${ac_cv_type_uintptr_t+set}" = set; then
12620 echo $ECHO_N "(cached) $ECHO_C" >&6
12621else
12622 cat >conftest.$ac_ext <<_ACEOF
12623/* confdefs.h. */
12624_ACEOF
12625cat confdefs.h >>conftest.$ac_ext
12626cat >>conftest.$ac_ext <<_ACEOF
12627/* end confdefs.h. */
12628$ac_includes_default
12629typedef uintptr_t ac__type_new_;
12630int
12631main ()
12632{
12633if ((ac__type_new_ *) 0)
12634 return 0;
12635if (sizeof (ac__type_new_))
12636 return 0;
12637 ;
12638 return 0;
12639}
12640_ACEOF
12641rm -f conftest.$ac_objext
12642if { (ac_try="$ac_compile"
12643case "(($ac_try" in
12644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12645 *) ac_try_echo=$ac_try;;
12646esac
12647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12648 (eval "$ac_compile") 2>conftest.er1
12649 ac_status=$?
12650 grep -v '^ *+' conftest.er1 >conftest.err
12651 rm -f conftest.er1
12652 cat conftest.err >&5
12653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12654 (exit $ac_status); } && {
12655 test -z "$ac_c_werror_flag" ||
12656 test ! -s conftest.err
12657 } && test -s conftest.$ac_objext; then
12658 ac_cv_type_uintptr_t=yes
12659else
12660 echo "$as_me: failed program was:" >&5
12661sed 's/^/| /' conftest.$ac_ext >&5
12662
12663 ac_cv_type_uintptr_t=no
12664fi
12665
12666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12667fi
12668{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12669echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12670
Martin v. Löwiseba40652007-08-30 20:10:57 +000012671# The cast to long int works around a bug in the HP C Compiler
12672# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12673# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12674# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012675{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12676echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012677if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012678 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012679else
Martin v. Löwis11437992002-04-12 09:54:03 +000012680 if test "$cross_compiling" = yes; then
12681 # Depending upon the size, compute the lo and hi bounds.
12682cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012683/* confdefs.h. */
12684_ACEOF
12685cat confdefs.h >>conftest.$ac_ext
12686cat >>conftest.$ac_ext <<_ACEOF
12687/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012688$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012689 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012690int
12691main ()
12692{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012693static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012694test_array [0] = 0
12695
12696 ;
12697 return 0;
12698}
12699_ACEOF
12700rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012701if { (ac_try="$ac_compile"
12702case "(($ac_try" in
12703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12704 *) ac_try_echo=$ac_try;;
12705esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012707 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012708 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012709 grep -v '^ *+' conftest.er1 >conftest.err
12710 rm -f conftest.er1
12711 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012713 (exit $ac_status); } && {
12714 test -z "$ac_c_werror_flag" ||
12715 test ! -s conftest.err
12716 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012717 ac_lo=0 ac_mid=0
12718 while :; do
12719 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012720/* confdefs.h. */
12721_ACEOF
12722cat confdefs.h >>conftest.$ac_ext
12723cat >>conftest.$ac_ext <<_ACEOF
12724/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012725$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012726 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012727int
12728main ()
12729{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012730static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012731test_array [0] = 0
12732
12733 ;
12734 return 0;
12735}
12736_ACEOF
12737rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012738if { (ac_try="$ac_compile"
12739case "(($ac_try" in
12740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12741 *) ac_try_echo=$ac_try;;
12742esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012744 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012745 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012746 grep -v '^ *+' conftest.er1 >conftest.err
12747 rm -f conftest.er1
12748 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012750 (exit $ac_status); } && {
12751 test -z "$ac_c_werror_flag" ||
12752 test ! -s conftest.err
12753 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012754 ac_hi=$ac_mid; break
12755else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012756 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012757sed 's/^/| /' conftest.$ac_ext >&5
12758
Martin v. Löwiseba40652007-08-30 20:10:57 +000012759 ac_lo=`expr $ac_mid + 1`
12760 if test $ac_lo -le $ac_mid; then
12761 ac_lo= ac_hi=
12762 break
12763 fi
12764 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012765fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012766
12767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012768 done
12769else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012770 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012771sed 's/^/| /' conftest.$ac_ext >&5
12772
Martin v. Löwiseba40652007-08-30 20:10:57 +000012773 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012774/* confdefs.h. */
12775_ACEOF
12776cat confdefs.h >>conftest.$ac_ext
12777cat >>conftest.$ac_ext <<_ACEOF
12778/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012779$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012780 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012781int
12782main ()
12783{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012784static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012785test_array [0] = 0
12786
12787 ;
12788 return 0;
12789}
12790_ACEOF
12791rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012792if { (ac_try="$ac_compile"
12793case "(($ac_try" in
12794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12795 *) ac_try_echo=$ac_try;;
12796esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012798 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012799 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012800 grep -v '^ *+' conftest.er1 >conftest.err
12801 rm -f conftest.er1
12802 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012804 (exit $ac_status); } && {
12805 test -z "$ac_c_werror_flag" ||
12806 test ! -s conftest.err
12807 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012808 ac_hi=-1 ac_mid=-1
12809 while :; do
12810 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012811/* confdefs.h. */
12812_ACEOF
12813cat confdefs.h >>conftest.$ac_ext
12814cat >>conftest.$ac_ext <<_ACEOF
12815/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012816$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012817 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012818int
12819main ()
12820{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012821static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012822test_array [0] = 0
12823
12824 ;
12825 return 0;
12826}
12827_ACEOF
12828rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012829if { (ac_try="$ac_compile"
12830case "(($ac_try" in
12831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12832 *) ac_try_echo=$ac_try;;
12833esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012835 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012836 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012837 grep -v '^ *+' conftest.er1 >conftest.err
12838 rm -f conftest.er1
12839 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012841 (exit $ac_status); } && {
12842 test -z "$ac_c_werror_flag" ||
12843 test ! -s conftest.err
12844 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012845 ac_lo=$ac_mid; break
12846else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012848sed 's/^/| /' conftest.$ac_ext >&5
12849
Martin v. Löwiseba40652007-08-30 20:10:57 +000012850 ac_hi=`expr '(' $ac_mid ')' - 1`
12851 if test $ac_mid -le $ac_hi; then
12852 ac_lo= ac_hi=
12853 break
12854 fi
12855 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012856fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012857
12858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012859 done
12860else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012861 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012862sed 's/^/| /' conftest.$ac_ext >&5
12863
Martin v. Löwiseba40652007-08-30 20:10:57 +000012864 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012865fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012866
12867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012868fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012869
12870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012871# Binary search between lo and hi bounds.
12872while test "x$ac_lo" != "x$ac_hi"; do
12873 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12874 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012875/* confdefs.h. */
12876_ACEOF
12877cat confdefs.h >>conftest.$ac_ext
12878cat >>conftest.$ac_ext <<_ACEOF
12879/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012880$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012881 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012882int
12883main ()
12884{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012885static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012886test_array [0] = 0
12887
12888 ;
12889 return 0;
12890}
12891_ACEOF
12892rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012893if { (ac_try="$ac_compile"
12894case "(($ac_try" in
12895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12896 *) ac_try_echo=$ac_try;;
12897esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012899 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012900 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012901 grep -v '^ *+' conftest.er1 >conftest.err
12902 rm -f conftest.er1
12903 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012905 (exit $ac_status); } && {
12906 test -z "$ac_c_werror_flag" ||
12907 test ! -s conftest.err
12908 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012909 ac_hi=$ac_mid
12910else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012911 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012912sed 's/^/| /' conftest.$ac_ext >&5
12913
Martin v. Löwiseba40652007-08-30 20:10:57 +000012914 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012915fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012916
12917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012918done
12919case $ac_lo in
12920?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012921'') if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012922 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012923See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012924echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012925See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012926 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012927 else
12928 ac_cv_sizeof_uintptr_t=0
12929 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012930esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012931else
Martin v. Löwis11437992002-04-12 09:54:03 +000012932 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012933/* confdefs.h. */
12934_ACEOF
12935cat confdefs.h >>conftest.$ac_ext
12936cat >>conftest.$ac_ext <<_ACEOF
12937/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012938$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012939 typedef uintptr_t ac__type_sizeof_;
12940static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12941static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012942#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012943#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012944int
12945main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012946{
Martin v. Löwis11437992002-04-12 09:54:03 +000012947
12948 FILE *f = fopen ("conftest.val", "w");
12949 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012950 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012951 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012952 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012953 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012954 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012955 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012956 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012957 }
12958 else
12959 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012960 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012961 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012962 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012963 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012964 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012965 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012966
12967 ;
12968 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012969}
Martin v. Löwis11437992002-04-12 09:54:03 +000012970_ACEOF
12971rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012972if { (ac_try="$ac_link"
12973case "(($ac_try" in
12974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12975 *) ac_try_echo=$ac_try;;
12976esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012978 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012979 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012981 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012982 { (case "(($ac_try" in
12983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12984 *) ac_try_echo=$ac_try;;
12985esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012987 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012988 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012990 (exit $ac_status); }; }; then
12991 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012992else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012993 echo "$as_me: program exited with status $ac_status" >&5
12994echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012995sed 's/^/| /' conftest.$ac_ext >&5
12996
Martin v. Löwis11437992002-04-12 09:54:03 +000012997( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012998if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012999 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013000See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013001echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013002See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013003 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013004 else
13005 ac_cv_sizeof_uintptr_t=0
13006 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013007fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013008rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013009fi
13010rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013011fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013012{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13013echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013014
13015
13016
Martin v. Löwis11437992002-04-12 09:54:03 +000013017cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013018#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013019_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013020
Michael W. Hudson54241132001-12-07 15:38:26 +000013021
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013022fi
13023
Martin v. Löwisebe26702006-10-02 14:55:51 +000013024
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013025{ echo "$as_me:$LINENO: checking for off_t" >&5
13026echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
13027if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013028 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013029else
Martin v. Löwis11437992002-04-12 09:54:03 +000013030 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013031/* confdefs.h. */
13032_ACEOF
13033cat confdefs.h >>conftest.$ac_ext
13034cat >>conftest.$ac_ext <<_ACEOF
13035/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013036
13037#ifdef HAVE_SYS_TYPES_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013038#include <sys/types.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013039#endif
13040
13041
13042typedef off_t ac__type_new_;
13043int
13044main ()
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013045{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013046if ((ac__type_new_ *) 0)
13047 return 0;
13048if (sizeof (ac__type_new_))
13049 return 0;
13050 ;
13051 return 0;
13052}
13053_ACEOF
13054rm -f conftest.$ac_objext
13055if { (ac_try="$ac_compile"
13056case "(($ac_try" in
13057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13058 *) ac_try_echo=$ac_try;;
13059esac
13060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13061 (eval "$ac_compile") 2>conftest.er1
13062 ac_status=$?
13063 grep -v '^ *+' conftest.er1 >conftest.err
13064 rm -f conftest.er1
13065 cat conftest.err >&5
13066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13067 (exit $ac_status); } && {
13068 test -z "$ac_c_werror_flag" ||
13069 test ! -s conftest.err
13070 } && test -s conftest.$ac_objext; then
13071 ac_cv_type_off_t=yes
13072else
13073 echo "$as_me: failed program was:" >&5
13074sed 's/^/| /' conftest.$ac_ext >&5
13075
13076 ac_cv_type_off_t=no
13077fi
13078
13079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13080fi
13081{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13082echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13083
13084# The cast to long int works around a bug in the HP C Compiler
13085# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13086# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13087# This bug is HP SR number 8606223364.
13088{ echo "$as_me:$LINENO: checking size of off_t" >&5
13089echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
13090if test "${ac_cv_sizeof_off_t+set}" = set; then
13091 echo $ECHO_N "(cached) $ECHO_C" >&6
13092else
13093 if test "$cross_compiling" = yes; then
13094 # Depending upon the size, compute the lo and hi bounds.
13095cat >conftest.$ac_ext <<_ACEOF
13096/* confdefs.h. */
13097_ACEOF
13098cat confdefs.h >>conftest.$ac_ext
13099cat >>conftest.$ac_ext <<_ACEOF
13100/* end confdefs.h. */
13101
13102#ifdef HAVE_SYS_TYPES_H
13103#include <sys/types.h>
13104#endif
13105
13106
13107 typedef off_t ac__type_sizeof_;
13108int
13109main ()
13110{
13111static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13112test_array [0] = 0
13113
13114 ;
13115 return 0;
13116}
13117_ACEOF
13118rm -f conftest.$ac_objext
13119if { (ac_try="$ac_compile"
13120case "(($ac_try" in
13121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13122 *) ac_try_echo=$ac_try;;
13123esac
13124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13125 (eval "$ac_compile") 2>conftest.er1
13126 ac_status=$?
13127 grep -v '^ *+' conftest.er1 >conftest.err
13128 rm -f conftest.er1
13129 cat conftest.err >&5
13130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13131 (exit $ac_status); } && {
13132 test -z "$ac_c_werror_flag" ||
13133 test ! -s conftest.err
13134 } && test -s conftest.$ac_objext; then
13135 ac_lo=0 ac_mid=0
13136 while :; do
13137 cat >conftest.$ac_ext <<_ACEOF
13138/* confdefs.h. */
13139_ACEOF
13140cat confdefs.h >>conftest.$ac_ext
13141cat >>conftest.$ac_ext <<_ACEOF
13142/* end confdefs.h. */
13143
13144#ifdef HAVE_SYS_TYPES_H
13145#include <sys/types.h>
13146#endif
13147
13148
13149 typedef off_t ac__type_sizeof_;
13150int
13151main ()
13152{
13153static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13154test_array [0] = 0
13155
13156 ;
13157 return 0;
13158}
13159_ACEOF
13160rm -f conftest.$ac_objext
13161if { (ac_try="$ac_compile"
13162case "(($ac_try" in
13163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13164 *) ac_try_echo=$ac_try;;
13165esac
13166eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13167 (eval "$ac_compile") 2>conftest.er1
13168 ac_status=$?
13169 grep -v '^ *+' conftest.er1 >conftest.err
13170 rm -f conftest.er1
13171 cat conftest.err >&5
13172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13173 (exit $ac_status); } && {
13174 test -z "$ac_c_werror_flag" ||
13175 test ! -s conftest.err
13176 } && test -s conftest.$ac_objext; then
13177 ac_hi=$ac_mid; break
13178else
13179 echo "$as_me: failed program was:" >&5
13180sed 's/^/| /' conftest.$ac_ext >&5
13181
13182 ac_lo=`expr $ac_mid + 1`
13183 if test $ac_lo -le $ac_mid; then
13184 ac_lo= ac_hi=
13185 break
13186 fi
13187 ac_mid=`expr 2 '*' $ac_mid + 1`
13188fi
13189
13190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13191 done
13192else
13193 echo "$as_me: failed program was:" >&5
13194sed 's/^/| /' conftest.$ac_ext >&5
13195
13196 cat >conftest.$ac_ext <<_ACEOF
13197/* confdefs.h. */
13198_ACEOF
13199cat confdefs.h >>conftest.$ac_ext
13200cat >>conftest.$ac_ext <<_ACEOF
13201/* end confdefs.h. */
13202
13203#ifdef HAVE_SYS_TYPES_H
13204#include <sys/types.h>
13205#endif
13206
13207
13208 typedef off_t ac__type_sizeof_;
13209int
13210main ()
13211{
13212static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13213test_array [0] = 0
13214
13215 ;
13216 return 0;
13217}
13218_ACEOF
13219rm -f conftest.$ac_objext
13220if { (ac_try="$ac_compile"
13221case "(($ac_try" in
13222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13223 *) ac_try_echo=$ac_try;;
13224esac
13225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13226 (eval "$ac_compile") 2>conftest.er1
13227 ac_status=$?
13228 grep -v '^ *+' conftest.er1 >conftest.err
13229 rm -f conftest.er1
13230 cat conftest.err >&5
13231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13232 (exit $ac_status); } && {
13233 test -z "$ac_c_werror_flag" ||
13234 test ! -s conftest.err
13235 } && test -s conftest.$ac_objext; then
13236 ac_hi=-1 ac_mid=-1
13237 while :; do
13238 cat >conftest.$ac_ext <<_ACEOF
13239/* confdefs.h. */
13240_ACEOF
13241cat confdefs.h >>conftest.$ac_ext
13242cat >>conftest.$ac_ext <<_ACEOF
13243/* end confdefs.h. */
13244
13245#ifdef HAVE_SYS_TYPES_H
13246#include <sys/types.h>
13247#endif
13248
13249
13250 typedef off_t ac__type_sizeof_;
13251int
13252main ()
13253{
13254static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13255test_array [0] = 0
13256
13257 ;
13258 return 0;
13259}
13260_ACEOF
13261rm -f conftest.$ac_objext
13262if { (ac_try="$ac_compile"
13263case "(($ac_try" in
13264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13265 *) ac_try_echo=$ac_try;;
13266esac
13267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13268 (eval "$ac_compile") 2>conftest.er1
13269 ac_status=$?
13270 grep -v '^ *+' conftest.er1 >conftest.err
13271 rm -f conftest.er1
13272 cat conftest.err >&5
13273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13274 (exit $ac_status); } && {
13275 test -z "$ac_c_werror_flag" ||
13276 test ! -s conftest.err
13277 } && test -s conftest.$ac_objext; then
13278 ac_lo=$ac_mid; break
13279else
13280 echo "$as_me: failed program was:" >&5
13281sed 's/^/| /' conftest.$ac_ext >&5
13282
13283 ac_hi=`expr '(' $ac_mid ')' - 1`
13284 if test $ac_mid -le $ac_hi; then
13285 ac_lo= ac_hi=
13286 break
13287 fi
13288 ac_mid=`expr 2 '*' $ac_mid`
13289fi
13290
13291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13292 done
13293else
13294 echo "$as_me: failed program was:" >&5
13295sed 's/^/| /' conftest.$ac_ext >&5
13296
13297 ac_lo= ac_hi=
13298fi
13299
13300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13301fi
13302
13303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13304# Binary search between lo and hi bounds.
13305while test "x$ac_lo" != "x$ac_hi"; do
13306 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13307 cat >conftest.$ac_ext <<_ACEOF
13308/* confdefs.h. */
13309_ACEOF
13310cat confdefs.h >>conftest.$ac_ext
13311cat >>conftest.$ac_ext <<_ACEOF
13312/* end confdefs.h. */
13313
13314#ifdef HAVE_SYS_TYPES_H
13315#include <sys/types.h>
13316#endif
13317
13318
13319 typedef off_t ac__type_sizeof_;
13320int
13321main ()
13322{
13323static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13324test_array [0] = 0
13325
13326 ;
13327 return 0;
13328}
13329_ACEOF
13330rm -f conftest.$ac_objext
13331if { (ac_try="$ac_compile"
13332case "(($ac_try" in
13333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13334 *) ac_try_echo=$ac_try;;
13335esac
13336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13337 (eval "$ac_compile") 2>conftest.er1
13338 ac_status=$?
13339 grep -v '^ *+' conftest.er1 >conftest.err
13340 rm -f conftest.er1
13341 cat conftest.err >&5
13342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13343 (exit $ac_status); } && {
13344 test -z "$ac_c_werror_flag" ||
13345 test ! -s conftest.err
13346 } && test -s conftest.$ac_objext; then
13347 ac_hi=$ac_mid
13348else
13349 echo "$as_me: failed program was:" >&5
13350sed 's/^/| /' conftest.$ac_ext >&5
13351
13352 ac_lo=`expr '(' $ac_mid ')' + 1`
13353fi
13354
13355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13356done
13357case $ac_lo in
13358?*) ac_cv_sizeof_off_t=$ac_lo;;
13359'') if test "$ac_cv_type_off_t" = yes; then
13360 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13361See \`config.log' for more details." >&5
13362echo "$as_me: error: cannot compute sizeof (off_t)
13363See \`config.log' for more details." >&2;}
13364 { (exit 77); exit 77; }; }
13365 else
13366 ac_cv_sizeof_off_t=0
13367 fi ;;
13368esac
13369else
13370 cat >conftest.$ac_ext <<_ACEOF
13371/* confdefs.h. */
13372_ACEOF
13373cat confdefs.h >>conftest.$ac_ext
13374cat >>conftest.$ac_ext <<_ACEOF
13375/* end confdefs.h. */
13376
13377#ifdef HAVE_SYS_TYPES_H
13378#include <sys/types.h>
13379#endif
13380
13381
13382 typedef off_t ac__type_sizeof_;
13383static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13384static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13385#include <stdio.h>
13386#include <stdlib.h>
13387int
13388main ()
13389{
13390
13391 FILE *f = fopen ("conftest.val", "w");
13392 if (! f)
13393 return 1;
13394 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13395 {
13396 long int i = longval ();
13397 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13398 return 1;
13399 fprintf (f, "%ld\n", i);
13400 }
13401 else
13402 {
13403 unsigned long int i = ulongval ();
13404 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13405 return 1;
13406 fprintf (f, "%lu\n", i);
13407 }
13408 return ferror (f) || fclose (f) != 0;
13409
13410 ;
13411 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013412}
Martin v. Löwis11437992002-04-12 09:54:03 +000013413_ACEOF
13414rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013415if { (ac_try="$ac_link"
13416case "(($ac_try" in
13417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13418 *) ac_try_echo=$ac_try;;
13419esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013421 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013422 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013424 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013425 { (case "(($ac_try" in
13426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13427 *) ac_try_echo=$ac_try;;
13428esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013430 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013431 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013433 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013434 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013435else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013436 echo "$as_me: program exited with status $ac_status" >&5
13437echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013438sed 's/^/| /' conftest.$ac_ext >&5
13439
Martin v. Löwis11437992002-04-12 09:54:03 +000013440( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013441if test "$ac_cv_type_off_t" = yes; then
13442 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13443See \`config.log' for more details." >&5
13444echo "$as_me: error: cannot compute sizeof (off_t)
13445See \`config.log' for more details." >&2;}
13446 { (exit 77); exit 77; }; }
13447 else
13448 ac_cv_sizeof_off_t=0
13449 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013450fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013451rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013452fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013453rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013454fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013455{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13456echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013457
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013458
13459
Martin v. Löwis11437992002-04-12 09:54:03 +000013460cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013461#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013462_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013463
Michael W. Hudson54241132001-12-07 15:38:26 +000013464
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013465
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013466{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13467echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013468if test "$have_long_long" = yes -a \
13469 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
13470 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013471
Martin v. Löwis11437992002-04-12 09:54:03 +000013472cat >>confdefs.h <<\_ACEOF
13473#define HAVE_LARGEFILE_SUPPORT 1
13474_ACEOF
13475
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013476 { echo "$as_me:$LINENO: result: yes" >&5
13477echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013478else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013479 { echo "$as_me:$LINENO: result: no" >&5
13480echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013481fi
13482
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013483{ echo "$as_me:$LINENO: checking for time_t" >&5
13484echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13485if test "${ac_cv_type_time_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013486 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013487else
Martin v. Löwis11437992002-04-12 09:54:03 +000013488 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013489/* confdefs.h. */
13490_ACEOF
13491cat confdefs.h >>conftest.$ac_ext
13492cat >>conftest.$ac_ext <<_ACEOF
13493/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013494
13495#ifdef HAVE_SYS_TYPES_H
13496#include <sys/types.h>
13497#endif
13498#ifdef HAVE_TIME_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013499#include <time.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013500#endif
13501
13502
13503typedef time_t ac__type_new_;
13504int
13505main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013506{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013507if ((ac__type_new_ *) 0)
13508 return 0;
13509if (sizeof (ac__type_new_))
13510 return 0;
13511 ;
13512 return 0;
13513}
13514_ACEOF
13515rm -f conftest.$ac_objext
13516if { (ac_try="$ac_compile"
13517case "(($ac_try" in
13518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13519 *) ac_try_echo=$ac_try;;
13520esac
13521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13522 (eval "$ac_compile") 2>conftest.er1
13523 ac_status=$?
13524 grep -v '^ *+' conftest.er1 >conftest.err
13525 rm -f conftest.er1
13526 cat conftest.err >&5
13527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13528 (exit $ac_status); } && {
13529 test -z "$ac_c_werror_flag" ||
13530 test ! -s conftest.err
13531 } && test -s conftest.$ac_objext; then
13532 ac_cv_type_time_t=yes
13533else
13534 echo "$as_me: failed program was:" >&5
13535sed 's/^/| /' conftest.$ac_ext >&5
13536
13537 ac_cv_type_time_t=no
13538fi
13539
13540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13541fi
13542{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13543echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13544
13545# The cast to long int works around a bug in the HP C Compiler
13546# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13547# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13548# This bug is HP SR number 8606223364.
13549{ echo "$as_me:$LINENO: checking size of time_t" >&5
13550echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
13551if test "${ac_cv_sizeof_time_t+set}" = set; then
13552 echo $ECHO_N "(cached) $ECHO_C" >&6
13553else
13554 if test "$cross_compiling" = yes; then
13555 # Depending upon the size, compute the lo and hi bounds.
13556cat >conftest.$ac_ext <<_ACEOF
13557/* confdefs.h. */
13558_ACEOF
13559cat confdefs.h >>conftest.$ac_ext
13560cat >>conftest.$ac_ext <<_ACEOF
13561/* end confdefs.h. */
13562
13563#ifdef HAVE_SYS_TYPES_H
13564#include <sys/types.h>
13565#endif
13566#ifdef HAVE_TIME_H
13567#include <time.h>
13568#endif
13569
13570
13571 typedef time_t ac__type_sizeof_;
13572int
13573main ()
13574{
13575static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13576test_array [0] = 0
13577
13578 ;
13579 return 0;
13580}
13581_ACEOF
13582rm -f conftest.$ac_objext
13583if { (ac_try="$ac_compile"
13584case "(($ac_try" in
13585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13586 *) ac_try_echo=$ac_try;;
13587esac
13588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13589 (eval "$ac_compile") 2>conftest.er1
13590 ac_status=$?
13591 grep -v '^ *+' conftest.er1 >conftest.err
13592 rm -f conftest.er1
13593 cat conftest.err >&5
13594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13595 (exit $ac_status); } && {
13596 test -z "$ac_c_werror_flag" ||
13597 test ! -s conftest.err
13598 } && test -s conftest.$ac_objext; then
13599 ac_lo=0 ac_mid=0
13600 while :; do
13601 cat >conftest.$ac_ext <<_ACEOF
13602/* confdefs.h. */
13603_ACEOF
13604cat confdefs.h >>conftest.$ac_ext
13605cat >>conftest.$ac_ext <<_ACEOF
13606/* end confdefs.h. */
13607
13608#ifdef HAVE_SYS_TYPES_H
13609#include <sys/types.h>
13610#endif
13611#ifdef HAVE_TIME_H
13612#include <time.h>
13613#endif
13614
13615
13616 typedef time_t ac__type_sizeof_;
13617int
13618main ()
13619{
13620static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13621test_array [0] = 0
13622
13623 ;
13624 return 0;
13625}
13626_ACEOF
13627rm -f conftest.$ac_objext
13628if { (ac_try="$ac_compile"
13629case "(($ac_try" in
13630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13631 *) ac_try_echo=$ac_try;;
13632esac
13633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13634 (eval "$ac_compile") 2>conftest.er1
13635 ac_status=$?
13636 grep -v '^ *+' conftest.er1 >conftest.err
13637 rm -f conftest.er1
13638 cat conftest.err >&5
13639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13640 (exit $ac_status); } && {
13641 test -z "$ac_c_werror_flag" ||
13642 test ! -s conftest.err
13643 } && test -s conftest.$ac_objext; then
13644 ac_hi=$ac_mid; break
13645else
13646 echo "$as_me: failed program was:" >&5
13647sed 's/^/| /' conftest.$ac_ext >&5
13648
13649 ac_lo=`expr $ac_mid + 1`
13650 if test $ac_lo -le $ac_mid; then
13651 ac_lo= ac_hi=
13652 break
13653 fi
13654 ac_mid=`expr 2 '*' $ac_mid + 1`
13655fi
13656
13657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13658 done
13659else
13660 echo "$as_me: failed program was:" >&5
13661sed 's/^/| /' conftest.$ac_ext >&5
13662
13663 cat >conftest.$ac_ext <<_ACEOF
13664/* confdefs.h. */
13665_ACEOF
13666cat confdefs.h >>conftest.$ac_ext
13667cat >>conftest.$ac_ext <<_ACEOF
13668/* end confdefs.h. */
13669
13670#ifdef HAVE_SYS_TYPES_H
13671#include <sys/types.h>
13672#endif
13673#ifdef HAVE_TIME_H
13674#include <time.h>
13675#endif
13676
13677
13678 typedef time_t ac__type_sizeof_;
13679int
13680main ()
13681{
13682static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13683test_array [0] = 0
13684
13685 ;
13686 return 0;
13687}
13688_ACEOF
13689rm -f conftest.$ac_objext
13690if { (ac_try="$ac_compile"
13691case "(($ac_try" in
13692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13693 *) ac_try_echo=$ac_try;;
13694esac
13695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13696 (eval "$ac_compile") 2>conftest.er1
13697 ac_status=$?
13698 grep -v '^ *+' conftest.er1 >conftest.err
13699 rm -f conftest.er1
13700 cat conftest.err >&5
13701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13702 (exit $ac_status); } && {
13703 test -z "$ac_c_werror_flag" ||
13704 test ! -s conftest.err
13705 } && test -s conftest.$ac_objext; then
13706 ac_hi=-1 ac_mid=-1
13707 while :; do
13708 cat >conftest.$ac_ext <<_ACEOF
13709/* confdefs.h. */
13710_ACEOF
13711cat confdefs.h >>conftest.$ac_ext
13712cat >>conftest.$ac_ext <<_ACEOF
13713/* end confdefs.h. */
13714
13715#ifdef HAVE_SYS_TYPES_H
13716#include <sys/types.h>
13717#endif
13718#ifdef HAVE_TIME_H
13719#include <time.h>
13720#endif
13721
13722
13723 typedef time_t ac__type_sizeof_;
13724int
13725main ()
13726{
13727static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13728test_array [0] = 0
13729
13730 ;
13731 return 0;
13732}
13733_ACEOF
13734rm -f conftest.$ac_objext
13735if { (ac_try="$ac_compile"
13736case "(($ac_try" in
13737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13738 *) ac_try_echo=$ac_try;;
13739esac
13740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13741 (eval "$ac_compile") 2>conftest.er1
13742 ac_status=$?
13743 grep -v '^ *+' conftest.er1 >conftest.err
13744 rm -f conftest.er1
13745 cat conftest.err >&5
13746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13747 (exit $ac_status); } && {
13748 test -z "$ac_c_werror_flag" ||
13749 test ! -s conftest.err
13750 } && test -s conftest.$ac_objext; then
13751 ac_lo=$ac_mid; break
13752else
13753 echo "$as_me: failed program was:" >&5
13754sed 's/^/| /' conftest.$ac_ext >&5
13755
13756 ac_hi=`expr '(' $ac_mid ')' - 1`
13757 if test $ac_mid -le $ac_hi; then
13758 ac_lo= ac_hi=
13759 break
13760 fi
13761 ac_mid=`expr 2 '*' $ac_mid`
13762fi
13763
13764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13765 done
13766else
13767 echo "$as_me: failed program was:" >&5
13768sed 's/^/| /' conftest.$ac_ext >&5
13769
13770 ac_lo= ac_hi=
13771fi
13772
13773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13774fi
13775
13776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13777# Binary search between lo and hi bounds.
13778while test "x$ac_lo" != "x$ac_hi"; do
13779 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13780 cat >conftest.$ac_ext <<_ACEOF
13781/* confdefs.h. */
13782_ACEOF
13783cat confdefs.h >>conftest.$ac_ext
13784cat >>conftest.$ac_ext <<_ACEOF
13785/* end confdefs.h. */
13786
13787#ifdef HAVE_SYS_TYPES_H
13788#include <sys/types.h>
13789#endif
13790#ifdef HAVE_TIME_H
13791#include <time.h>
13792#endif
13793
13794
13795 typedef time_t ac__type_sizeof_;
13796int
13797main ()
13798{
13799static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13800test_array [0] = 0
13801
13802 ;
13803 return 0;
13804}
13805_ACEOF
13806rm -f conftest.$ac_objext
13807if { (ac_try="$ac_compile"
13808case "(($ac_try" in
13809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13810 *) ac_try_echo=$ac_try;;
13811esac
13812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13813 (eval "$ac_compile") 2>conftest.er1
13814 ac_status=$?
13815 grep -v '^ *+' conftest.er1 >conftest.err
13816 rm -f conftest.er1
13817 cat conftest.err >&5
13818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13819 (exit $ac_status); } && {
13820 test -z "$ac_c_werror_flag" ||
13821 test ! -s conftest.err
13822 } && test -s conftest.$ac_objext; then
13823 ac_hi=$ac_mid
13824else
13825 echo "$as_me: failed program was:" >&5
13826sed 's/^/| /' conftest.$ac_ext >&5
13827
13828 ac_lo=`expr '(' $ac_mid ')' + 1`
13829fi
13830
13831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13832done
13833case $ac_lo in
13834?*) ac_cv_sizeof_time_t=$ac_lo;;
13835'') if test "$ac_cv_type_time_t" = yes; then
13836 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13837See \`config.log' for more details." >&5
13838echo "$as_me: error: cannot compute sizeof (time_t)
13839See \`config.log' for more details." >&2;}
13840 { (exit 77); exit 77; }; }
13841 else
13842 ac_cv_sizeof_time_t=0
13843 fi ;;
13844esac
13845else
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_;
13862static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13863static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13864#include <stdio.h>
13865#include <stdlib.h>
13866int
13867main ()
13868{
13869
13870 FILE *f = fopen ("conftest.val", "w");
13871 if (! f)
13872 return 1;
13873 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13874 {
13875 long int i = longval ();
13876 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13877 return 1;
13878 fprintf (f, "%ld\n", i);
13879 }
13880 else
13881 {
13882 unsigned long int i = ulongval ();
13883 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13884 return 1;
13885 fprintf (f, "%lu\n", i);
13886 }
13887 return ferror (f) || fclose (f) != 0;
13888
13889 ;
13890 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013891}
Martin v. Löwis11437992002-04-12 09:54:03 +000013892_ACEOF
13893rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013894if { (ac_try="$ac_link"
13895case "(($ac_try" in
13896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13897 *) ac_try_echo=$ac_try;;
13898esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013900 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013901 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013903 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013904 { (case "(($ac_try" in
13905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13906 *) ac_try_echo=$ac_try;;
13907esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013909 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013910 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013912 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013913 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013914else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013915 echo "$as_me: program exited with status $ac_status" >&5
13916echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013917sed 's/^/| /' conftest.$ac_ext >&5
13918
Martin v. Löwis11437992002-04-12 09:54:03 +000013919( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013920if test "$ac_cv_type_time_t" = yes; then
13921 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13922See \`config.log' for more details." >&5
13923echo "$as_me: error: cannot compute sizeof (time_t)
13924See \`config.log' for more details." >&2;}
13925 { (exit 77); exit 77; }; }
13926 else
13927 ac_cv_sizeof_time_t=0
13928 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013929fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013930rm -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 +000013931fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013932rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013933fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013934{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13935echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013936
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013937
13938
Martin v. Löwis11437992002-04-12 09:54:03 +000013939cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013940#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013941_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013942
Michael W. Hudson54241132001-12-07 15:38:26 +000013943
13944
Trent Mick635f6fb2000-08-23 21:33:05 +000013945# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013946ac_save_cc="$CC"
13947if test "$ac_cv_kpthread" = "yes"
13948then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013949elif test "$ac_cv_kthread" = "yes"
13950then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013951elif test "$ac_cv_pthread" = "yes"
13952then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013953fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013954{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13955echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013956have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013957cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013958/* confdefs.h. */
13959_ACEOF
13960cat confdefs.h >>conftest.$ac_ext
13961cat >>conftest.$ac_ext <<_ACEOF
13962/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013963#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013964int
13965main ()
13966{
Guido van Rossum12580492000-09-24 16:47:19 +000013967pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013968 ;
13969 return 0;
13970}
13971_ACEOF
13972rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013973if { (ac_try="$ac_compile"
13974case "(($ac_try" in
13975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13976 *) ac_try_echo=$ac_try;;
13977esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013979 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013980 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013981 grep -v '^ *+' conftest.er1 >conftest.err
13982 rm -f conftest.er1
13983 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013985 (exit $ac_status); } && {
13986 test -z "$ac_c_werror_flag" ||
13987 test ! -s conftest.err
13988 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013989 have_pthread_t=yes
13990else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013991 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013992sed 's/^/| /' conftest.$ac_ext >&5
13993
Martin v. Löwiseba40652007-08-30 20:10:57 +000013994
Trent Mick635f6fb2000-08-23 21:33:05 +000013995fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013996
13997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013998{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13999echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014000if test "$have_pthread_t" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014001 { echo "$as_me:$LINENO: checking for pthread_t" >&5
14002echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
14003if test "${ac_cv_type_pthread_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014004 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000014005else
Martin v. Löwis11437992002-04-12 09:54:03 +000014006 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014007/* confdefs.h. */
14008_ACEOF
14009cat confdefs.h >>conftest.$ac_ext
14010cat >>conftest.$ac_ext <<_ACEOF
14011/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014012
14013#ifdef HAVE_PTHREAD_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014014#include <pthread.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014015#endif
14016
14017
14018typedef pthread_t ac__type_new_;
14019int
14020main ()
14021{
14022if ((ac__type_new_ *) 0)
14023 return 0;
14024if (sizeof (ac__type_new_))
14025 return 0;
14026 ;
14027 return 0;
14028}
14029_ACEOF
14030rm -f conftest.$ac_objext
14031if { (ac_try="$ac_compile"
14032case "(($ac_try" in
14033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14034 *) ac_try_echo=$ac_try;;
14035esac
14036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14037 (eval "$ac_compile") 2>conftest.er1
14038 ac_status=$?
14039 grep -v '^ *+' conftest.er1 >conftest.err
14040 rm -f conftest.er1
14041 cat conftest.err >&5
14042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14043 (exit $ac_status); } && {
14044 test -z "$ac_c_werror_flag" ||
14045 test ! -s conftest.err
14046 } && test -s conftest.$ac_objext; then
14047 ac_cv_type_pthread_t=yes
14048else
14049 echo "$as_me: failed program was:" >&5
14050sed 's/^/| /' conftest.$ac_ext >&5
14051
14052 ac_cv_type_pthread_t=no
14053fi
14054
14055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14056fi
14057{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14058echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14059
14060# The cast to long int works around a bug in the HP C Compiler
14061# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14062# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14063# This bug is HP SR number 8606223364.
14064{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14065echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
14066if test "${ac_cv_sizeof_pthread_t+set}" = set; then
14067 echo $ECHO_N "(cached) $ECHO_C" >&6
14068else
14069 if test "$cross_compiling" = yes; then
14070 # Depending upon the size, compute the lo and hi bounds.
14071cat >conftest.$ac_ext <<_ACEOF
14072/* confdefs.h. */
14073_ACEOF
14074cat confdefs.h >>conftest.$ac_ext
14075cat >>conftest.$ac_ext <<_ACEOF
14076/* end confdefs.h. */
14077
14078#ifdef HAVE_PTHREAD_H
14079#include <pthread.h>
14080#endif
14081
14082
14083 typedef pthread_t ac__type_sizeof_;
14084int
14085main ()
14086{
14087static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
14088test_array [0] = 0
14089
14090 ;
14091 return 0;
14092}
14093_ACEOF
14094rm -f conftest.$ac_objext
14095if { (ac_try="$ac_compile"
14096case "(($ac_try" in
14097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14098 *) ac_try_echo=$ac_try;;
14099esac
14100eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14101 (eval "$ac_compile") 2>conftest.er1
14102 ac_status=$?
14103 grep -v '^ *+' conftest.er1 >conftest.err
14104 rm -f conftest.er1
14105 cat conftest.err >&5
14106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14107 (exit $ac_status); } && {
14108 test -z "$ac_c_werror_flag" ||
14109 test ! -s conftest.err
14110 } && test -s conftest.$ac_objext; then
14111 ac_lo=0 ac_mid=0
14112 while :; do
14113 cat >conftest.$ac_ext <<_ACEOF
14114/* confdefs.h. */
14115_ACEOF
14116cat confdefs.h >>conftest.$ac_ext
14117cat >>conftest.$ac_ext <<_ACEOF
14118/* end confdefs.h. */
14119
14120#ifdef HAVE_PTHREAD_H
14121#include <pthread.h>
14122#endif
14123
14124
14125 typedef pthread_t ac__type_sizeof_;
14126int
14127main ()
14128{
14129static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14130test_array [0] = 0
14131
14132 ;
14133 return 0;
14134}
14135_ACEOF
14136rm -f conftest.$ac_objext
14137if { (ac_try="$ac_compile"
14138case "(($ac_try" in
14139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14140 *) ac_try_echo=$ac_try;;
14141esac
14142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14143 (eval "$ac_compile") 2>conftest.er1
14144 ac_status=$?
14145 grep -v '^ *+' conftest.er1 >conftest.err
14146 rm -f conftest.er1
14147 cat conftest.err >&5
14148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14149 (exit $ac_status); } && {
14150 test -z "$ac_c_werror_flag" ||
14151 test ! -s conftest.err
14152 } && test -s conftest.$ac_objext; then
14153 ac_hi=$ac_mid; break
14154else
14155 echo "$as_me: failed program was:" >&5
14156sed 's/^/| /' conftest.$ac_ext >&5
14157
14158 ac_lo=`expr $ac_mid + 1`
14159 if test $ac_lo -le $ac_mid; then
14160 ac_lo= ac_hi=
14161 break
14162 fi
14163 ac_mid=`expr 2 '*' $ac_mid + 1`
14164fi
14165
14166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14167 done
14168else
14169 echo "$as_me: failed program was:" >&5
14170sed 's/^/| /' conftest.$ac_ext >&5
14171
14172 cat >conftest.$ac_ext <<_ACEOF
14173/* confdefs.h. */
14174_ACEOF
14175cat confdefs.h >>conftest.$ac_ext
14176cat >>conftest.$ac_ext <<_ACEOF
14177/* end confdefs.h. */
14178
14179#ifdef HAVE_PTHREAD_H
14180#include <pthread.h>
14181#endif
14182
14183
14184 typedef pthread_t ac__type_sizeof_;
14185int
14186main ()
14187{
14188static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
14189test_array [0] = 0
14190
14191 ;
14192 return 0;
14193}
14194_ACEOF
14195rm -f conftest.$ac_objext
14196if { (ac_try="$ac_compile"
14197case "(($ac_try" in
14198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14199 *) ac_try_echo=$ac_try;;
14200esac
14201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14202 (eval "$ac_compile") 2>conftest.er1
14203 ac_status=$?
14204 grep -v '^ *+' conftest.er1 >conftest.err
14205 rm -f conftest.er1
14206 cat conftest.err >&5
14207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14208 (exit $ac_status); } && {
14209 test -z "$ac_c_werror_flag" ||
14210 test ! -s conftest.err
14211 } && test -s conftest.$ac_objext; then
14212 ac_hi=-1 ac_mid=-1
14213 while :; do
14214 cat >conftest.$ac_ext <<_ACEOF
14215/* confdefs.h. */
14216_ACEOF
14217cat confdefs.h >>conftest.$ac_ext
14218cat >>conftest.$ac_ext <<_ACEOF
14219/* end confdefs.h. */
14220
14221#ifdef HAVE_PTHREAD_H
14222#include <pthread.h>
14223#endif
14224
14225
14226 typedef pthread_t ac__type_sizeof_;
14227int
14228main ()
14229{
14230static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
14231test_array [0] = 0
14232
14233 ;
14234 return 0;
14235}
14236_ACEOF
14237rm -f conftest.$ac_objext
14238if { (ac_try="$ac_compile"
14239case "(($ac_try" in
14240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14241 *) ac_try_echo=$ac_try;;
14242esac
14243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14244 (eval "$ac_compile") 2>conftest.er1
14245 ac_status=$?
14246 grep -v '^ *+' conftest.er1 >conftest.err
14247 rm -f conftest.er1
14248 cat conftest.err >&5
14249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14250 (exit $ac_status); } && {
14251 test -z "$ac_c_werror_flag" ||
14252 test ! -s conftest.err
14253 } && test -s conftest.$ac_objext; then
14254 ac_lo=$ac_mid; break
14255else
14256 echo "$as_me: failed program was:" >&5
14257sed 's/^/| /' conftest.$ac_ext >&5
14258
14259 ac_hi=`expr '(' $ac_mid ')' - 1`
14260 if test $ac_mid -le $ac_hi; then
14261 ac_lo= ac_hi=
14262 break
14263 fi
14264 ac_mid=`expr 2 '*' $ac_mid`
14265fi
14266
14267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14268 done
14269else
14270 echo "$as_me: failed program was:" >&5
14271sed 's/^/| /' conftest.$ac_ext >&5
14272
14273 ac_lo= ac_hi=
14274fi
14275
14276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14277fi
14278
14279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14280# Binary search between lo and hi bounds.
14281while test "x$ac_lo" != "x$ac_hi"; do
14282 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14283 cat >conftest.$ac_ext <<_ACEOF
14284/* confdefs.h. */
14285_ACEOF
14286cat confdefs.h >>conftest.$ac_ext
14287cat >>conftest.$ac_ext <<_ACEOF
14288/* end confdefs.h. */
14289
14290#ifdef HAVE_PTHREAD_H
14291#include <pthread.h>
14292#endif
14293
14294
14295 typedef pthread_t ac__type_sizeof_;
14296int
14297main ()
14298{
14299static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14300test_array [0] = 0
14301
14302 ;
14303 return 0;
14304}
14305_ACEOF
14306rm -f conftest.$ac_objext
14307if { (ac_try="$ac_compile"
14308case "(($ac_try" in
14309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14310 *) ac_try_echo=$ac_try;;
14311esac
14312eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14313 (eval "$ac_compile") 2>conftest.er1
14314 ac_status=$?
14315 grep -v '^ *+' conftest.er1 >conftest.err
14316 rm -f conftest.er1
14317 cat conftest.err >&5
14318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14319 (exit $ac_status); } && {
14320 test -z "$ac_c_werror_flag" ||
14321 test ! -s conftest.err
14322 } && test -s conftest.$ac_objext; then
14323 ac_hi=$ac_mid
14324else
14325 echo "$as_me: failed program was:" >&5
14326sed 's/^/| /' conftest.$ac_ext >&5
14327
14328 ac_lo=`expr '(' $ac_mid ')' + 1`
14329fi
14330
14331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14332done
14333case $ac_lo in
14334?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14335'') if test "$ac_cv_type_pthread_t" = yes; then
14336 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14337See \`config.log' for more details." >&5
14338echo "$as_me: error: cannot compute sizeof (pthread_t)
14339See \`config.log' for more details." >&2;}
14340 { (exit 77); exit 77; }; }
14341 else
14342 ac_cv_sizeof_pthread_t=0
14343 fi ;;
14344esac
14345else
14346 cat >conftest.$ac_ext <<_ACEOF
14347/* confdefs.h. */
14348_ACEOF
14349cat confdefs.h >>conftest.$ac_ext
14350cat >>conftest.$ac_ext <<_ACEOF
14351/* end confdefs.h. */
14352
14353#ifdef HAVE_PTHREAD_H
14354#include <pthread.h>
14355#endif
14356
14357
14358 typedef pthread_t ac__type_sizeof_;
14359static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14360static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
14361#include <stdio.h>
14362#include <stdlib.h>
14363int
14364main ()
14365{
14366
14367 FILE *f = fopen ("conftest.val", "w");
14368 if (! f)
14369 return 1;
14370 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
14371 {
14372 long int i = longval ();
14373 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14374 return 1;
14375 fprintf (f, "%ld\n", i);
14376 }
14377 else
14378 {
14379 unsigned long int i = ulongval ();
14380 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14381 return 1;
14382 fprintf (f, "%lu\n", i);
14383 }
14384 return ferror (f) || fclose (f) != 0;
14385
14386 ;
14387 return 0;
14388}
Martin v. Löwis11437992002-04-12 09:54:03 +000014389_ACEOF
14390rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014391if { (ac_try="$ac_link"
14392case "(($ac_try" in
14393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14394 *) ac_try_echo=$ac_try;;
14395esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014396eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014397 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014398 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014400 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014401 { (case "(($ac_try" in
14402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14403 *) ac_try_echo=$ac_try;;
14404esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014405eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014406 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014407 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014409 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014410 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014411else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014412 echo "$as_me: program exited with status $ac_status" >&5
14413echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014414sed 's/^/| /' conftest.$ac_ext >&5
14415
Martin v. Löwis11437992002-04-12 09:54:03 +000014416( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014417if test "$ac_cv_type_pthread_t" = yes; then
14418 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14419See \`config.log' for more details." >&5
14420echo "$as_me: error: cannot compute sizeof (pthread_t)
14421See \`config.log' for more details." >&2;}
14422 { (exit 77); exit 77; }; }
14423 else
14424 ac_cv_sizeof_pthread_t=0
14425 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014426fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014427rm -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 +000014428fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014429rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014430fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014431{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014432echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014433
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014434
14435
Martin v. Löwis11437992002-04-12 09:54:03 +000014436cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014437#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014438_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014439
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014440
Trent Mick635f6fb2000-08-23 21:33:05 +000014441fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014442CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014443
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014444{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
14445echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014446# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000014447if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014448 enableval=$enable_toolbox_glue;
14449fi
Jack Jansene578a632001-08-15 01:27:14 +000014450
14451
14452if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000014453then
Jack Jansene578a632001-08-15 01:27:14 +000014454 case $ac_sys_system/$ac_sys_release in
14455 Darwin/*)
14456 enable_toolbox_glue="yes";;
14457 *)
14458 enable_toolbox_glue="no";;
14459 esac
14460fi
14461case "$enable_toolbox_glue" in
14462yes)
Jack Jansene578a632001-08-15 01:27:14 +000014463 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014464 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000014465
14466cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014467#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014468_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014469
14470 ;;
14471*)
Jack Jansene578a632001-08-15 01:27:14 +000014472 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000014473 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000014474 ;;
14475esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014476{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
14477echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014478
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014479
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014480
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014481case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014482 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014483 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14484 ;;
14485 Darwin/*)
14486 OTHER_LIBTOOL_OPT=""
14487 ;;
14488esac
14489
14490
Ronald Oussoren25967582009-09-06 10:00:26 +000014491ARCH_RUN_32BIT=""
14492
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014493case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014494 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000014495 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14496 if test "${enable_universalsdk}"; then
14497 :
14498 else
Ronald Oussoren25967582009-09-06 10:00:26 +000014499 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014500 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014501 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014502 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014503 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014504 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
14505 if test ${gcc_version} '<' 4.0
14506 then
14507 LIBTOOL_CRUFT="-lcc_dynamic"
14508 else
14509 LIBTOOL_CRUFT=""
14510 fi
Ronald Oussoren25967582009-09-06 10:00:26 +000014511 if test "$cross_compiling" = yes; then
Ronald Oussoren23d92532009-09-07 06:12:00 +000014512 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +000014513else
14514 cat >conftest.$ac_ext <<_ACEOF
14515/* confdefs.h. */
14516_ACEOF
14517cat confdefs.h >>conftest.$ac_ext
14518cat >>conftest.$ac_ext <<_ACEOF
14519/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +000014520
Ronald Oussoren25967582009-09-06 10:00:26 +000014521 #include <unistd.h>
14522 int main(int argc, char*argv[])
14523 {
14524 if (sizeof(long) == 4) {
14525 return 0;
14526 } else {
14527 return 1;
14528 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +000014529 }
Ronald Oussoren23d92532009-09-07 06:12:00 +000014530
Ronald Oussoren25967582009-09-06 10:00:26 +000014531_ACEOF
14532rm -f conftest$ac_exeext
14533if { (ac_try="$ac_link"
14534case "(($ac_try" in
14535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14536 *) ac_try_echo=$ac_try;;
14537esac
14538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14539 (eval "$ac_link") 2>&5
14540 ac_status=$?
14541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14542 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14543 { (case "(($ac_try" in
14544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14545 *) ac_try_echo=$ac_try;;
14546esac
14547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14548 (eval "$ac_try") 2>&5
14549 ac_status=$?
14550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14551 (exit $ac_status); }; }; then
14552 ac_osx_32bit=yes
14553else
14554 echo "$as_me: program exited with status $ac_status" >&5
14555echo "$as_me: failed program was:" >&5
14556sed 's/^/| /' conftest.$ac_ext >&5
14557
14558( exit $ac_status )
14559ac_osx_32bit=no
14560fi
14561rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14562fi
14563
14564
14565
14566 if test "${ac_osx_32bit}" = "yes"; then
14567 case `arch` in
14568 i386)
14569 MACOSX_DEFAULT_ARCH="i386"
14570 ;;
14571 ppc)
14572 MACOSX_DEFAULT_ARCH="ppc"
14573 ;;
14574 *)
14575 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14576echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14577 { (exit 1); exit 1; }; }
14578 ;;
14579 esac
14580 else
14581 case `arch` in
14582 i386)
14583 MACOSX_DEFAULT_ARCH="x86_64"
14584 ;;
14585 ppc)
14586 MACOSX_DEFAULT_ARCH="ppc64"
14587 ;;
14588 *)
14589 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14590echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14591 { (exit 1); exit 1; }; }
14592 ;;
14593 esac
14594
14595 #ARCH_RUN_32BIT="true"
14596 fi
14597
14598 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014599 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014600 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014601esac
14602
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014603{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14604echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014605if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014606then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014607 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014608 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014609 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014610
Martin v. Löwis11437992002-04-12 09:54:03 +000014611cat >>confdefs.h <<\_ACEOF
14612#define WITH_NEXT_FRAMEWORK 1
14613_ACEOF
14614
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014615 { echo "$as_me:$LINENO: result: yes" >&5
14616echo "${ECHO_T}yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +000014617 if test $enable_shared = "yes"
14618 then
Ronald Oussoren9ebd2422009-09-29 13:00:44 +000014619 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." >&5
14620echo "$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 +000014621 { (exit 1); exit 1; }; }
14622 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014623else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014624 { echo "$as_me:$LINENO: result: no" >&5
14625echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014626fi
14627
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014628{ echo "$as_me:$LINENO: checking for dyld" >&5
14629echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014630case $ac_sys_system/$ac_sys_release in
14631 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014632
Martin v. Löwis11437992002-04-12 09:54:03 +000014633cat >>confdefs.h <<\_ACEOF
14634#define WITH_DYLD 1
14635_ACEOF
14636
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014637 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14638echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014639 ;;
14640 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014641 { echo "$as_me:$LINENO: result: no" >&5
14642echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014643 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014644esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014645
Guido van Rossum0a516c91994-09-12 10:58:40 +000014646# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014647
Michael W. Hudson54241132001-12-07 15:38:26 +000014648
14649
14650
14651
Guido van Rossum0a516c91994-09-12 10:58:40 +000014652# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014653# -- usually .so, .sl on HP-UX, .dll on Cygwin
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014654{ echo "$as_me:$LINENO: checking SO" >&5
14655echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014656if test -z "$SO"
14657then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014658 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000014659 hp*|HP*)
14660 case `uname -m` in
14661 ia64) SO=.so;;
14662 *) SO=.sl;;
14663 esac
14664 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014665 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014666 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014667 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014668else
14669 # this might also be a termcap variable, see #610332
14670 echo
14671 echo '====================================================================='
14672 echo '+ +'
14673 echo '+ WARNING: You have set SO in your environment. +'
14674 echo '+ Do you really mean to change the extension for shared libraries? +'
14675 echo '+ Continuing in 10 seconds to let you to ponder. +'
14676 echo '+ +'
14677 echo '====================================================================='
14678 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014679fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014680{ echo "$as_me:$LINENO: result: $SO" >&5
14681echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000014682
Ronald Oussoren79f90492009-01-02 10:44:46 +000014683
Neal Norwitz58e28882006-05-19 07:00:58 +000014684cat >>confdefs.h <<_ACEOF
14685#define SHLIB_EXT "$SO"
14686_ACEOF
14687
Guido van Rossum0a516c91994-09-12 10:58:40 +000014688# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014689# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014690# (Shared libraries in this instance are shared modules to be loaded into
14691# Python, as opposed to building Python itself as a shared library.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014692{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14693echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014694if test -z "$LDSHARED"
14695then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014696 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014697 AIX*)
14698 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014699 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014700 ;;
14701 BeOS*)
14702 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000014703 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014704 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014705 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014706 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014707 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000014708 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014709 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014710 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000014711 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000014712 hp*|HP*)
14713 if test "$GCC" = "yes"
14714 then LDSHARED='$(CC) -shared'
14715 else LDSHARED='ld -b';
14716 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014717 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014718 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014719 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14720 if test "$enable_framework" ; then
14721 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014722 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14723 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014724 else
14725 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014726 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014727 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014728 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014729 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14730 if test "$enable_framework" ; then
14731 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014732 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14733 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014734 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014735 # No framework, use the Python app as bundle-loader
14736 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014737 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014738 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014739 Darwin/*)
14740 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14741 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000014742
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014743 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014744 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000014745 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014746 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014747 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014748 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14749 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014750 else
14751 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14752 if test "$enable_framework" ; then
14753 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014754 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14755 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014756 else
14757 # No framework, use the Python app as bundle-loader
14758 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14759 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14760 fi
14761 fi
14762 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014763 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014764 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014765 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014766 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014767 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014768 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014769 else
14770 LDSHARED="ld -Bshareable ${LDFLAGS}"
14771 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014772 OpenBSD*)
14773 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14774 then
14775 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14776 else
14777 case `uname -r` in
14778 [01].* | 2.[0-7] | 2.[0-7].*)
14779 LDSHARED="ld -Bshareable ${LDFLAGS}"
14780 ;;
14781 *)
14782 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14783 ;;
14784 esac
14785 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014786 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014787 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014788 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014789 then LDSHARED='$(CC) -shared'
14790 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014791 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014792 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014793 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014794 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014795 *) LDSHARED="ld";;
14796 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014797fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014798{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14799echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014800BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014801# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014802# library (module) -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014803{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14804echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014805if test -z "$CCSHARED"
14806then
Guido van Rossum07397971997-04-29 21:49:50 +000014807 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014808 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000014809 then CCSHARED="-fPIC";
14810 elif test `uname -p` = sparc;
14811 then CCSHARED="-xcode=pic32";
14812 else CCSHARED="-Kpic";
14813 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014814 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014815 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014816 else CCSHARED="+z";
14817 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014818 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014819 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014820 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014821 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014822 if test "$GCC" = "yes"
14823 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014824 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014825 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014826 SCO_SV*)
14827 if test "$GCC" = "yes"
14828 then CCSHARED="-fPIC"
14829 else CCSHARED="-Kpic -belf"
14830 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014831 IRIX*/6*) case $CC in
14832 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014833 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014834 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014835 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014836 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014837fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014838{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14839echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014840# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014841# the python executable -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014842{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14843echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014844if test -z "$LINKFORSHARED"
14845then
Guido van Rossum07397971997-04-29 21:49:50 +000014846 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014847 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014848 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014849 LINKFORSHARED="-Wl,-E -Wl,+s";;
14850# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014851 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014852 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014853 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014854 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014855 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
14856 # which is
Jack Jansene578a632001-08-15 01:27:14 +000014857 # not used by the core itself but which needs to be in the core so
14858 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000014859 # -prebind is no longer used, because it actually seems to give a
14860 # slowdown in stead of a speedup, maybe due to the large number of
14861 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014862
14863 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000014864 if test "$enable_framework"
14865 then
Jack Jansenda49e192005-01-07 13:08:22 +000014866 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014867 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014868 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014869 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014870 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014871 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014872 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014873 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14874 then
14875 LINKFORSHARED="-Wl,--export-dynamic"
14876 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014877 SunOS/5*) case $CC in
14878 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014879 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014880 then
14881 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014882 fi;;
14883 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014884 CYGWIN*)
14885 if test $enable_shared = "no"
14886 then
14887 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14888 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014889 QNX*)
14890 # -Wl,-E causes the symbols to be added to the dynamic
14891 # symbol table so that they can be found when a module
14892 # is loaded. -N 2048K causes the stack size to be set
14893 # to 2048 kilobytes so that the stack doesn't overflow
14894 # when running test_compile.py.
14895 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014896 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014897fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014898{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14899echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014900
Michael W. Hudson54241132001-12-07 15:38:26 +000014901
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014902
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014903{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14904echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014905if test ! "$LIBRARY" = "$LDLIBRARY"
14906then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014907 case $ac_sys_system in
14908 CYGWIN*)
14909 # Cygwin needs CCSHARED when building extension DLLs
14910 # but not when building the interpreter DLL.
14911 CFLAGSFORSHARED='';;
14912 *)
14913 CFLAGSFORSHARED='$(CCSHARED)'
14914 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014915fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014916{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14917echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014918
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014919# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14920# library (with --enable-shared).
14921# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014922# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14923# if it is not required, since it creates a dependency of the shared library
14924# to LIBS. This, in turn, means that applications linking the shared libpython
14925# don't need to link LIBS explicitly. The default should be only changed
14926# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014927
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014928{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14929echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014930case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014931 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014932 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014933esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014934{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14935echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014936
14937
Guido van Rossum627b2d71993-12-24 10:39:16 +000014938# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014939
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014940{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14941echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014942if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014943 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014944else
Martin v. Löwis11437992002-04-12 09:54:03 +000014945 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014946LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014947cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014948/* confdefs.h. */
14949_ACEOF
14950cat confdefs.h >>conftest.$ac_ext
14951cat >>conftest.$ac_ext <<_ACEOF
14952/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014953
Martin v. Löwiseba40652007-08-30 20:10:57 +000014954/* Override any GCC internal prototype to avoid an error.
14955 Use char because int might match the return type of a GCC
14956 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014957#ifdef __cplusplus
14958extern "C"
14959#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014960char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014961int
14962main ()
14963{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014964return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014965 ;
14966 return 0;
14967}
14968_ACEOF
14969rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014970if { (ac_try="$ac_link"
14971case "(($ac_try" in
14972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14973 *) ac_try_echo=$ac_try;;
14974esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014976 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014977 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014978 grep -v '^ *+' conftest.er1 >conftest.err
14979 rm -f conftest.er1
14980 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014982 (exit $ac_status); } && {
14983 test -z "$ac_c_werror_flag" ||
14984 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014985 } && test -s conftest$ac_exeext &&
14986 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014987 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014988else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014989 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014990sed 's/^/| /' conftest.$ac_ext >&5
14991
Martin v. Löwiseba40652007-08-30 20:10:57 +000014992 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014993fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014994
14995rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014996 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014997LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014998fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014999{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
15000echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
15001if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015002 cat >>confdefs.h <<_ACEOF
15003#define HAVE_LIBDL 1
15004_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015005
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015006 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015007
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015008fi
15009 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000015010
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015011{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
15012echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015013if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015014 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015015else
Martin v. Löwis11437992002-04-12 09:54:03 +000015016 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015017LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015018cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015019/* confdefs.h. */
15020_ACEOF
15021cat confdefs.h >>conftest.$ac_ext
15022cat >>conftest.$ac_ext <<_ACEOF
15023/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015024
Martin v. Löwiseba40652007-08-30 20:10:57 +000015025/* Override any GCC internal prototype to avoid an error.
15026 Use char because int might match the return type of a GCC
15027 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015028#ifdef __cplusplus
15029extern "C"
15030#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015031char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015032int
15033main ()
15034{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015035return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015036 ;
15037 return 0;
15038}
15039_ACEOF
15040rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015041if { (ac_try="$ac_link"
15042case "(($ac_try" in
15043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15044 *) ac_try_echo=$ac_try;;
15045esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015047 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015048 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015049 grep -v '^ *+' conftest.er1 >conftest.err
15050 rm -f conftest.er1
15051 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015053 (exit $ac_status); } && {
15054 test -z "$ac_c_werror_flag" ||
15055 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015056 } && test -s conftest$ac_exeext &&
15057 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015058 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015059else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015060 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015061sed 's/^/| /' conftest.$ac_ext >&5
15062
Martin v. Löwiseba40652007-08-30 20:10:57 +000015063 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015064fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015065
15066rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015067 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015068LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015069fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015070{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
15071echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
15072if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015073 cat >>confdefs.h <<_ACEOF
15074#define HAVE_LIBDLD 1
15075_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015076
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015077 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015078
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015079fi
15080 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000015081
Ronald Oussoren79f90492009-01-02 10:44:46 +000015082# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000015083if test "$with_threads" = "yes" -o -z "$with_threads"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015084 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
15085echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015086if test "${ac_cv_search_sem_init+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015087 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015088else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015089 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000015090cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015091/* confdefs.h. */
15092_ACEOF
15093cat confdefs.h >>conftest.$ac_ext
15094cat >>conftest.$ac_ext <<_ACEOF
15095/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015096
Martin v. Löwiseba40652007-08-30 20:10:57 +000015097/* Override any GCC internal prototype to avoid an error.
15098 Use char because int might match the return type of a GCC
15099 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015100#ifdef __cplusplus
15101extern "C"
15102#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015103char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015104int
15105main ()
15106{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015107return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015108 ;
15109 return 0;
15110}
15111_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015112for ac_lib in '' pthread rt posix4; do
15113 if test -z "$ac_lib"; then
15114 ac_res="none required"
15115 else
15116 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000015117 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015118 fi
15119 rm -f conftest.$ac_objext conftest$ac_exeext
15120if { (ac_try="$ac_link"
15121case "(($ac_try" in
15122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15123 *) ac_try_echo=$ac_try;;
15124esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015126 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000015127 ac_status=$?
15128 grep -v '^ *+' conftest.er1 >conftest.err
15129 rm -f conftest.er1
15130 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015132 (exit $ac_status); } && {
15133 test -z "$ac_c_werror_flag" ||
15134 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015135 } && test -s conftest$ac_exeext &&
15136 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015137 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000015138else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015139 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015140sed 's/^/| /' conftest.$ac_ext >&5
15141
Martin v. Löwiseba40652007-08-30 20:10:57 +000015142
Brett Cannon19fab762007-06-02 03:02:29 +000015143fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015144
15145rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15146 conftest$ac_exeext
15147 if test "${ac_cv_search_sem_init+set}" = set; then
15148 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000015149fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015150done
15151if test "${ac_cv_search_sem_init+set}" = set; then
15152 :
15153else
15154 ac_cv_search_sem_init=no
15155fi
15156rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015157LIBS=$ac_func_search_save_LIBS
15158fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015159{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15160echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015161ac_res=$ac_cv_search_sem_init
15162if test "$ac_res" != no; then
15163 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015164
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015165fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015166 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015167 # posix4 on Solaris 2.6
15168 # pthread (first!) on Linux
15169fi
15170
Martin v. Löwis19d17342003-06-14 21:03:05 +000015171# check if we need libintl for locale functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015172{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15173echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015174if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015175 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015176else
15177 ac_check_lib_save_LIBS=$LIBS
15178LIBS="-lintl $LIBS"
15179cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015180/* confdefs.h. */
15181_ACEOF
15182cat confdefs.h >>conftest.$ac_ext
15183cat >>conftest.$ac_ext <<_ACEOF
15184/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015185
Martin v. Löwiseba40652007-08-30 20:10:57 +000015186/* Override any GCC internal prototype to avoid an error.
15187 Use char because int might match the return type of a GCC
15188 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015189#ifdef __cplusplus
15190extern "C"
15191#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015192char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015193int
15194main ()
15195{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015196return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015197 ;
15198 return 0;
15199}
15200_ACEOF
15201rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015202if { (ac_try="$ac_link"
15203case "(($ac_try" in
15204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15205 *) ac_try_echo=$ac_try;;
15206esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015208 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015209 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015210 grep -v '^ *+' conftest.er1 >conftest.err
15211 rm -f conftest.er1
15212 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015214 (exit $ac_status); } && {
15215 test -z "$ac_c_werror_flag" ||
15216 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015217 } && test -s conftest$ac_exeext &&
15218 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015219 ac_cv_lib_intl_textdomain=yes
15220else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015221 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015222sed 's/^/| /' conftest.$ac_ext >&5
15223
Martin v. Löwiseba40652007-08-30 20:10:57 +000015224 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015225fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015226
15227rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015228 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015229LIBS=$ac_check_lib_save_LIBS
15230fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015231{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15232echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15233if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015234
15235cat >>confdefs.h <<\_ACEOF
15236#define WITH_LIBINTL 1
15237_ACEOF
15238
15239fi
15240
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015241
15242# checks for system dependent C++ extensions support
15243case "$ac_sys_system" in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015244 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15245echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015246 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015247/* confdefs.h. */
15248_ACEOF
15249cat confdefs.h >>conftest.$ac_ext
15250cat >>conftest.$ac_ext <<_ACEOF
15251/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015252#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015253int
15254main ()
15255{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015256loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015257 ;
15258 return 0;
15259}
15260_ACEOF
15261rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015262if { (ac_try="$ac_link"
15263case "(($ac_try" in
15264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15265 *) ac_try_echo=$ac_try;;
15266esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015268 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015269 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015270 grep -v '^ *+' conftest.er1 >conftest.err
15271 rm -f conftest.er1
15272 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015274 (exit $ac_status); } && {
15275 test -z "$ac_c_werror_flag" ||
15276 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015277 } && test -s conftest$ac_exeext &&
15278 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015279
Martin v. Löwis11437992002-04-12 09:54:03 +000015280cat >>confdefs.h <<\_ACEOF
15281#define AIX_GENUINE_CPLUSPLUS 1
15282_ACEOF
15283
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015284 { echo "$as_me:$LINENO: result: yes" >&5
15285echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015286else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015287 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015288sed 's/^/| /' conftest.$ac_ext >&5
15289
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015290 { echo "$as_me:$LINENO: result: no" >&5
15291echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015292fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015293
15294rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015295 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015296 *) ;;
15297esac
15298
Guido van Rossum70c7f481998-03-26 18:44:10 +000015299# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015300# BeOS' sockets are stashed in libnet.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015301{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15302echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015303if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015304 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015305else
Martin v. Löwis11437992002-04-12 09:54:03 +000015306 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015307LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015308cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015309/* confdefs.h. */
15310_ACEOF
15311cat confdefs.h >>conftest.$ac_ext
15312cat >>conftest.$ac_ext <<_ACEOF
15313/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015314
Martin v. Löwiseba40652007-08-30 20:10:57 +000015315/* Override any GCC internal prototype to avoid an error.
15316 Use char because int might match the return type of a GCC
15317 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015318#ifdef __cplusplus
15319extern "C"
15320#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015321char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015322int
15323main ()
15324{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015325return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015326 ;
15327 return 0;
15328}
15329_ACEOF
15330rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015331if { (ac_try="$ac_link"
15332case "(($ac_try" in
15333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15334 *) ac_try_echo=$ac_try;;
15335esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015337 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015338 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015339 grep -v '^ *+' conftest.er1 >conftest.err
15340 rm -f conftest.er1
15341 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015343 (exit $ac_status); } && {
15344 test -z "$ac_c_werror_flag" ||
15345 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015346 } && test -s conftest$ac_exeext &&
15347 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015348 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015349else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015350 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015351sed 's/^/| /' conftest.$ac_ext >&5
15352
Martin v. Löwiseba40652007-08-30 20:10:57 +000015353 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015354fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015355
15356rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015357 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015358LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015359fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015360{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15361echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15362if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015363 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015364fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015365 # SVR4
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015366{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15367echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015368if test "${ac_cv_lib_socket_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015369 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015370else
Martin v. Löwis11437992002-04-12 09:54:03 +000015371 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015372LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015373cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015374/* confdefs.h. */
15375_ACEOF
15376cat confdefs.h >>conftest.$ac_ext
15377cat >>conftest.$ac_ext <<_ACEOF
15378/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015379
Martin v. Löwiseba40652007-08-30 20:10:57 +000015380/* Override any GCC internal prototype to avoid an error.
15381 Use char because int might match the return type of a GCC
15382 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015383#ifdef __cplusplus
15384extern "C"
15385#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015386char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015387int
15388main ()
15389{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015390return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015391 ;
15392 return 0;
15393}
15394_ACEOF
15395rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015396if { (ac_try="$ac_link"
15397case "(($ac_try" in
15398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15399 *) ac_try_echo=$ac_try;;
15400esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015402 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015403 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015404 grep -v '^ *+' conftest.er1 >conftest.err
15405 rm -f conftest.er1
15406 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015408 (exit $ac_status); } && {
15409 test -z "$ac_c_werror_flag" ||
15410 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015411 } && test -s conftest$ac_exeext &&
15412 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015413 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015414else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015415 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015416sed 's/^/| /' conftest.$ac_ext >&5
15417
Martin v. Löwiseba40652007-08-30 20:10:57 +000015418 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015419fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015420
15421rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015422 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015423LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015424fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015425{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15426echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15427if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015428 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015429fi
15430 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015431
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000015432case "$ac_sys_system" in
15433BeOS*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015434{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
15435echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015436if test "${ac_cv_lib_net_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015437 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015438else
Martin v. Löwis11437992002-04-12 09:54:03 +000015439 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015440LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015441cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015442/* confdefs.h. */
15443_ACEOF
15444cat confdefs.h >>conftest.$ac_ext
15445cat >>conftest.$ac_ext <<_ACEOF
15446/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015447
Martin v. Löwiseba40652007-08-30 20:10:57 +000015448/* Override any GCC internal prototype to avoid an error.
15449 Use char because int might match the return type of a GCC
15450 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015451#ifdef __cplusplus
15452extern "C"
15453#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015454char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015455int
15456main ()
15457{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015458return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015459 ;
15460 return 0;
15461}
15462_ACEOF
15463rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015464if { (ac_try="$ac_link"
15465case "(($ac_try" in
15466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15467 *) ac_try_echo=$ac_try;;
15468esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015470 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015471 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015472 grep -v '^ *+' conftest.er1 >conftest.err
15473 rm -f conftest.er1
15474 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015476 (exit $ac_status); } && {
15477 test -z "$ac_c_werror_flag" ||
15478 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015479 } && test -s conftest$ac_exeext &&
15480 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015481 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015482else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015483 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015484sed 's/^/| /' conftest.$ac_ext >&5
15485
Martin v. Löwiseba40652007-08-30 20:10:57 +000015486 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000015487fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015488
15489rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015490 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015491LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015492fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015493{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
15494echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
15495if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015496 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015497fi
15498 # BeOS
15499;;
15500esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000015501
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015502{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15503echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015504
Martin v. Löwiseba40652007-08-30 20:10:57 +000015505# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015506if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015507 withval=$with_libs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015508{ echo "$as_me:$LINENO: result: $withval" >&5
15509echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015510LIBS="$withval $LIBS"
15511
15512else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015513 { echo "$as_me:$LINENO: result: no" >&5
15514echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015515fi
15516
Guido van Rossum7f43da71994-08-01 12:15:30 +000015517
Benjamin Peterson2c196742009-12-31 03:17:18 +000015518# Check for use of the system expat library
15519{ echo "$as_me:$LINENO: checking for --with-system-expat" >&5
15520echo $ECHO_N "checking for --with-system-expat... $ECHO_C" >&6; }
15521
15522# Check whether --with-system_expat was given.
15523if test "${with_system_expat+set}" = set; then
15524 withval=$with_system_expat;
15525fi
15526
15527
15528{ echo "$as_me:$LINENO: result: $with_system_expat" >&5
15529echo "${ECHO_T}$with_system_expat" >&6; }
15530
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015531# Check for use of the system libffi library
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015532{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15533echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015534
Martin v. Löwiseba40652007-08-30 20:10:57 +000015535# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015536if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015537 withval=$with_system_ffi;
15538fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015539
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015540
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015541{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15542echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015543
Benjamin Peterson867475c2009-04-29 20:36:25 +000015544# Check for --with-dbmliborder
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015545{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15546echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015547
15548# Check whether --with-dbmliborder was given.
15549if test "${with_dbmliborder+set}" = set; then
15550 withval=$with_dbmliborder;
15551if test x$with_dbmliborder = xyes
15552then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015553{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15554echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015555 { (exit 1); exit 1; }; }
15556else
15557 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15558 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15559 then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015560 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15561echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015562 { (exit 1); exit 1; }; }
15563 fi
15564 done
15565fi
15566fi
15567
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015568{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15569echo "${ECHO_T}$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015570
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015571# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015572
15573
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015574{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15575echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015576
Martin v. Löwiseba40652007-08-30 20:10:57 +000015577# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015578if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015579 withval=$with_signal_module;
15580fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015581
15582
15583if test -z "$with_signal_module"
15584then with_signal_module="yes"
15585fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015586{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15587echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015588
15589if test "${with_signal_module}" = "yes"; then
15590 USE_SIGNAL_MODULE=""
15591 SIGNAL_OBJS=""
15592else
15593 USE_SIGNAL_MODULE="#"
15594 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15595fi
15596
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015597# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015598
Barry Warsawc0d24d82000-06-29 16:12:00 +000015599USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015600
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015601{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15602echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015603
Guido van Rossumec2f0731997-01-22 20:54:01 +000015604
Martin v. Löwiseba40652007-08-30 20:10:57 +000015605# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015606if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015607 withval=$with_dec_threads;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015608{ echo "$as_me:$LINENO: result: $withval" >&5
15609echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015610LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015611if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015612 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015613fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015614else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015615 { echo "$as_me:$LINENO: result: no" >&5
15616echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015617fi
15618
Martin v. Löwis11437992002-04-12 09:54:03 +000015619
15620# Templates for things AC_DEFINEd more than once.
15621# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015622
15623
Martin v. Löwis11437992002-04-12 09:54:03 +000015624
15625
15626
15627
15628
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015629{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15630echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015631
Martin v. Löwiseba40652007-08-30 20:10:57 +000015632# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015633if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015634 withval=$with_threads;
15635fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015636
15637
Barry Warsawc0d24d82000-06-29 16:12:00 +000015638# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015639
Martin v. Löwiseba40652007-08-30 20:10:57 +000015640# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015641if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015642 withval=$with_thread; with_threads=$with_thread
15643fi
15644
Barry Warsawc0d24d82000-06-29 16:12:00 +000015645
15646if test -z "$with_threads"
15647then with_threads="yes"
15648fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015649{ echo "$as_me:$LINENO: result: $with_threads" >&5
15650echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000015651
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015652
Barry Warsawc0d24d82000-06-29 16:12:00 +000015653if test "$with_threads" = "no"
15654then
15655 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015656elif test "$ac_cv_pthread_is_default" = yes
15657then
Martin v. Löwis11437992002-04-12 09:54:03 +000015658 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015659#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015660_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015661
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015662 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015663 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015664#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015665_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015666
15667 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015668 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015669elif test "$ac_cv_kpthread" = "yes"
15670then
15671 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015672 if test "$ac_cv_cxx_thread" = "yes"; then
15673 CXX="$CXX -Kpthread"
15674 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015675 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015676#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015677_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015678
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015679 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015680 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015681elif test "$ac_cv_kthread" = "yes"
15682then
15683 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015684 if test "$ac_cv_cxx_thread" = "yes"; then
15685 CXX="$CXX -Kthread"
15686 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015687 cat >>confdefs.h <<\_ACEOF
15688#define WITH_THREAD 1
15689_ACEOF
15690
15691 posix_threads=yes
15692 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015693elif test "$ac_cv_pthread" = "yes"
15694then
15695 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015696 if test "$ac_cv_cxx_thread" = "yes"; then
15697 CXX="$CXX -pthread"
15698 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015699 cat >>confdefs.h <<\_ACEOF
15700#define WITH_THREAD 1
15701_ACEOF
15702
15703 posix_threads=yes
15704 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015705else
15706 if test ! -z "$with_threads" -a -d "$with_threads"
15707 then LDFLAGS="$LDFLAGS -L$with_threads"
15708 fi
15709 if test ! -z "$withval" -a -d "$withval"
15710 then LDFLAGS="$LDFLAGS -L$withval"
15711 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015712
15713 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015714 # define _POSIX_THREADS in unistd.h. Some apparently don't
15715 # (e.g. gnu pth with pthread emulation)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015716 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15717echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015718 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015719/* confdefs.h. */
15720_ACEOF
15721cat confdefs.h >>conftest.$ac_ext
15722cat >>conftest.$ac_ext <<_ACEOF
15723/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015724
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015725#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015726#ifdef _POSIX_THREADS
15727yes
15728#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015729
15730_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015731if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015732 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015733 unistd_defines_pthreads=yes
15734else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015735 unistd_defines_pthreads=no
15736fi
Benjamin Peterson2c196742009-12-31 03:17:18 +000015737rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015738
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015739 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15740echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015741
Martin v. Löwis11437992002-04-12 09:54:03 +000015742 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015743#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015744_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015745
Martin v. Löwis11437992002-04-12 09:54:03 +000015746 if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015747 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15748echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015749if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015750 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015751fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015752{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15753echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015754else
Martin v. Löwis11437992002-04-12 09:54:03 +000015755 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015756{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15757echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015758cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015759/* confdefs.h. */
15760_ACEOF
15761cat confdefs.h >>conftest.$ac_ext
15762cat >>conftest.$ac_ext <<_ACEOF
15763/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015764$ac_includes_default
15765#include <cthreads.h>
15766_ACEOF
15767rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015768if { (ac_try="$ac_compile"
15769case "(($ac_try" in
15770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15771 *) ac_try_echo=$ac_try;;
15772esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015774 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015775 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015776 grep -v '^ *+' conftest.er1 >conftest.err
15777 rm -f conftest.er1
15778 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015780 (exit $ac_status); } && {
15781 test -z "$ac_c_werror_flag" ||
15782 test ! -s conftest.err
15783 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015784 ac_header_compiler=yes
15785else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015786 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015787sed 's/^/| /' conftest.$ac_ext >&5
15788
Martin v. Löwiseba40652007-08-30 20:10:57 +000015789 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015790fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015791
15792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015793{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15794echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015795
15796# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015797{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15798echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015799cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015800/* confdefs.h. */
15801_ACEOF
15802cat confdefs.h >>conftest.$ac_ext
15803cat >>conftest.$ac_ext <<_ACEOF
15804/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015805#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015806_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015807if { (ac_try="$ac_cpp conftest.$ac_ext"
15808case "(($ac_try" in
15809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15810 *) ac_try_echo=$ac_try;;
15811esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015813 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015814 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015815 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015816 rm -f conftest.er1
15817 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015819 (exit $ac_status); } >/dev/null && {
15820 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15821 test ! -s conftest.err
15822 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015823 ac_header_preproc=yes
15824else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015825 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015826sed 's/^/| /' conftest.$ac_ext >&5
15827
Martin v. Löwis11437992002-04-12 09:54:03 +000015828 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015829fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015830
Martin v. Löwis11437992002-04-12 09:54:03 +000015831rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015832{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15833echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015834
15835# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015836case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15837 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015838 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15839echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15840 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15841echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015842 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015843 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015844 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015845 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15846echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15847 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15848echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15849 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15850echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15851 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15852echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15853 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15854echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15855 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15856echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015857 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000015858## -------------------------------------- ##
15859## Report this to http://bugs.python.org/ ##
15860## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015861_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015862 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015863 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015864esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015865{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15866echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015867if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015868 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015869else
15870 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015871fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015872{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15873echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015874
15875fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015876if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015877 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015878#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015879_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015880
Martin v. Löwis11437992002-04-12 09:54:03 +000015881 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015882#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015883_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015884
Martin v. Löwis11437992002-04-12 09:54:03 +000015885
15886cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015887#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015888_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015889
15890 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015891 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015892else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015893
Martin v. Löwis11437992002-04-12 09:54:03 +000015894 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015895 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15896echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015897if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015898 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015899fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015900{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15901echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015902else
Martin v. Löwis11437992002-04-12 09:54:03 +000015903 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015904{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15905echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015906cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015907/* confdefs.h. */
15908_ACEOF
15909cat confdefs.h >>conftest.$ac_ext
15910cat >>conftest.$ac_ext <<_ACEOF
15911/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015912$ac_includes_default
15913#include <mach/cthreads.h>
15914_ACEOF
15915rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015916if { (ac_try="$ac_compile"
15917case "(($ac_try" in
15918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15919 *) ac_try_echo=$ac_try;;
15920esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015922 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015923 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015924 grep -v '^ *+' conftest.er1 >conftest.err
15925 rm -f conftest.er1
15926 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015928 (exit $ac_status); } && {
15929 test -z "$ac_c_werror_flag" ||
15930 test ! -s conftest.err
15931 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015932 ac_header_compiler=yes
15933else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015934 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015935sed 's/^/| /' conftest.$ac_ext >&5
15936
Martin v. Löwiseba40652007-08-30 20:10:57 +000015937 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015938fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015939
15940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015941{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15942echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015943
15944# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015945{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15946echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015947cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015948/* confdefs.h. */
15949_ACEOF
15950cat confdefs.h >>conftest.$ac_ext
15951cat >>conftest.$ac_ext <<_ACEOF
15952/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015953#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015954_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015955if { (ac_try="$ac_cpp conftest.$ac_ext"
15956case "(($ac_try" in
15957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15958 *) ac_try_echo=$ac_try;;
15959esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015961 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015962 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015963 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015964 rm -f conftest.er1
15965 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015967 (exit $ac_status); } >/dev/null && {
15968 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15969 test ! -s conftest.err
15970 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015971 ac_header_preproc=yes
15972else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015973 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015974sed 's/^/| /' conftest.$ac_ext >&5
15975
Martin v. Löwis11437992002-04-12 09:54:03 +000015976 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015977fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015978
Martin v. Löwis11437992002-04-12 09:54:03 +000015979rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015980{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15981echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015982
15983# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015984case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15985 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015986 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15987echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15988 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15989echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015990 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015991 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015992 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015993 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15994echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15995 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15996echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15997 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15998echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15999 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
16000echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16001 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
16002echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
16003 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
16004echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016005 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016006## -------------------------------------- ##
16007## Report this to http://bugs.python.org/ ##
16008## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016009_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016010 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016011 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016012esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016013{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16014echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016015if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016016 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016017else
16018 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016019fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016020{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16021echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016022
16023fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016024if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016025 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016026#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016027_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016028
Martin v. Löwis11437992002-04-12 09:54:03 +000016029 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016030#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016031_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016032
Martin v. Löwis11437992002-04-12 09:54:03 +000016033
16034cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016035#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016036_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016037
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016038 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016039else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016040
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016041 { echo "$as_me:$LINENO: checking for --with-pth" >&5
16042echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016043
Martin v. Löwiseba40652007-08-30 20:10:57 +000016044# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016045if test "${with_pth+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016046 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
16047echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016048 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016049#define WITH_THREAD 1
16050_ACEOF
16051
16052
16053cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016054#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016055_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016056
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016057 LIBS="-lpth $LIBS"
16058 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016059else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016060 { echo "$as_me:$LINENO: result: no" >&5
16061echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016062
16063 # Just looking for pthread_create in libpthread is not enough:
16064 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
16065 # So we really have to include pthread.h, and then link.
16066 _libs=$LIBS
16067 LIBS="$LIBS -lpthread"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016068 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16069echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016070 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016071/* confdefs.h. */
16072_ACEOF
16073cat confdefs.h >>conftest.$ac_ext
16074cat >>conftest.$ac_ext <<_ACEOF
16075/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016076#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000016077
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016078void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000016079int
16080main ()
16081{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016082
16083pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000016084 ;
16085 return 0;
16086}
16087_ACEOF
16088rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016089if { (ac_try="$ac_link"
16090case "(($ac_try" in
16091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16092 *) ac_try_echo=$ac_try;;
16093esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016095 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016096 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016097 grep -v '^ *+' conftest.er1 >conftest.err
16098 rm -f conftest.er1
16099 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016101 (exit $ac_status); } && {
16102 test -z "$ac_c_werror_flag" ||
16103 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016104 } && test -s conftest$ac_exeext &&
16105 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016106
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016107 { echo "$as_me:$LINENO: result: yes" >&5
16108echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016109 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016110#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016111_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016112
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016113 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016114 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016115else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016116 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016117sed 's/^/| /' conftest.$ac_ext >&5
16118
Martin v. Löwis11437992002-04-12 09:54:03 +000016119
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016120 LIBS=$_libs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016121 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
16122echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016123if test "${ac_cv_func_pthread_detach+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016124 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016125else
Martin v. Löwis11437992002-04-12 09:54:03 +000016126 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016127/* confdefs.h. */
16128_ACEOF
16129cat confdefs.h >>conftest.$ac_ext
16130cat >>conftest.$ac_ext <<_ACEOF
16131/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016132/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16133 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16134#define pthread_detach innocuous_pthread_detach
16135
Guido van Rossumad678af1998-10-02 14:42:15 +000016136/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016137 which can conflict with char pthread_detach (); below.
16138 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016139 <limits.h> exists even on freestanding compilers. */
16140
16141#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016142# include <limits.h>
16143#else
16144# include <assert.h>
16145#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016146
16147#undef pthread_detach
16148
Martin v. Löwiseba40652007-08-30 20:10:57 +000016149/* Override any GCC internal prototype to avoid an error.
16150 Use char because int might match the return type of a GCC
16151 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016152#ifdef __cplusplus
16153extern "C"
16154#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016155char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016156/* The GNU C library defines this for functions which it implements
16157 to always fail with ENOSYS. Some functions are actually named
16158 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016159#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016160choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016161#endif
16162
Skip Montanaro6dead952003-09-25 14:50:04 +000016163int
16164main ()
16165{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016166return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016167 ;
16168 return 0;
16169}
16170_ACEOF
16171rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016172if { (ac_try="$ac_link"
16173case "(($ac_try" in
16174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16175 *) ac_try_echo=$ac_try;;
16176esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016178 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016179 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016180 grep -v '^ *+' conftest.er1 >conftest.err
16181 rm -f conftest.er1
16182 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016184 (exit $ac_status); } && {
16185 test -z "$ac_c_werror_flag" ||
16186 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016187 } && test -s conftest$ac_exeext &&
16188 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016189 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016190else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016191 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016192sed 's/^/| /' conftest.$ac_ext >&5
16193
Martin v. Löwiseba40652007-08-30 20:10:57 +000016194 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016195fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016196
16197rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016198 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016199fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016200{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16201echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16202if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016203 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016204#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016205_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016206
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016207 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016208 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016209else
Guido van Rossumad678af1998-10-02 14:42:15 +000016210
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016211 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016212 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16213echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016214if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016215 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016216fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016217{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16218echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016219else
16220 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016221{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
16222echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016223cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016224/* confdefs.h. */
16225_ACEOF
16226cat confdefs.h >>conftest.$ac_ext
16227cat >>conftest.$ac_ext <<_ACEOF
16228/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016229$ac_includes_default
16230#include <atheos/threads.h>
16231_ACEOF
16232rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016233if { (ac_try="$ac_compile"
16234case "(($ac_try" in
16235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16236 *) ac_try_echo=$ac_try;;
16237esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016239 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016240 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016241 grep -v '^ *+' conftest.er1 >conftest.err
16242 rm -f conftest.er1
16243 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016245 (exit $ac_status); } && {
16246 test -z "$ac_c_werror_flag" ||
16247 test ! -s conftest.err
16248 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016249 ac_header_compiler=yes
16250else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016251 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016252sed 's/^/| /' conftest.$ac_ext >&5
16253
Martin v. Löwiseba40652007-08-30 20:10:57 +000016254 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016255fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016256
16257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016258{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16259echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016260
16261# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016262{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
16263echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016264cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016265/* confdefs.h. */
16266_ACEOF
16267cat confdefs.h >>conftest.$ac_ext
16268cat >>conftest.$ac_ext <<_ACEOF
16269/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016270#include <atheos/threads.h>
16271_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016272if { (ac_try="$ac_cpp conftest.$ac_ext"
16273case "(($ac_try" in
16274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16275 *) ac_try_echo=$ac_try;;
16276esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016278 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016279 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016280 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016281 rm -f conftest.er1
16282 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016284 (exit $ac_status); } >/dev/null && {
16285 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16286 test ! -s conftest.err
16287 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016288 ac_header_preproc=yes
16289else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016290 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016291sed 's/^/| /' conftest.$ac_ext >&5
16292
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016293 ac_header_preproc=no
16294fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016295
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016296rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016297{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16298echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016299
16300# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016301case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16302 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016303 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16304echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16305 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
16306echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016307 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016308 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016309 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016310 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
16311echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
16312 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
16313echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
16314 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
16315echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
16316 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
16317echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16318 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
16319echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
16320 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
16321echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016322 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016323## -------------------------------------- ##
16324## Report this to http://bugs.python.org/ ##
16325## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016326_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016327 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016328 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016329esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016330{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16331echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016332if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016333 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016334else
16335 ac_cv_header_atheos_threads_h=$ac_header_preproc
16336fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016337{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16338echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016339
16340fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016341if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016342 cat >>confdefs.h <<\_ACEOF
16343#define WITH_THREAD 1
16344_ACEOF
16345
16346
16347cat >>confdefs.h <<\_ACEOF
16348#define ATHEOS_THREADS 1
16349_ACEOF
16350
16351 THREADOBJ="Python/thread.o"
16352else
16353
Martin v. Löwis11437992002-04-12 09:54:03 +000016354 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016355 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16356echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016357if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016358 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016359fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016360{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16361echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016362else
Martin v. Löwis11437992002-04-12 09:54:03 +000016363 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016364{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
16365echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016366cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016367/* confdefs.h. */
16368_ACEOF
16369cat confdefs.h >>conftest.$ac_ext
16370cat >>conftest.$ac_ext <<_ACEOF
16371/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016372$ac_includes_default
16373#include <kernel/OS.h>
16374_ACEOF
16375rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016376if { (ac_try="$ac_compile"
16377case "(($ac_try" in
16378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16379 *) ac_try_echo=$ac_try;;
16380esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016382 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016383 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016384 grep -v '^ *+' conftest.er1 >conftest.err
16385 rm -f conftest.er1
16386 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016388 (exit $ac_status); } && {
16389 test -z "$ac_c_werror_flag" ||
16390 test ! -s conftest.err
16391 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016392 ac_header_compiler=yes
16393else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016394 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016395sed 's/^/| /' conftest.$ac_ext >&5
16396
Martin v. Löwiseba40652007-08-30 20:10:57 +000016397 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016398fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016399
16400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016401{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16402echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016403
16404# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016405{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
16406echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016407cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016408/* confdefs.h. */
16409_ACEOF
16410cat confdefs.h >>conftest.$ac_ext
16411cat >>conftest.$ac_ext <<_ACEOF
16412/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016413#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016414_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016415if { (ac_try="$ac_cpp conftest.$ac_ext"
16416case "(($ac_try" in
16417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16418 *) ac_try_echo=$ac_try;;
16419esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016421 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016422 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016423 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016424 rm -f conftest.er1
16425 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016427 (exit $ac_status); } >/dev/null && {
16428 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16429 test ! -s conftest.err
16430 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016431 ac_header_preproc=yes
16432else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016433 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016434sed 's/^/| /' conftest.$ac_ext >&5
16435
Martin v. Löwis11437992002-04-12 09:54:03 +000016436 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016437fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016438
Martin v. Löwis11437992002-04-12 09:54:03 +000016439rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016440{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16441echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016442
Martin v. Löwis11437992002-04-12 09:54:03 +000016443# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016444case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16445 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016446 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
16447echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16448 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
16449echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016450 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016451 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016452 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016453 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
16454echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
16455 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
16456echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
16457 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
16458echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
16459 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
16460echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
16461 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
16462echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
16463 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
16464echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016465 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016466## -------------------------------------- ##
16467## Report this to http://bugs.python.org/ ##
16468## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016469_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016470 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016471 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016472esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016473{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16474echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016475if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016476 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016477else
16478 ac_cv_header_kernel_OS_h=$ac_header_preproc
16479fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016480{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16481echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016482
16483fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016484if test $ac_cv_header_kernel_OS_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016485 cat >>confdefs.h <<\_ACEOF
16486#define WITH_THREAD 1
16487_ACEOF
16488
16489
16490cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016491#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016492_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016493
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016494 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016495else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016496
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016497 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16498echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016499if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016500 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016501else
Martin v. Löwis11437992002-04-12 09:54:03 +000016502 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016503LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016504cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016505/* confdefs.h. */
16506_ACEOF
16507cat confdefs.h >>conftest.$ac_ext
16508cat >>conftest.$ac_ext <<_ACEOF
16509/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016510
Martin v. Löwiseba40652007-08-30 20:10:57 +000016511/* Override any GCC internal prototype to avoid an error.
16512 Use char because int might match the return type of a GCC
16513 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016514#ifdef __cplusplus
16515extern "C"
16516#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016517char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016518int
16519main ()
16520{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016521return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016522 ;
16523 return 0;
16524}
16525_ACEOF
16526rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016527if { (ac_try="$ac_link"
16528case "(($ac_try" in
16529 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16530 *) ac_try_echo=$ac_try;;
16531esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016532eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016533 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016534 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016535 grep -v '^ *+' conftest.er1 >conftest.err
16536 rm -f conftest.er1
16537 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016539 (exit $ac_status); } && {
16540 test -z "$ac_c_werror_flag" ||
16541 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016542 } && test -s conftest$ac_exeext &&
16543 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016544 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016545else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016546 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016547sed 's/^/| /' conftest.$ac_ext >&5
16548
Martin v. Löwiseba40652007-08-30 20:10:57 +000016549 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016550fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016551
16552rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016553 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016554LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016555fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016556{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16557echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16558if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016559 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016560#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016561_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016562
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016563 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016564 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016565 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016566else
Greg Steinadf63d62000-07-05 10:38:09 +000016567
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016568 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16569echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016570if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016571 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016572else
Martin v. Löwis11437992002-04-12 09:54:03 +000016573 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016574LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016575cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016576/* confdefs.h. */
16577_ACEOF
16578cat confdefs.h >>conftest.$ac_ext
16579cat >>conftest.$ac_ext <<_ACEOF
16580/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016581
Martin v. Löwiseba40652007-08-30 20:10:57 +000016582/* Override any GCC internal prototype to avoid an error.
16583 Use char because int might match the return type of a GCC
16584 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016585#ifdef __cplusplus
16586extern "C"
16587#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016588char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016589int
16590main ()
16591{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016592return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016593 ;
16594 return 0;
16595}
16596_ACEOF
16597rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016598if { (ac_try="$ac_link"
16599case "(($ac_try" in
16600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16601 *) ac_try_echo=$ac_try;;
16602esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016603eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016604 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016605 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016606 grep -v '^ *+' conftest.er1 >conftest.err
16607 rm -f conftest.er1
16608 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016610 (exit $ac_status); } && {
16611 test -z "$ac_c_werror_flag" ||
16612 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016613 } && test -s conftest$ac_exeext &&
16614 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016615 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016616else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016617 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016618sed 's/^/| /' conftest.$ac_ext >&5
16619
Martin v. Löwiseba40652007-08-30 20:10:57 +000016620 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016621fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016622
16623rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016624 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016625LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016626fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016627{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16628echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16629if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016630 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016631#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016632_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016633
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016634 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016635 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016636 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016637else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016638
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016639 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16640echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016641if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016642 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016643else
Martin v. Löwis11437992002-04-12 09:54:03 +000016644 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016645LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016646cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016647/* confdefs.h. */
16648_ACEOF
16649cat confdefs.h >>conftest.$ac_ext
16650cat >>conftest.$ac_ext <<_ACEOF
16651/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016652
Martin v. Löwiseba40652007-08-30 20:10:57 +000016653/* Override any GCC internal prototype to avoid an error.
16654 Use char because int might match the return type of a GCC
16655 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016656#ifdef __cplusplus
16657extern "C"
16658#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016659char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016660int
16661main ()
16662{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016663return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016664 ;
16665 return 0;
16666}
16667_ACEOF
16668rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016669if { (ac_try="$ac_link"
16670case "(($ac_try" in
16671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16672 *) ac_try_echo=$ac_try;;
16673esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016675 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016676 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016677 grep -v '^ *+' conftest.er1 >conftest.err
16678 rm -f conftest.er1
16679 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016681 (exit $ac_status); } && {
16682 test -z "$ac_c_werror_flag" ||
16683 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016684 } && test -s conftest$ac_exeext &&
16685 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016686 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016687else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016688 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016689sed 's/^/| /' conftest.$ac_ext >&5
16690
Martin v. Löwiseba40652007-08-30 20:10:57 +000016691 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016692fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016693
16694rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016695 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016696LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016697fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016698{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16699echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16700if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016701 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016702#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016703_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016704
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016705 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016706 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016707 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016708else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016709
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016710 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16711echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016712if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016713 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016714else
Martin v. Löwis11437992002-04-12 09:54:03 +000016715 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016716LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016717cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016718/* confdefs.h. */
16719_ACEOF
16720cat confdefs.h >>conftest.$ac_ext
16721cat >>conftest.$ac_ext <<_ACEOF
16722/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016723
Martin v. Löwiseba40652007-08-30 20:10:57 +000016724/* Override any GCC internal prototype to avoid an error.
16725 Use char because int might match the return type of a GCC
16726 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016727#ifdef __cplusplus
16728extern "C"
16729#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016730char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016731int
16732main ()
16733{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016734return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016735 ;
16736 return 0;
16737}
16738_ACEOF
16739rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016740if { (ac_try="$ac_link"
16741case "(($ac_try" in
16742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16743 *) ac_try_echo=$ac_try;;
16744esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016746 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016747 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016748 grep -v '^ *+' conftest.er1 >conftest.err
16749 rm -f conftest.er1
16750 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016752 (exit $ac_status); } && {
16753 test -z "$ac_c_werror_flag" ||
16754 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016755 } && test -s conftest$ac_exeext &&
16756 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016757 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016758else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016759 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016760sed 's/^/| /' conftest.$ac_ext >&5
16761
Martin v. Löwiseba40652007-08-30 20:10:57 +000016762 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016763fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016764
16765rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016766 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016767LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016768fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016769{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16770echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16771if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016772 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016773#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016774_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016775
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016776 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016777 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016778 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016779else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016780
Martin v. Löwis130fb172001-07-19 11:00:41 +000016781 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016782fi
16783
Guido van Rossum627b2d71993-12-24 10:39:16 +000016784
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016785fi
16786
Guido van Rossum0be3e491997-05-22 20:33:33 +000016787fi
16788
Guido van Rossum49545951997-12-02 19:28:29 +000016789fi
16790
Guido van Rossumb93a8621998-05-07 13:27:32 +000016791fi
16792
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016793
Michael W. Hudson54241132001-12-07 15:38:26 +000016794fi
16795
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016796
16797fi
16798
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016799fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016800
16801rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016802 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016803fi
16804
Martin v. Löwis11437992002-04-12 09:54:03 +000016805fi
16806
16807
16808fi
16809
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016810
Michael W. Hudson54241132001-12-07 15:38:26 +000016811
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016812 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16813echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016814if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016815 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016816else
Martin v. Löwis11437992002-04-12 09:54:03 +000016817 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016818LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016819cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016820/* confdefs.h. */
16821_ACEOF
16822cat confdefs.h >>conftest.$ac_ext
16823cat >>conftest.$ac_ext <<_ACEOF
16824/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016825
Martin v. Löwiseba40652007-08-30 20:10:57 +000016826/* Override any GCC internal prototype to avoid an error.
16827 Use char because int might match the return type of a GCC
16828 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016829#ifdef __cplusplus
16830extern "C"
16831#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016832char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016833int
16834main ()
16835{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016836return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016837 ;
16838 return 0;
16839}
16840_ACEOF
16841rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016842if { (ac_try="$ac_link"
16843case "(($ac_try" in
16844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16845 *) ac_try_echo=$ac_try;;
16846esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016848 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016849 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016850 grep -v '^ *+' conftest.er1 >conftest.err
16851 rm -f conftest.er1
16852 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016854 (exit $ac_status); } && {
16855 test -z "$ac_c_werror_flag" ||
16856 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016857 } && test -s conftest$ac_exeext &&
16858 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016859 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016860else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016861 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016862sed 's/^/| /' conftest.$ac_ext >&5
16863
Martin v. Löwiseba40652007-08-30 20:10:57 +000016864 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016865fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016866
16867rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016868 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016869LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016870fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016871{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16872echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16873if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016874 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016875#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016876_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016877
Martin v. Löwis130fb172001-07-19 11:00:41 +000016878 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016879 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016880 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016881fi
16882
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016883
Neal Norwitza978ab02002-11-02 16:58:05 +000016884 if test "$posix_threads" != "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016885 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16886echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016887if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016888 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016889else
Martin v. Löwis11437992002-04-12 09:54:03 +000016890 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016891LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016892cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016893/* confdefs.h. */
16894_ACEOF
16895cat confdefs.h >>conftest.$ac_ext
16896cat >>conftest.$ac_ext <<_ACEOF
16897/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016898
Martin v. Löwiseba40652007-08-30 20:10:57 +000016899/* Override any GCC internal prototype to avoid an error.
16900 Use char because int might match the return type of a GCC
16901 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016902#ifdef __cplusplus
16903extern "C"
16904#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016905char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016906int
16907main ()
16908{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016909return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016910 ;
16911 return 0;
16912}
16913_ACEOF
16914rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016915if { (ac_try="$ac_link"
16916case "(($ac_try" in
16917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16918 *) ac_try_echo=$ac_try;;
16919esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016921 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016922 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016923 grep -v '^ *+' conftest.er1 >conftest.err
16924 rm -f conftest.er1
16925 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016927 (exit $ac_status); } && {
16928 test -z "$ac_c_werror_flag" ||
16929 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016930 } && test -s conftest$ac_exeext &&
16931 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016932 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016933else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016934 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016935sed 's/^/| /' conftest.$ac_ext >&5
16936
Martin v. Löwiseba40652007-08-30 20:10:57 +000016937 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016938fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016939
16940rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016941 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016942LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016943fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016944{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16945echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16946if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016947 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016948#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016949_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016950
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016951 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016952 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016953 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016954fi
16955
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016956 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016957
Martin v. Löwis130fb172001-07-19 11:00:41 +000016958 if test "$USE_THREAD_MODULE" != "#"
16959 then
16960 # If the above checks didn't disable threads, (at least) OSF1
16961 # needs this '-threads' argument during linking.
16962 case $ac_sys_system in
16963 OSF1) LDLAST=-threads;;
16964 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016965 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016966fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016967
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016968if test "$posix_threads" = "yes"; then
16969 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016970
16971cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016972#define _POSIX_THREADS 1
16973_ACEOF
16974
16975 fi
16976
16977 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16978 case $ac_sys_system/$ac_sys_release in
16979 SunOS/5.6)
16980cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016981#define HAVE_PTHREAD_DESTRUCTOR 1
16982_ACEOF
16983
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016984 ;;
16985 SunOS/5.8)
16986cat >>confdefs.h <<\_ACEOF
16987#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16988_ACEOF
16989
16990 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000016991 AIX/5)
16992cat >>confdefs.h <<\_ACEOF
16993#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16994_ACEOF
16995
16996 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016997 esac
16998
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016999 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
17000echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017001 if test "${ac_cv_pthread_system_supported+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017002 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017003else
17004 if test "$cross_compiling" = yes; then
17005 ac_cv_pthread_system_supported=no
17006else
17007 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017008/* confdefs.h. */
17009_ACEOF
17010cat confdefs.h >>conftest.$ac_ext
17011cat >>conftest.$ac_ext <<_ACEOF
17012/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017013#include <pthread.h>
17014 void *foo(void *parm) {
17015 return NULL;
17016 }
17017 main() {
17018 pthread_attr_t attr;
17019 pthread_t id;
17020 if (pthread_attr_init(&attr)) exit(-1);
17021 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
17022 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
17023 exit(0);
17024 }
17025_ACEOF
17026rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017027if { (ac_try="$ac_link"
17028case "(($ac_try" in
17029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17030 *) ac_try_echo=$ac_try;;
17031esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017033 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017034 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017036 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017037 { (case "(($ac_try" in
17038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17039 *) ac_try_echo=$ac_try;;
17040esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017042 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017043 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017045 (exit $ac_status); }; }; then
17046 ac_cv_pthread_system_supported=yes
17047else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017048 echo "$as_me: program exited with status $ac_status" >&5
17049echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017050sed 's/^/| /' conftest.$ac_ext >&5
17051
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017052( exit $ac_status )
17053ac_cv_pthread_system_supported=no
17054fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017055rm -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 +000017056fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017057
Martin v. Löwiseba40652007-08-30 20:10:57 +000017058
17059
Guido van Rossum627b2d71993-12-24 10:39:16 +000017060fi
17061
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017062 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
17063echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017064 if test "$ac_cv_pthread_system_supported" = "yes"; then
17065
17066cat >>confdefs.h <<\_ACEOF
17067#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
17068_ACEOF
17069
17070 fi
17071
17072for ac_func in pthread_sigmask
17073do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017074as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17075{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17076echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017077if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017078 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017079else
17080 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017081/* confdefs.h. */
17082_ACEOF
17083cat confdefs.h >>conftest.$ac_ext
17084cat >>conftest.$ac_ext <<_ACEOF
17085/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017086/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17087 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17088#define $ac_func innocuous_$ac_func
17089
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017090/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017091 which can conflict with char $ac_func (); below.
17092 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017093 <limits.h> exists even on freestanding compilers. */
17094
17095#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017096# include <limits.h>
17097#else
17098# include <assert.h>
17099#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017100
17101#undef $ac_func
17102
Martin v. Löwiseba40652007-08-30 20:10:57 +000017103/* Override any GCC internal prototype to avoid an error.
17104 Use char because int might match the return type of a GCC
17105 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017106#ifdef __cplusplus
17107extern "C"
17108#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017109char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017110/* The GNU C library defines this for functions which it implements
17111 to always fail with ENOSYS. Some functions are actually named
17112 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017113#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017114choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017115#endif
17116
Skip Montanaro6dead952003-09-25 14:50:04 +000017117int
17118main ()
17119{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017120return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +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öwis4ee6eef2003-05-26 05:37:51 +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öwis4ee6eef2003-05-26 05:37:51 +000017143 eval "$as_ac_var=yes"
17144else
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 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +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öwis4ee6eef2003-05-26 05:37:51 +000017153fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017154ac_res=`eval echo '${'$as_ac_var'}'`
17155 { echo "$as_me:$LINENO: result: $ac_res" >&5
17156echo "${ECHO_T}$ac_res" >&6; }
17157if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017158 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017159#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017160_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000017161 case $ac_sys_system in
17162 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017163
Jason Tishlerfac083d2003-07-22 15:20:49 +000017164cat >>confdefs.h <<\_ACEOF
17165#define HAVE_BROKEN_PTHREAD_SIGMASK 1
17166_ACEOF
17167
17168 ;;
17169 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017170fi
17171done
17172
17173fi
17174
17175
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017176# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000017177
17178
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017179{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
17180echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017181# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017182if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017183 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017184 no)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017185 { echo "$as_me:$LINENO: result: no" >&5
17186echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017187 ipv6=no
17188 ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017189 *) { echo "$as_me:$LINENO: result: yes" >&5
17190echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017191 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017192#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017193_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017194
17195 ipv6=yes
17196 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017197 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017198else
Martin v. Löwis11437992002-04-12 09:54:03 +000017199
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017200 if test "$cross_compiling" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017201 { echo "$as_me:$LINENO: result: no" >&5
17202echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017203 ipv6=no
17204
17205else
Martin v. Löwis11437992002-04-12 09:54:03 +000017206 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017207/* confdefs.h. */
17208_ACEOF
17209cat confdefs.h >>conftest.$ac_ext
17210cat >>conftest.$ac_ext <<_ACEOF
17211/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017212 /* AF_INET6 available check */
17213#include <sys/types.h>
17214#include <sys/socket.h>
17215main()
17216{
17217 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
17218 exit(1);
17219 else
17220 exit(0);
17221}
17222
Martin v. Löwis11437992002-04-12 09:54:03 +000017223_ACEOF
17224rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017225if { (ac_try="$ac_link"
17226case "(($ac_try" in
17227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17228 *) ac_try_echo=$ac_try;;
17229esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017231 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017232 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017234 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017235 { (case "(($ac_try" in
17236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17237 *) ac_try_echo=$ac_try;;
17238esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017240 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017241 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017243 (exit $ac_status); }; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017244 { echo "$as_me:$LINENO: result: yes" >&5
17245echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017246 ipv6=yes
17247else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017248 echo "$as_me: program exited with status $ac_status" >&5
17249echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017250sed 's/^/| /' conftest.$ac_ext >&5
17251
Martin v. Löwis11437992002-04-12 09:54:03 +000017252( exit $ac_status )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017253{ echo "$as_me:$LINENO: result: no" >&5
17254echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017255 ipv6=no
17256fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017257rm -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 +000017258fi
17259
Martin v. Löwiseba40652007-08-30 20:10:57 +000017260
17261
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017262if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017263 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
17264echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017265 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017266/* confdefs.h. */
17267_ACEOF
17268cat confdefs.h >>conftest.$ac_ext
17269cat >>conftest.$ac_ext <<_ACEOF
17270/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017271#include <sys/types.h>
17272#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017273int
17274main ()
17275{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017276struct sockaddr_in6 x;
17277x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000017278 ;
17279 return 0;
17280}
17281_ACEOF
17282rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017283if { (ac_try="$ac_compile"
17284case "(($ac_try" in
17285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17286 *) ac_try_echo=$ac_try;;
17287esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017289 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017290 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017291 grep -v '^ *+' conftest.er1 >conftest.err
17292 rm -f conftest.er1
17293 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017295 (exit $ac_status); } && {
17296 test -z "$ac_c_werror_flag" ||
17297 test ! -s conftest.err
17298 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017299 { echo "$as_me:$LINENO: result: yes" >&5
17300echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017301 ipv6=yes
17302else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017303 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017304sed 's/^/| /' conftest.$ac_ext >&5
17305
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017306 { echo "$as_me:$LINENO: result: no" >&5
17307echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017308 ipv6=no
17309fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017310
17311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017312fi
17313
17314if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017315 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017316#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017317_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017318
17319fi
17320
Martin v. Löwiseba40652007-08-30 20:10:57 +000017321fi
17322
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017323
17324ipv6type=unknown
17325ipv6lib=none
17326ipv6trylibc=no
17327
17328if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017329 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17330echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017331 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17332 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017333 case $i in
17334 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017335 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017336/* confdefs.h. */
17337_ACEOF
17338cat confdefs.h >>conftest.$ac_ext
17339cat >>conftest.$ac_ext <<_ACEOF
17340/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017341
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017342#include <netinet/in.h>
17343#ifdef IPV6_INRIA_VERSION
17344yes
17345#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017346_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017347if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017348 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017349 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017350fi
Benjamin Peterson2c196742009-12-31 03:17:18 +000017351rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017352
17353 ;;
17354 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017355 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017356/* confdefs.h. */
17357_ACEOF
17358cat confdefs.h >>conftest.$ac_ext
17359cat >>conftest.$ac_ext <<_ACEOF
17360/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017361
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017362#include <netinet/in.h>
17363#ifdef __KAME__
17364yes
17365#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017366_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017367if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017368 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017369 ipv6type=$i;
17370 ipv6lib=inet6
17371 ipv6libdir=/usr/local/v6/lib
17372 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017373fi
Benjamin Peterson2c196742009-12-31 03:17:18 +000017374rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017375
17376 ;;
17377 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017378 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017379/* confdefs.h. */
17380_ACEOF
17381cat confdefs.h >>conftest.$ac_ext
17382cat >>conftest.$ac_ext <<_ACEOF
17383/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017384
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017385#include <features.h>
17386#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17387yes
17388#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017389_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017390if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017391 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017392 ipv6type=$i;
17393 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017394fi
Benjamin Peterson2c196742009-12-31 03:17:18 +000017395rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017396
17397 ;;
17398 linux-inet6)
17399 if test -d /usr/inet6; then
17400 ipv6type=$i
17401 ipv6lib=inet6
17402 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017403 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017404 fi
17405 ;;
17406 solaris)
17407 if test -f /etc/netconfig; then
17408 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17409 ipv6type=$i
17410 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017411 fi
17412 fi
17413 ;;
17414 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017415 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017416/* confdefs.h. */
17417_ACEOF
17418cat confdefs.h >>conftest.$ac_ext
17419cat >>conftest.$ac_ext <<_ACEOF
17420/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017421
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017422#include <sys/param.h>
17423#ifdef _TOSHIBA_INET6
17424yes
17425#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017426_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017427if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017428 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017429 ipv6type=$i;
17430 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017431 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017432fi
Benjamin Peterson2c196742009-12-31 03:17:18 +000017433rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017434
17435 ;;
17436 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017437 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017438/* confdefs.h. */
17439_ACEOF
17440cat confdefs.h >>conftest.$ac_ext
17441cat >>conftest.$ac_ext <<_ACEOF
17442/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017443
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017444#include </usr/local/v6/include/sys/v6config.h>
17445#ifdef __V6D__
17446yes
17447#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017448_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017449if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017450 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017451 ipv6type=$i;
17452 ipv6lib=v6;
17453 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017454 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017455fi
Benjamin Peterson2c196742009-12-31 03:17:18 +000017456rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017457
17458 ;;
17459 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017460 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017461/* confdefs.h. */
17462_ACEOF
17463cat confdefs.h >>conftest.$ac_ext
17464cat >>conftest.$ac_ext <<_ACEOF
17465/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017466
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017467#include <sys/param.h>
17468#ifdef _ZETA_MINAMI_INET6
17469yes
17470#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017471_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017472if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017473 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017474 ipv6type=$i;
17475 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017476 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017477fi
Benjamin Peterson2c196742009-12-31 03:17:18 +000017478rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017479
17480 ;;
17481 esac
17482 if test "$ipv6type" != "unknown"; then
17483 break
17484 fi
17485 done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017486 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17487echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017488fi
17489
17490if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17491 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17492 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17493 echo "using lib$ipv6lib"
17494 else
17495 if test $ipv6trylibc = "yes"; then
17496 echo "using libc"
17497 else
17498 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17499 echo "You need to fetch lib$ipv6lib.a from appropriate"
17500 echo 'ipv6 kit and compile beforehand.'
17501 exit 1
17502 fi
17503 fi
17504fi
17505
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017506{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17507echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017508cat >conftest.$ac_ext <<_ACEOF
17509/* confdefs.h. */
17510_ACEOF
17511cat confdefs.h >>conftest.$ac_ext
17512cat >>conftest.$ac_ext <<_ACEOF
17513/* end confdefs.h. */
17514#include <Carbon/Carbon.h>
17515int
17516main ()
17517{
17518FSIORefNum fRef = 0
17519 ;
17520 return 0;
17521}
17522_ACEOF
17523rm -f conftest.$ac_objext
17524if { (ac_try="$ac_compile"
17525case "(($ac_try" in
17526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17527 *) ac_try_echo=$ac_try;;
17528esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017530 (eval "$ac_compile") 2>conftest.er1
17531 ac_status=$?
17532 grep -v '^ *+' conftest.er1 >conftest.err
17533 rm -f conftest.er1
17534 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017536 (exit $ac_status); } && {
17537 test -z "$ac_c_werror_flag" ||
17538 test ! -s conftest.err
17539 } && test -s conftest.$ac_objext; then
17540
17541cat >>confdefs.h <<\_ACEOF
17542#define HAVE_OSX105_SDK 1
17543_ACEOF
17544
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017545 { echo "$as_me:$LINENO: result: yes" >&5
17546echo "${ECHO_T}yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017547else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017548 echo "$as_me: failed program was:" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017549sed 's/^/| /' conftest.$ac_ext >&5
17550
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017551 { echo "$as_me:$LINENO: result: no" >&5
17552echo "${ECHO_T}no" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017553
17554fi
17555
17556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17557
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017558# Check for --with-doc-strings
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017559{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17560echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017561
Martin v. Löwiseba40652007-08-30 20:10:57 +000017562# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017563if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017564 withval=$with_doc_strings;
17565fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017566
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017567
17568if test -z "$with_doc_strings"
17569then with_doc_strings="yes"
17570fi
17571if test "$with_doc_strings" != "no"
17572then
17573
17574cat >>confdefs.h <<\_ACEOF
17575#define WITH_DOC_STRINGS 1
17576_ACEOF
17577
17578fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017579{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17580echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017581
Neil Schemenauera35c6882001-02-27 04:45:05 +000017582# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017583{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17584echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017585
Martin v. Löwiseba40652007-08-30 20:10:57 +000017586# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017587if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017588 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017589if test "$withval" != no
17590then
17591
17592cat >>confdefs.h <<\_ACEOF
17593#define WITH_TSC 1
17594_ACEOF
17595
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017596 { echo "$as_me:$LINENO: result: yes" >&5
17597echo "${ECHO_T}yes" >&6; }
17598else { echo "$as_me:$LINENO: result: no" >&5
17599echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017600fi
17601else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017602 { echo "$as_me:$LINENO: result: no" >&5
17603echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017604fi
17605
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017606
17607# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017608{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17609echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017610
Martin v. Löwiseba40652007-08-30 20:10:57 +000017611# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017612if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017613 withval=$with_pymalloc;
17614fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017615
Neil Schemenauera35c6882001-02-27 04:45:05 +000017616
Neil Schemenauer16c22972002-03-22 15:34:49 +000017617if test -z "$with_pymalloc"
17618then with_pymalloc="yes"
17619fi
17620if test "$with_pymalloc" != "no"
17621then
Martin v. Löwis11437992002-04-12 09:54:03 +000017622
17623cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017624#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017625_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017626
17627fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017628{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17629echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017630
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000017631# Check for Valgrind support
17632{ echo "$as_me:$LINENO: checking for --with-valgrind" >&5
17633echo $ECHO_N "checking for --with-valgrind... $ECHO_C" >&6; }
17634
17635# Check whether --with-valgrind was given.
17636if test "${with_valgrind+set}" = set; then
17637 withval=$with_valgrind;
17638else
17639 with_valgrind=no
17640fi
17641
17642{ echo "$as_me:$LINENO: result: $with_valgrind" >&5
17643echo "${ECHO_T}$with_valgrind" >&6; }
17644if test "$with_valgrind" != no; then
17645 if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17646 { echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17647echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17648if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17649 echo $ECHO_N "(cached) $ECHO_C" >&6
17650fi
17651{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17652echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17653else
17654 # Is the header compilable?
17655{ echo "$as_me:$LINENO: checking valgrind/valgrind.h usability" >&5
17656echo $ECHO_N "checking valgrind/valgrind.h usability... $ECHO_C" >&6; }
17657cat >conftest.$ac_ext <<_ACEOF
17658/* confdefs.h. */
17659_ACEOF
17660cat confdefs.h >>conftest.$ac_ext
17661cat >>conftest.$ac_ext <<_ACEOF
17662/* end confdefs.h. */
17663$ac_includes_default
17664#include <valgrind/valgrind.h>
17665_ACEOF
17666rm -f conftest.$ac_objext
17667if { (ac_try="$ac_compile"
17668case "(($ac_try" in
17669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17670 *) ac_try_echo=$ac_try;;
17671esac
17672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17673 (eval "$ac_compile") 2>conftest.er1
17674 ac_status=$?
17675 grep -v '^ *+' conftest.er1 >conftest.err
17676 rm -f conftest.er1
17677 cat conftest.err >&5
17678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17679 (exit $ac_status); } && {
17680 test -z "$ac_c_werror_flag" ||
17681 test ! -s conftest.err
17682 } && test -s conftest.$ac_objext; then
17683 ac_header_compiler=yes
17684else
17685 echo "$as_me: failed program was:" >&5
17686sed 's/^/| /' conftest.$ac_ext >&5
17687
17688 ac_header_compiler=no
17689fi
17690
17691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17692{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17693echo "${ECHO_T}$ac_header_compiler" >&6; }
17694
17695# Is the header present?
17696{ echo "$as_me:$LINENO: checking valgrind/valgrind.h presence" >&5
17697echo $ECHO_N "checking valgrind/valgrind.h presence... $ECHO_C" >&6; }
17698cat >conftest.$ac_ext <<_ACEOF
17699/* confdefs.h. */
17700_ACEOF
17701cat confdefs.h >>conftest.$ac_ext
17702cat >>conftest.$ac_ext <<_ACEOF
17703/* end confdefs.h. */
17704#include <valgrind/valgrind.h>
17705_ACEOF
17706if { (ac_try="$ac_cpp conftest.$ac_ext"
17707case "(($ac_try" in
17708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17709 *) ac_try_echo=$ac_try;;
17710esac
17711eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17712 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17713 ac_status=$?
17714 grep -v '^ *+' conftest.er1 >conftest.err
17715 rm -f conftest.er1
17716 cat conftest.err >&5
17717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17718 (exit $ac_status); } >/dev/null && {
17719 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17720 test ! -s conftest.err
17721 }; then
17722 ac_header_preproc=yes
17723else
17724 echo "$as_me: failed program was:" >&5
17725sed 's/^/| /' conftest.$ac_ext >&5
17726
17727 ac_header_preproc=no
17728fi
17729
17730rm -f conftest.err conftest.$ac_ext
17731{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17732echo "${ECHO_T}$ac_header_preproc" >&6; }
17733
17734# So? What about this header?
17735case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17736 yes:no: )
17737 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
17738echo "$as_me: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17739 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&5
17740echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&2;}
17741 ac_header_preproc=yes
17742 ;;
17743 no:yes:* )
17744 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&5
17745echo "$as_me: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&2;}
17746 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&5
17747echo "$as_me: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&2;}
17748 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&5
17749echo "$as_me: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&2;}
17750 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
17751echo "$as_me: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
17752 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&5
17753echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&2;}
17754 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&5
17755echo "$as_me: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&2;}
17756 ( cat <<\_ASBOX
17757## -------------------------------------- ##
17758## Report this to http://bugs.python.org/ ##
17759## -------------------------------------- ##
17760_ASBOX
17761 ) | sed "s/^/$as_me: WARNING: /" >&2
17762 ;;
17763esac
17764{ echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17765echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17766if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17767 echo $ECHO_N "(cached) $ECHO_C" >&6
17768else
17769 ac_cv_header_valgrind_valgrind_h=$ac_header_preproc
17770fi
17771{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17772echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17773
17774fi
17775if test $ac_cv_header_valgrind_valgrind_h = yes; then
17776
17777cat >>confdefs.h <<\_ACEOF
17778#define WITH_VALGRIND 1
17779_ACEOF
17780
17781else
17782 { { echo "$as_me:$LINENO: error: Valgrind support requested but headers not available" >&5
17783echo "$as_me: error: Valgrind support requested but headers not available" >&2;}
17784 { (exit 1); exit 1; }; }
17785
17786fi
17787
17788
17789fi
17790
Barry Warsawef82cd72000-06-30 16:21:01 +000017791# Check for --with-wctype-functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017792{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17793echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017794
Martin v. Löwiseba40652007-08-30 20:10:57 +000017795# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017796if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017797 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017798if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017799then
17800
17801cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017802#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017803_ACEOF
17804
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017805 { echo "$as_me:$LINENO: result: yes" >&5
17806echo "${ECHO_T}yes" >&6; }
17807else { echo "$as_me:$LINENO: result: no" >&5
17808echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017809fi
17810else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017811 { echo "$as_me:$LINENO: result: no" >&5
17812echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017813fi
17814
Barry Warsawef82cd72000-06-30 16:21:01 +000017815
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017816# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017817
Guido van Rossum98935bf2001-09-05 19:13:16 +000017818DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017819
Guido van Rossume97ee181999-12-20 21:27:22 +000017820# the dlopen() function means we might want to use dynload_shlib.o. some
17821# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017822
Thomas Wouters3a584202000-08-05 23:28:51 +000017823for ac_func in dlopen
17824do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017825as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17826{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17827echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017828if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017829 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017830else
Martin v. Löwis11437992002-04-12 09:54:03 +000017831 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017832/* confdefs.h. */
17833_ACEOF
17834cat confdefs.h >>conftest.$ac_ext
17835cat >>conftest.$ac_ext <<_ACEOF
17836/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017837/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17838 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17839#define $ac_func innocuous_$ac_func
17840
Guido van Rossume97ee181999-12-20 21:27:22 +000017841/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017842 which can conflict with char $ac_func (); below.
17843 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017844 <limits.h> exists even on freestanding compilers. */
17845
17846#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017847# include <limits.h>
17848#else
17849# include <assert.h>
17850#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017851
17852#undef $ac_func
17853
Martin v. Löwiseba40652007-08-30 20:10:57 +000017854/* Override any GCC internal prototype to avoid an error.
17855 Use char because int might match the return type of a GCC
17856 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017857#ifdef __cplusplus
17858extern "C"
17859#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017860char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017861/* The GNU C library defines this for functions which it implements
17862 to always fail with ENOSYS. Some functions are actually named
17863 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017864#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017865choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017866#endif
17867
Skip Montanaro6dead952003-09-25 14:50:04 +000017868int
17869main ()
17870{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017871return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017872 ;
17873 return 0;
17874}
17875_ACEOF
17876rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017877if { (ac_try="$ac_link"
17878case "(($ac_try" in
17879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17880 *) ac_try_echo=$ac_try;;
17881esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017883 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017884 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017885 grep -v '^ *+' conftest.er1 >conftest.err
17886 rm -f conftest.er1
17887 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017889 (exit $ac_status); } && {
17890 test -z "$ac_c_werror_flag" ||
17891 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017892 } && test -s conftest$ac_exeext &&
17893 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017894 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017895else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017896 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017897sed 's/^/| /' conftest.$ac_ext >&5
17898
Martin v. Löwiseba40652007-08-30 20:10:57 +000017899 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017900fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017901
17902rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017903 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017904fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017905ac_res=`eval echo '${'$as_ac_var'}'`
17906 { echo "$as_me:$LINENO: result: $ac_res" >&5
17907echo "${ECHO_T}$ac_res" >&6; }
17908if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017909 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017910#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017911_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017912
Guido van Rossume97ee181999-12-20 21:27:22 +000017913fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017914done
Guido van Rossume97ee181999-12-20 21:27:22 +000017915
Michael W. Hudson54241132001-12-07 15:38:26 +000017916
Guido van Rossume97ee181999-12-20 21:27:22 +000017917# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17918# loading of modules.
17919
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017920{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17921echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017922if test -z "$DYNLOADFILE"
17923then
17924 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017925 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17926 if test "$ac_cv_func_dlopen" = yes
17927 then DYNLOADFILE="dynload_shlib.o"
17928 else DYNLOADFILE="dynload_aix.o"
17929 fi
17930 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017931 BeOS*) DYNLOADFILE="dynload_beos.o";;
17932 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000017933 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17934 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017935 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017936 *)
17937 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17938 # out any dynamic loading
17939 if test "$ac_cv_func_dlopen" = yes
17940 then DYNLOADFILE="dynload_shlib.o"
17941 else DYNLOADFILE="dynload_stub.o"
17942 fi
17943 ;;
17944 esac
17945fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017946{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17947echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017948if test "$DYNLOADFILE" != "dynload_stub.o"
17949then
Martin v. Löwis11437992002-04-12 09:54:03 +000017950
17951cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017952#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017953_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017954
17955fi
17956
Neil Schemenauer4e425612001-06-19 15:44:15 +000017957# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17958
Michael W. Hudson54241132001-12-07 15:38:26 +000017959
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017960{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17961echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017962if test -z "$MACHDEP_OBJS"
17963then
Jack Jansene578a632001-08-15 01:27:14 +000017964 MACHDEP_OBJS=$extra_machdep_objs
17965else
17966 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017967fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017968{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17969echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017970
Guido van Rossum627b2d71993-12-24 10:39:16 +000017971# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017972
17973
17974
17975
17976
17977
17978
17979
17980
17981
17982
17983
17984
17985
17986
17987
17988
17989
17990
17991
17992
17993
17994
17995
17996
17997
17998
17999
18000
18001
18002
18003
18004
18005
18006
18007
18008
18009
18010
18011
18012
18013
18014
18015
18016
18017
18018
18019
18020
18021
18022
18023
18024
18025
18026
18027
18028
18029
18030
18031
18032
18033
18034
18035
18036
18037
18038
18039
18040
18041
18042
Martin v. Löwisd6320502004-08-12 13:45:08 +000018043
Martin v. Löwisc3001752005-01-23 09:27:24 +000018044
18045
Neal Norwitz05a45592006-03-20 06:30:08 +000018046
18047
Martin v. Löwis382abef2007-02-19 10:55:19 +000018048
18049
Christian Heimes36281872007-11-30 21:11:28 +000018050
Martin v. Löwisaef18b12008-03-24 13:31:16 +000018051
18052
Jesse Noller355b1262009-04-02 00:03:28 +000018053
18054
18055
18056
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018057
18058
18059
18060
18061
18062
18063
18064
18065
18066
18067
18068
18069
Antoine Pitrou30b3b352009-12-02 20:37:54 +000018070
Martin v. Löwisaef18b12008-03-24 13:31:16 +000018071for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
18072 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000018073 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018074 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrou30b3b352009-12-02 20:37:54 +000018075 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000018076 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000018077 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000018078 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
18079 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000018080 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018081 setlocale setregid setreuid setresuid setresgid \
18082 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000018083 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000018084 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000018085 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000018086do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018087as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18088{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18089echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018090if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018091 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018092else
Martin v. Löwis11437992002-04-12 09:54:03 +000018093 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018094/* confdefs.h. */
18095_ACEOF
18096cat confdefs.h >>conftest.$ac_ext
18097cat >>conftest.$ac_ext <<_ACEOF
18098/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018099/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18100 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18101#define $ac_func innocuous_$ac_func
18102
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018103/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018104 which can conflict with char $ac_func (); below.
18105 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018106 <limits.h> exists even on freestanding compilers. */
18107
18108#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018109# include <limits.h>
18110#else
18111# include <assert.h>
18112#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018113
18114#undef $ac_func
18115
Martin v. Löwiseba40652007-08-30 20:10:57 +000018116/* Override any GCC internal prototype to avoid an error.
18117 Use char because int might match the return type of a GCC
18118 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018119#ifdef __cplusplus
18120extern "C"
18121#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018122char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018123/* The GNU C library defines this for functions which it implements
18124 to always fail with ENOSYS. Some functions are actually named
18125 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018126#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018127choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018128#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018129
Skip Montanaro6dead952003-09-25 14:50:04 +000018130int
18131main ()
18132{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018133return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018134 ;
18135 return 0;
18136}
18137_ACEOF
18138rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018139if { (ac_try="$ac_link"
18140case "(($ac_try" in
18141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18142 *) ac_try_echo=$ac_try;;
18143esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018144eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018145 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018146 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018147 grep -v '^ *+' conftest.er1 >conftest.err
18148 rm -f conftest.er1
18149 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018151 (exit $ac_status); } && {
18152 test -z "$ac_c_werror_flag" ||
18153 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018154 } && test -s conftest$ac_exeext &&
18155 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018156 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018157else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018158 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018159sed 's/^/| /' conftest.$ac_ext >&5
18160
Martin v. Löwiseba40652007-08-30 20:10:57 +000018161 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018162fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018163
18164rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018165 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018166fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018167ac_res=`eval echo '${'$as_ac_var'}'`
18168 { echo "$as_me:$LINENO: result: $ac_res" >&5
18169echo "${ECHO_T}$ac_res" >&6; }
18170if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018171 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018172#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018173_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018174
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018175fi
18176done
18177
Michael W. Hudson54241132001-12-07 15:38:26 +000018178
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018179# For some functions, having a definition is not sufficient, since
18180# we want to take their address.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018181{ echo "$as_me:$LINENO: checking for chroot" >&5
18182echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018183cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018184/* confdefs.h. */
18185_ACEOF
18186cat confdefs.h >>conftest.$ac_ext
18187cat >>conftest.$ac_ext <<_ACEOF
18188/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018189#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018190int
18191main ()
18192{
18193void *x=chroot
18194 ;
18195 return 0;
18196}
18197_ACEOF
18198rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018199if { (ac_try="$ac_compile"
18200case "(($ac_try" in
18201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18202 *) ac_try_echo=$ac_try;;
18203esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018205 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018206 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018207 grep -v '^ *+' conftest.er1 >conftest.err
18208 rm -f conftest.er1
18209 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018211 (exit $ac_status); } && {
18212 test -z "$ac_c_werror_flag" ||
18213 test ! -s conftest.err
18214 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018215
18216cat >>confdefs.h <<\_ACEOF
18217#define HAVE_CHROOT 1
18218_ACEOF
18219
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018220 { echo "$as_me:$LINENO: result: yes" >&5
18221echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018222else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018223 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018224sed 's/^/| /' conftest.$ac_ext >&5
18225
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018226 { echo "$as_me:$LINENO: result: no" >&5
18227echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018228
18229fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018230
18231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018232{ echo "$as_me:$LINENO: checking for link" >&5
18233echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018234cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018235/* confdefs.h. */
18236_ACEOF
18237cat confdefs.h >>conftest.$ac_ext
18238cat >>conftest.$ac_ext <<_ACEOF
18239/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018240#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018241int
18242main ()
18243{
18244void *x=link
18245 ;
18246 return 0;
18247}
18248_ACEOF
18249rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018250if { (ac_try="$ac_compile"
18251case "(($ac_try" in
18252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18253 *) ac_try_echo=$ac_try;;
18254esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018255eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018256 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018257 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018258 grep -v '^ *+' conftest.er1 >conftest.err
18259 rm -f conftest.er1
18260 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018262 (exit $ac_status); } && {
18263 test -z "$ac_c_werror_flag" ||
18264 test ! -s conftest.err
18265 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018266
18267cat >>confdefs.h <<\_ACEOF
18268#define HAVE_LINK 1
18269_ACEOF
18270
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018271 { echo "$as_me:$LINENO: result: yes" >&5
18272echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018273else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018274 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018275sed 's/^/| /' conftest.$ac_ext >&5
18276
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018277 { echo "$as_me:$LINENO: result: no" >&5
18278echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018279
18280fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018281
18282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018283{ echo "$as_me:$LINENO: checking for symlink" >&5
18284echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018285cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018286/* confdefs.h. */
18287_ACEOF
18288cat confdefs.h >>conftest.$ac_ext
18289cat >>conftest.$ac_ext <<_ACEOF
18290/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018291#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018292int
18293main ()
18294{
18295void *x=symlink
18296 ;
18297 return 0;
18298}
18299_ACEOF
18300rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018301if { (ac_try="$ac_compile"
18302case "(($ac_try" in
18303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18304 *) ac_try_echo=$ac_try;;
18305esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018306eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018307 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018308 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018309 grep -v '^ *+' conftest.er1 >conftest.err
18310 rm -f conftest.er1
18311 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018313 (exit $ac_status); } && {
18314 test -z "$ac_c_werror_flag" ||
18315 test ! -s conftest.err
18316 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018317
18318cat >>confdefs.h <<\_ACEOF
18319#define HAVE_SYMLINK 1
18320_ACEOF
18321
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018322 { echo "$as_me:$LINENO: result: yes" >&5
18323echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018324else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018325 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018326sed 's/^/| /' conftest.$ac_ext >&5
18327
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018328 { echo "$as_me:$LINENO: result: no" >&5
18329echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018330
18331fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018332
18333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018334{ echo "$as_me:$LINENO: checking for fchdir" >&5
18335echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018336cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018337/* confdefs.h. */
18338_ACEOF
18339cat confdefs.h >>conftest.$ac_ext
18340cat >>conftest.$ac_ext <<_ACEOF
18341/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018342#include <unistd.h>
18343int
18344main ()
18345{
18346void *x=fchdir
18347 ;
18348 return 0;
18349}
18350_ACEOF
18351rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018352if { (ac_try="$ac_compile"
18353case "(($ac_try" in
18354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18355 *) ac_try_echo=$ac_try;;
18356esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018358 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018359 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018360 grep -v '^ *+' conftest.er1 >conftest.err
18361 rm -f conftest.er1
18362 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018364 (exit $ac_status); } && {
18365 test -z "$ac_c_werror_flag" ||
18366 test ! -s conftest.err
18367 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018368
18369cat >>confdefs.h <<\_ACEOF
18370#define HAVE_FCHDIR 1
18371_ACEOF
18372
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018373 { echo "$as_me:$LINENO: result: yes" >&5
18374echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018375else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018376 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018377sed 's/^/| /' conftest.$ac_ext >&5
18378
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018379 { echo "$as_me:$LINENO: result: no" >&5
18380echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018381
18382fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018383
18384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018385{ echo "$as_me:$LINENO: checking for fsync" >&5
18386echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018387cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018388/* confdefs.h. */
18389_ACEOF
18390cat confdefs.h >>conftest.$ac_ext
18391cat >>conftest.$ac_ext <<_ACEOF
18392/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018393#include <unistd.h>
18394int
18395main ()
18396{
18397void *x=fsync
18398 ;
18399 return 0;
18400}
18401_ACEOF
18402rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018403if { (ac_try="$ac_compile"
18404case "(($ac_try" in
18405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18406 *) ac_try_echo=$ac_try;;
18407esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018409 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018410 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018411 grep -v '^ *+' conftest.er1 >conftest.err
18412 rm -f conftest.er1
18413 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018415 (exit $ac_status); } && {
18416 test -z "$ac_c_werror_flag" ||
18417 test ! -s conftest.err
18418 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018419
18420cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018421#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018422_ACEOF
18423
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018424 { echo "$as_me:$LINENO: result: yes" >&5
18425echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018426else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018427 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018428sed 's/^/| /' conftest.$ac_ext >&5
18429
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018430 { echo "$as_me:$LINENO: result: no" >&5
18431echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018432
18433fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018434
18435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018436{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18437echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018438cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018439/* confdefs.h. */
18440_ACEOF
18441cat confdefs.h >>conftest.$ac_ext
18442cat >>conftest.$ac_ext <<_ACEOF
18443/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018444#include <unistd.h>
18445int
18446main ()
18447{
18448void *x=fdatasync
18449 ;
18450 return 0;
18451}
18452_ACEOF
18453rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018454if { (ac_try="$ac_compile"
18455case "(($ac_try" in
18456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18457 *) ac_try_echo=$ac_try;;
18458esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018460 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018461 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018462 grep -v '^ *+' conftest.er1 >conftest.err
18463 rm -f conftest.er1
18464 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018466 (exit $ac_status); } && {
18467 test -z "$ac_c_werror_flag" ||
18468 test ! -s conftest.err
18469 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018470
18471cat >>confdefs.h <<\_ACEOF
18472#define HAVE_FDATASYNC 1
18473_ACEOF
18474
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018475 { echo "$as_me:$LINENO: result: yes" >&5
18476echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018477else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018478 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018479sed 's/^/| /' conftest.$ac_ext >&5
18480
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018481 { echo "$as_me:$LINENO: result: no" >&5
18482echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018483
18484fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018485
18486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018487{ echo "$as_me:$LINENO: checking for epoll" >&5
18488echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018489cat >conftest.$ac_ext <<_ACEOF
18490/* confdefs.h. */
18491_ACEOF
18492cat confdefs.h >>conftest.$ac_ext
18493cat >>conftest.$ac_ext <<_ACEOF
18494/* end confdefs.h. */
18495#include <sys/epoll.h>
18496int
18497main ()
18498{
18499void *x=epoll_create
18500 ;
18501 return 0;
18502}
18503_ACEOF
18504rm -f conftest.$ac_objext
18505if { (ac_try="$ac_compile"
18506case "(($ac_try" in
18507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18508 *) ac_try_echo=$ac_try;;
18509esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018511 (eval "$ac_compile") 2>conftest.er1
18512 ac_status=$?
18513 grep -v '^ *+' conftest.er1 >conftest.err
18514 rm -f conftest.er1
18515 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018517 (exit $ac_status); } && {
18518 test -z "$ac_c_werror_flag" ||
18519 test ! -s conftest.err
18520 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018521
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018522cat >>confdefs.h <<\_ACEOF
18523#define HAVE_EPOLL 1
18524_ACEOF
18525
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018526 { echo "$as_me:$LINENO: result: yes" >&5
18527echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018528else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018529 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018530sed 's/^/| /' conftest.$ac_ext >&5
18531
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018532 { echo "$as_me:$LINENO: result: no" >&5
18533echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018534
18535fi
18536
18537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018538{ echo "$as_me:$LINENO: checking for kqueue" >&5
18539echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018540cat >conftest.$ac_ext <<_ACEOF
18541/* confdefs.h. */
18542_ACEOF
18543cat confdefs.h >>conftest.$ac_ext
18544cat >>conftest.$ac_ext <<_ACEOF
18545/* end confdefs.h. */
18546
18547#include <sys/types.h>
18548#include <sys/event.h>
18549
18550int
18551main ()
18552{
18553int x=kqueue()
18554 ;
18555 return 0;
18556}
18557_ACEOF
18558rm -f conftest.$ac_objext
18559if { (ac_try="$ac_compile"
18560case "(($ac_try" in
18561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18562 *) ac_try_echo=$ac_try;;
18563esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018565 (eval "$ac_compile") 2>conftest.er1
18566 ac_status=$?
18567 grep -v '^ *+' conftest.er1 >conftest.err
18568 rm -f conftest.er1
18569 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018571 (exit $ac_status); } && {
18572 test -z "$ac_c_werror_flag" ||
18573 test ! -s conftest.err
18574 } && test -s conftest.$ac_objext; then
18575
18576cat >>confdefs.h <<\_ACEOF
18577#define HAVE_KQUEUE 1
18578_ACEOF
18579
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018580 { echo "$as_me:$LINENO: result: yes" >&5
18581echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018582else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018583 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018584sed 's/^/| /' conftest.$ac_ext >&5
18585
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018586 { echo "$as_me:$LINENO: result: no" >&5
18587echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018588
18589fi
18590
18591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018592# On some systems (eg. FreeBSD 5), we would find a definition of the
18593# functions ctermid_r, setgroups in the library, but no prototype
18594# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18595# address to avoid compiler warnings and potential miscompilations
18596# because of the missing prototypes.
18597
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018598{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18599echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018600cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018601/* confdefs.h. */
18602_ACEOF
18603cat confdefs.h >>conftest.$ac_ext
18604cat >>conftest.$ac_ext <<_ACEOF
18605/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018606
18607#include "confdefs.h"
18608#include <stdio.h>
18609
Martin v. Löwisd5843682002-11-21 20:41:28 +000018610int
18611main ()
18612{
18613void* p = ctermid_r
18614 ;
18615 return 0;
18616}
18617_ACEOF
18618rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018619if { (ac_try="$ac_compile"
18620case "(($ac_try" in
18621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18622 *) ac_try_echo=$ac_try;;
18623esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018625 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018626 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018627 grep -v '^ *+' conftest.er1 >conftest.err
18628 rm -f conftest.er1
18629 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018631 (exit $ac_status); } && {
18632 test -z "$ac_c_werror_flag" ||
18633 test ! -s conftest.err
18634 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018635
18636cat >>confdefs.h <<\_ACEOF
18637#define HAVE_CTERMID_R 1
18638_ACEOF
18639
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018640 { echo "$as_me:$LINENO: result: yes" >&5
18641echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018642else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018643 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018644sed 's/^/| /' conftest.$ac_ext >&5
18645
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018646 { echo "$as_me:$LINENO: result: no" >&5
18647echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018648
18649fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000018650
Martin v. Löwiseba40652007-08-30 20:10:57 +000018651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18652
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018653{ echo "$as_me:$LINENO: checking for flock" >&5
18654echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018655cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018656/* confdefs.h. */
18657_ACEOF
18658cat confdefs.h >>conftest.$ac_ext
18659cat >>conftest.$ac_ext <<_ACEOF
18660/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018661
18662#include "confdefs.h"
18663#include <sys/file.h>
18664
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018665int
18666main ()
18667{
18668void* p = flock
18669 ;
18670 return 0;
18671}
18672_ACEOF
18673rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018674if { (ac_try="$ac_compile"
18675case "(($ac_try" in
18676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18677 *) ac_try_echo=$ac_try;;
18678esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018680 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018681 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018682 grep -v '^ *+' conftest.er1 >conftest.err
18683 rm -f conftest.er1
18684 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018686 (exit $ac_status); } && {
18687 test -z "$ac_c_werror_flag" ||
18688 test ! -s conftest.err
18689 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018690
18691cat >>confdefs.h <<\_ACEOF
18692#define HAVE_FLOCK 1
18693_ACEOF
18694
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018695 { echo "$as_me:$LINENO: result: yes" >&5
18696echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018697else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018698 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018699sed 's/^/| /' conftest.$ac_ext >&5
18700
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018701 { echo "$as_me:$LINENO: result: no" >&5
18702echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018703
18704fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018705
Martin v. Löwiseba40652007-08-30 20:10:57 +000018706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18707
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018708{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18709echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018710cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018711/* confdefs.h. */
18712_ACEOF
18713cat confdefs.h >>conftest.$ac_ext
18714cat >>conftest.$ac_ext <<_ACEOF
18715/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018716
18717#include "confdefs.h"
18718#include <unistd.h>
18719
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018720int
18721main ()
18722{
18723void* p = getpagesize
18724 ;
18725 return 0;
18726}
18727_ACEOF
18728rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018729if { (ac_try="$ac_compile"
18730case "(($ac_try" in
18731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18732 *) ac_try_echo=$ac_try;;
18733esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018735 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018736 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018737 grep -v '^ *+' conftest.er1 >conftest.err
18738 rm -f conftest.er1
18739 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018741 (exit $ac_status); } && {
18742 test -z "$ac_c_werror_flag" ||
18743 test ! -s conftest.err
18744 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018745
18746cat >>confdefs.h <<\_ACEOF
18747#define HAVE_GETPAGESIZE 1
18748_ACEOF
18749
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018750 { echo "$as_me:$LINENO: result: yes" >&5
18751echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018752else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018753 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018754sed 's/^/| /' conftest.$ac_ext >&5
18755
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018756 { echo "$as_me:$LINENO: result: no" >&5
18757echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018758
18759fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018760
18761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018762
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018763for ac_prog in true
18764do
18765 # Extract the first word of "$ac_prog", so it can be a program name with args.
18766set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018767{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18768echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018769if test "${ac_cv_prog_TRUE+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018770 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018771else
18772 if test -n "$TRUE"; then
18773 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18774else
18775as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18776for as_dir in $PATH
18777do
18778 IFS=$as_save_IFS
18779 test -z "$as_dir" && as_dir=.
18780 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000018781 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 +000018782 ac_cv_prog_TRUE="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018783 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018784 break 2
18785 fi
18786done
18787done
Martin v. Löwiseba40652007-08-30 20:10:57 +000018788IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018789
18790fi
18791fi
18792TRUE=$ac_cv_prog_TRUE
18793if test -n "$TRUE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018794 { echo "$as_me:$LINENO: result: $TRUE" >&5
18795echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018796else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018797 { echo "$as_me:$LINENO: result: no" >&5
18798echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018799fi
18800
Martin v. Löwiseba40652007-08-30 20:10:57 +000018801
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018802 test -n "$TRUE" && break
18803done
18804test -n "$TRUE" || TRUE="/bin/true"
18805
18806
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018807{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18808echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018809if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018810 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018811else
18812 ac_check_lib_save_LIBS=$LIBS
18813LIBS="-lc $LIBS"
18814cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018815/* confdefs.h. */
18816_ACEOF
18817cat confdefs.h >>conftest.$ac_ext
18818cat >>conftest.$ac_ext <<_ACEOF
18819/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018820
Martin v. Löwiseba40652007-08-30 20:10:57 +000018821/* Override any GCC internal prototype to avoid an error.
18822 Use char because int might match the return type of a GCC
18823 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018824#ifdef __cplusplus
18825extern "C"
18826#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018827char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018828int
18829main ()
18830{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018831return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018832 ;
18833 return 0;
18834}
18835_ACEOF
18836rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018837if { (ac_try="$ac_link"
18838case "(($ac_try" in
18839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18840 *) ac_try_echo=$ac_try;;
18841esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018843 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018844 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018845 grep -v '^ *+' conftest.er1 >conftest.err
18846 rm -f conftest.er1
18847 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018849 (exit $ac_status); } && {
18850 test -z "$ac_c_werror_flag" ||
18851 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018852 } && test -s conftest$ac_exeext &&
18853 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018854 ac_cv_lib_c_inet_aton=yes
18855else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018856 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018857sed 's/^/| /' conftest.$ac_ext >&5
18858
Martin v. Löwiseba40652007-08-30 20:10:57 +000018859 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018860fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018861
18862rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018863 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018864LIBS=$ac_check_lib_save_LIBS
18865fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018866{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18867echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18868if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018869 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018870else
18871
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018872{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18873echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018874if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018875 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018876else
18877 ac_check_lib_save_LIBS=$LIBS
18878LIBS="-lresolv $LIBS"
18879cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018880/* confdefs.h. */
18881_ACEOF
18882cat confdefs.h >>conftest.$ac_ext
18883cat >>conftest.$ac_ext <<_ACEOF
18884/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018885
Martin v. Löwiseba40652007-08-30 20:10:57 +000018886/* Override any GCC internal prototype to avoid an error.
18887 Use char because int might match the return type of a GCC
18888 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018889#ifdef __cplusplus
18890extern "C"
18891#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018892char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018893int
18894main ()
18895{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018896return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018897 ;
18898 return 0;
18899}
18900_ACEOF
18901rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018902if { (ac_try="$ac_link"
18903case "(($ac_try" in
18904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18905 *) ac_try_echo=$ac_try;;
18906esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018908 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018909 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018910 grep -v '^ *+' conftest.er1 >conftest.err
18911 rm -f conftest.er1
18912 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018914 (exit $ac_status); } && {
18915 test -z "$ac_c_werror_flag" ||
18916 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018917 } && test -s conftest$ac_exeext &&
18918 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018919 ac_cv_lib_resolv_inet_aton=yes
18920else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018921 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018922sed 's/^/| /' conftest.$ac_ext >&5
18923
Martin v. Löwiseba40652007-08-30 20:10:57 +000018924 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018925fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018926
18927rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018928 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018929LIBS=$ac_check_lib_save_LIBS
18930fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018931{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18932echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18933if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018934 cat >>confdefs.h <<_ACEOF
18935#define HAVE_LIBRESOLV 1
18936_ACEOF
18937
18938 LIBS="-lresolv $LIBS"
18939
18940fi
18941
18942
18943fi
18944
18945
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018946# On Tru64, chflags seems to be present, but calling it will
18947# exit Python
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018948{ echo "$as_me:$LINENO: checking for chflags" >&5
18949echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018950if test "${ac_cv_have_chflags+set}" = set; then
18951 echo $ECHO_N "(cached) $ECHO_C" >&6
18952else
18953 if test "$cross_compiling" = yes; then
Gregory P. Smith49437c22009-11-02 01:38:35 +000018954 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018955else
18956 cat >conftest.$ac_ext <<_ACEOF
18957/* confdefs.h. */
18958_ACEOF
18959cat confdefs.h >>conftest.$ac_ext
18960cat >>conftest.$ac_ext <<_ACEOF
18961/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000018962[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018963#include <sys/stat.h>
18964#include <unistd.h>
18965int main(int argc, char*argv[])
18966{
18967 if(chflags(argv[0], 0) != 0)
18968 return 1;
18969 return 0;
18970}
Gregory P. Smith49437c22009-11-02 01:38:35 +000018971]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018972_ACEOF
18973rm -f conftest$ac_exeext
18974if { (ac_try="$ac_link"
18975case "(($ac_try" in
18976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18977 *) ac_try_echo=$ac_try;;
18978esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018980 (eval "$ac_link") 2>&5
18981 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018983 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18984 { (case "(($ac_try" in
18985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18986 *) ac_try_echo=$ac_try;;
18987esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018989 (eval "$ac_try") 2>&5
18990 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018992 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018993 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018994else
18995 echo "$as_me: program exited with status $ac_status" >&5
18996echo "$as_me: failed program was:" >&5
18997sed 's/^/| /' conftest.$ac_ext >&5
18998
18999( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019000ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019001fi
19002rm -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 +000019003fi
19004
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019005
19006
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019007fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019008{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
19009echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000019010if test "$ac_cv_have_chflags" = cross ; then
19011 { echo "$as_me:$LINENO: checking for chflags" >&5
19012echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
19013if test "${ac_cv_func_chflags+set}" = set; then
19014 echo $ECHO_N "(cached) $ECHO_C" >&6
19015else
19016 cat >conftest.$ac_ext <<_ACEOF
19017/* confdefs.h. */
19018_ACEOF
19019cat confdefs.h >>conftest.$ac_ext
19020cat >>conftest.$ac_ext <<_ACEOF
19021/* end confdefs.h. */
19022/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
19023 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19024#define chflags innocuous_chflags
19025
19026/* System header to define __stub macros and hopefully few prototypes,
19027 which can conflict with char chflags (); below.
19028 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19029 <limits.h> exists even on freestanding compilers. */
19030
19031#ifdef __STDC__
19032# include <limits.h>
19033#else
19034# include <assert.h>
19035#endif
19036
19037#undef chflags
19038
19039/* Override any GCC internal prototype to avoid an error.
19040 Use char because int might match the return type of a GCC
19041 builtin and then its argument prototype would still apply. */
19042#ifdef __cplusplus
19043extern "C"
19044#endif
19045char chflags ();
19046/* The GNU C library defines this for functions which it implements
19047 to always fail with ENOSYS. Some functions are actually named
19048 something starting with __ and the normal name is an alias. */
19049#if defined __stub_chflags || defined __stub___chflags
19050choke me
19051#endif
19052
19053int
19054main ()
19055{
19056return chflags ();
19057 ;
19058 return 0;
19059}
19060_ACEOF
19061rm -f conftest.$ac_objext conftest$ac_exeext
19062if { (ac_try="$ac_link"
19063case "(($ac_try" in
19064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19065 *) ac_try_echo=$ac_try;;
19066esac
19067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19068 (eval "$ac_link") 2>conftest.er1
19069 ac_status=$?
19070 grep -v '^ *+' conftest.er1 >conftest.err
19071 rm -f conftest.er1
19072 cat conftest.err >&5
19073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19074 (exit $ac_status); } && {
19075 test -z "$ac_c_werror_flag" ||
19076 test ! -s conftest.err
19077 } && test -s conftest$ac_exeext &&
19078 $as_test_x conftest$ac_exeext; then
19079 ac_cv_func_chflags=yes
19080else
19081 echo "$as_me: failed program was:" >&5
19082sed 's/^/| /' conftest.$ac_ext >&5
19083
19084 ac_cv_func_chflags=no
19085fi
19086
19087rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19088 conftest$ac_exeext conftest.$ac_ext
19089fi
19090{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
19091echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
19092if test $ac_cv_func_chflags = yes; then
19093 ac_cv_have_chflags="yes"
19094else
19095 ac_cv_have_chflags="no"
19096fi
19097
19098fi
19099if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019100
19101cat >>confdefs.h <<\_ACEOF
19102#define HAVE_CHFLAGS 1
19103_ACEOF
19104
19105fi
19106
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019107{ echo "$as_me:$LINENO: checking for lchflags" >&5
19108echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019109if test "${ac_cv_have_lchflags+set}" = set; then
19110 echo $ECHO_N "(cached) $ECHO_C" >&6
19111else
19112 if test "$cross_compiling" = yes; then
Gregory P. Smith49437c22009-11-02 01:38:35 +000019113 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019114else
19115 cat >conftest.$ac_ext <<_ACEOF
19116/* confdefs.h. */
19117_ACEOF
19118cat confdefs.h >>conftest.$ac_ext
19119cat >>conftest.$ac_ext <<_ACEOF
19120/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000019121[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019122#include <sys/stat.h>
19123#include <unistd.h>
19124int main(int argc, char*argv[])
19125{
19126 if(lchflags(argv[0], 0) != 0)
19127 return 1;
19128 return 0;
19129}
Gregory P. Smith49437c22009-11-02 01:38:35 +000019130]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019131_ACEOF
19132rm -f conftest$ac_exeext
19133if { (ac_try="$ac_link"
19134case "(($ac_try" in
19135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19136 *) ac_try_echo=$ac_try;;
19137esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019139 (eval "$ac_link") 2>&5
19140 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019142 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19143 { (case "(($ac_try" in
19144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19145 *) ac_try_echo=$ac_try;;
19146esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019148 (eval "$ac_try") 2>&5
19149 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019151 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019152 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019153else
19154 echo "$as_me: program exited with status $ac_status" >&5
19155echo "$as_me: failed program was:" >&5
19156sed 's/^/| /' conftest.$ac_ext >&5
19157
19158( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019159ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019160fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019161rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19162fi
19163
19164
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019165
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019166fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019167{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
19168echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000019169if test "$ac_cv_have_lchflags" = cross ; then
19170 { echo "$as_me:$LINENO: checking for lchflags" >&5
19171echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
19172if test "${ac_cv_func_lchflags+set}" = set; then
19173 echo $ECHO_N "(cached) $ECHO_C" >&6
19174else
19175 cat >conftest.$ac_ext <<_ACEOF
19176/* confdefs.h. */
19177_ACEOF
19178cat confdefs.h >>conftest.$ac_ext
19179cat >>conftest.$ac_ext <<_ACEOF
19180/* end confdefs.h. */
19181/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
19182 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19183#define lchflags innocuous_lchflags
19184
19185/* System header to define __stub macros and hopefully few prototypes,
19186 which can conflict with char lchflags (); below.
19187 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19188 <limits.h> exists even on freestanding compilers. */
19189
19190#ifdef __STDC__
19191# include <limits.h>
19192#else
19193# include <assert.h>
19194#endif
19195
19196#undef lchflags
19197
19198/* Override any GCC internal prototype to avoid an error.
19199 Use char because int might match the return type of a GCC
19200 builtin and then its argument prototype would still apply. */
19201#ifdef __cplusplus
19202extern "C"
19203#endif
19204char lchflags ();
19205/* The GNU C library defines this for functions which it implements
19206 to always fail with ENOSYS. Some functions are actually named
19207 something starting with __ and the normal name is an alias. */
19208#if defined __stub_lchflags || defined __stub___lchflags
19209choke me
19210#endif
19211
19212int
19213main ()
19214{
19215return lchflags ();
19216 ;
19217 return 0;
19218}
19219_ACEOF
19220rm -f conftest.$ac_objext conftest$ac_exeext
19221if { (ac_try="$ac_link"
19222case "(($ac_try" in
19223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19224 *) ac_try_echo=$ac_try;;
19225esac
19226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19227 (eval "$ac_link") 2>conftest.er1
19228 ac_status=$?
19229 grep -v '^ *+' conftest.er1 >conftest.err
19230 rm -f conftest.er1
19231 cat conftest.err >&5
19232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19233 (exit $ac_status); } && {
19234 test -z "$ac_c_werror_flag" ||
19235 test ! -s conftest.err
19236 } && test -s conftest$ac_exeext &&
19237 $as_test_x conftest$ac_exeext; then
19238 ac_cv_func_lchflags=yes
19239else
19240 echo "$as_me: failed program was:" >&5
19241sed 's/^/| /' conftest.$ac_ext >&5
19242
19243 ac_cv_func_lchflags=no
19244fi
19245
19246rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19247 conftest$ac_exeext conftest.$ac_ext
19248fi
19249{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
19250echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
19251if test $ac_cv_func_lchflags = yes; then
19252 ac_cv_have_lchflags="yes"
19253else
19254 ac_cv_have_lchflags="no"
19255fi
19256
19257fi
19258if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019259
19260cat >>confdefs.h <<\_ACEOF
19261#define HAVE_LCHFLAGS 1
19262_ACEOF
19263
19264fi
19265
Ronald Oussorenf8752642006-07-06 10:13:35 +000019266case $ac_sys_system/$ac_sys_release in
19267Darwin/*)
19268 _CUR_CFLAGS="${CFLAGS}"
19269 _CUR_LDFLAGS="${LDFLAGS}"
19270 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
19271 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
19272 ;;
19273esac
19274
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019275{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
19276echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019277if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019278 echo $ECHO_N "(cached) $ECHO_C" >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019279else
19280 ac_check_lib_save_LIBS=$LIBS
19281LIBS="-lz $LIBS"
19282cat >conftest.$ac_ext <<_ACEOF
19283/* confdefs.h. */
19284_ACEOF
19285cat confdefs.h >>conftest.$ac_ext
19286cat >>conftest.$ac_ext <<_ACEOF
19287/* end confdefs.h. */
19288
Martin v. Löwiseba40652007-08-30 20:10:57 +000019289/* Override any GCC internal prototype to avoid an error.
19290 Use char because int might match the return type of a GCC
19291 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019292#ifdef __cplusplus
19293extern "C"
19294#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019295char inflateCopy ();
19296int
19297main ()
19298{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019299return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019300 ;
19301 return 0;
19302}
19303_ACEOF
19304rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019305if { (ac_try="$ac_link"
19306case "(($ac_try" in
19307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19308 *) ac_try_echo=$ac_try;;
19309esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019310eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019311 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019312 ac_status=$?
19313 grep -v '^ *+' conftest.er1 >conftest.err
19314 rm -f conftest.er1
19315 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019317 (exit $ac_status); } && {
19318 test -z "$ac_c_werror_flag" ||
19319 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019320 } && test -s conftest$ac_exeext &&
19321 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019322 ac_cv_lib_z_inflateCopy=yes
19323else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019324 echo "$as_me: failed program was:" >&5
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019325sed 's/^/| /' conftest.$ac_ext >&5
19326
Martin v. Löwiseba40652007-08-30 20:10:57 +000019327 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019328fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019329
19330rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019331 conftest$ac_exeext conftest.$ac_ext
19332LIBS=$ac_check_lib_save_LIBS
19333fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019334{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
19335echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
19336if test $ac_cv_lib_z_inflateCopy = yes; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019337
19338cat >>confdefs.h <<\_ACEOF
19339#define HAVE_ZLIB_COPY 1
19340_ACEOF
19341
19342fi
19343
19344
Ronald Oussorenf8752642006-07-06 10:13:35 +000019345case $ac_sys_system/$ac_sys_release in
19346Darwin/*)
19347 CFLAGS="${_CUR_CFLAGS}"
19348 LDFLAGS="${_CUR_LDFLAGS}"
19349 ;;
19350esac
19351
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019352{ echo "$as_me:$LINENO: checking for hstrerror" >&5
19353echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019354cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019355/* confdefs.h. */
19356_ACEOF
19357cat confdefs.h >>conftest.$ac_ext
19358cat >>conftest.$ac_ext <<_ACEOF
19359/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019360
19361#include "confdefs.h"
19362#include <netdb.h>
19363
Martin v. Löwise9416172003-05-03 10:12:45 +000019364int
19365main ()
19366{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019367void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019368 ;
19369 return 0;
19370}
19371_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019372rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019373if { (ac_try="$ac_link"
19374case "(($ac_try" in
19375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19376 *) ac_try_echo=$ac_try;;
19377esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019379 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019380 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019381 grep -v '^ *+' conftest.er1 >conftest.err
19382 rm -f conftest.er1
19383 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019385 (exit $ac_status); } && {
19386 test -z "$ac_c_werror_flag" ||
19387 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019388 } && test -s conftest$ac_exeext &&
19389 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019390
19391cat >>confdefs.h <<\_ACEOF
19392#define HAVE_HSTRERROR 1
19393_ACEOF
19394
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019395 { echo "$as_me:$LINENO: result: yes" >&5
19396echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019397else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019398 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019399sed 's/^/| /' conftest.$ac_ext >&5
19400
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019401 { echo "$as_me:$LINENO: result: no" >&5
19402echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019403
19404fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019405
19406rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019407 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019408
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019409{ echo "$as_me:$LINENO: checking for inet_aton" >&5
19410echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019411cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019412/* confdefs.h. */
19413_ACEOF
19414cat confdefs.h >>conftest.$ac_ext
19415cat >>conftest.$ac_ext <<_ACEOF
19416/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019417
19418#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000019419#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019420#include <sys/socket.h>
19421#include <netinet/in.h>
19422#include <arpa/inet.h>
19423
Martin v. Löwise9416172003-05-03 10:12:45 +000019424int
19425main ()
19426{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019427void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019428 ;
19429 return 0;
19430}
19431_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019432rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019433if { (ac_try="$ac_link"
19434case "(($ac_try" in
19435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19436 *) ac_try_echo=$ac_try;;
19437esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019438eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019439 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019440 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019441 grep -v '^ *+' conftest.er1 >conftest.err
19442 rm -f conftest.er1
19443 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019445 (exit $ac_status); } && {
19446 test -z "$ac_c_werror_flag" ||
19447 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019448 } && test -s conftest$ac_exeext &&
19449 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019450
19451cat >>confdefs.h <<\_ACEOF
19452#define HAVE_INET_ATON 1
19453_ACEOF
19454
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019455 { echo "$as_me:$LINENO: result: yes" >&5
19456echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019457else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019458 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019459sed 's/^/| /' conftest.$ac_ext >&5
19460
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019461 { echo "$as_me:$LINENO: result: no" >&5
19462echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019463
19464fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019465
19466rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019467 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019468
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019469{ echo "$as_me:$LINENO: checking for inet_pton" >&5
19470echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019471cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019472/* confdefs.h. */
19473_ACEOF
19474cat confdefs.h >>conftest.$ac_ext
19475cat >>conftest.$ac_ext <<_ACEOF
19476/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019477
19478#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019479#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019480#include <sys/socket.h>
19481#include <netinet/in.h>
19482#include <arpa/inet.h>
19483
Martin v. Löwise9416172003-05-03 10:12:45 +000019484int
19485main ()
19486{
19487void* p = inet_pton
19488 ;
19489 return 0;
19490}
19491_ACEOF
19492rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019493if { (ac_try="$ac_compile"
19494case "(($ac_try" in
19495 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19496 *) ac_try_echo=$ac_try;;
19497esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019498eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019499 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019500 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019501 grep -v '^ *+' conftest.er1 >conftest.err
19502 rm -f conftest.er1
19503 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019505 (exit $ac_status); } && {
19506 test -z "$ac_c_werror_flag" ||
19507 test ! -s conftest.err
19508 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019509
19510cat >>confdefs.h <<\_ACEOF
19511#define HAVE_INET_PTON 1
19512_ACEOF
19513
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019514 { echo "$as_me:$LINENO: result: yes" >&5
19515echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019516else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019517 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019518sed 's/^/| /' conftest.$ac_ext >&5
19519
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019520 { echo "$as_me:$LINENO: result: no" >&5
19521echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019522
19523fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019524
19525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019526
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019527# On some systems, setgroups is in unistd.h, on others, in grp.h
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019528{ echo "$as_me:$LINENO: checking for setgroups" >&5
19529echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019530cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019531/* confdefs.h. */
19532_ACEOF
19533cat confdefs.h >>conftest.$ac_ext
19534cat >>conftest.$ac_ext <<_ACEOF
19535/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019536
19537#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019538#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019539#ifdef HAVE_GRP_H
19540#include <grp.h>
19541#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019542
Martin v. Löwisd5843682002-11-21 20:41:28 +000019543int
19544main ()
19545{
19546void* p = setgroups
19547 ;
19548 return 0;
19549}
19550_ACEOF
19551rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019552if { (ac_try="$ac_compile"
19553case "(($ac_try" in
19554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19555 *) ac_try_echo=$ac_try;;
19556esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019558 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019559 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019560 grep -v '^ *+' conftest.er1 >conftest.err
19561 rm -f conftest.er1
19562 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019564 (exit $ac_status); } && {
19565 test -z "$ac_c_werror_flag" ||
19566 test ! -s conftest.err
19567 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019568
19569cat >>confdefs.h <<\_ACEOF
19570#define HAVE_SETGROUPS 1
19571_ACEOF
19572
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019573 { echo "$as_me:$LINENO: result: yes" >&5
19574echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019575else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019576 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019577sed 's/^/| /' conftest.$ac_ext >&5
19578
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019579 { echo "$as_me:$LINENO: result: no" >&5
19580echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019581
19582fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019583
19584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019585
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019586# check for openpty and forkpty
19587
Martin v. Löwis11437992002-04-12 09:54:03 +000019588
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019589for ac_func in openpty
19590do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019591as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19592{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19593echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019594if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019595 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019596else
Martin v. Löwis11437992002-04-12 09:54:03 +000019597 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019598/* confdefs.h. */
19599_ACEOF
19600cat confdefs.h >>conftest.$ac_ext
19601cat >>conftest.$ac_ext <<_ACEOF
19602/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019603/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19604 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19605#define $ac_func innocuous_$ac_func
19606
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019607/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019608 which can conflict with char $ac_func (); below.
19609 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019610 <limits.h> exists even on freestanding compilers. */
19611
19612#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019613# include <limits.h>
19614#else
19615# include <assert.h>
19616#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019617
19618#undef $ac_func
19619
Martin v. Löwiseba40652007-08-30 20:10:57 +000019620/* Override any GCC internal prototype to avoid an error.
19621 Use char because int might match the return type of a GCC
19622 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019623#ifdef __cplusplus
19624extern "C"
19625#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019626char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019627/* The GNU C library defines this for functions which it implements
19628 to always fail with ENOSYS. Some functions are actually named
19629 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019630#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019631choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019632#endif
19633
Skip Montanaro6dead952003-09-25 14:50:04 +000019634int
19635main ()
19636{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019637return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019638 ;
19639 return 0;
19640}
19641_ACEOF
19642rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019643if { (ac_try="$ac_link"
19644case "(($ac_try" in
19645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19646 *) ac_try_echo=$ac_try;;
19647esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019649 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019650 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019651 grep -v '^ *+' conftest.er1 >conftest.err
19652 rm -f conftest.er1
19653 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019655 (exit $ac_status); } && {
19656 test -z "$ac_c_werror_flag" ||
19657 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019658 } && test -s conftest$ac_exeext &&
19659 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019660 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019661else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019662 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019663sed 's/^/| /' conftest.$ac_ext >&5
19664
Martin v. Löwiseba40652007-08-30 20:10:57 +000019665 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019666fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019667
19668rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019669 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019670fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019671ac_res=`eval echo '${'$as_ac_var'}'`
19672 { echo "$as_me:$LINENO: result: $ac_res" >&5
19673echo "${ECHO_T}$ac_res" >&6; }
19674if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019675 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019676#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019677_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019678
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019679else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019680 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19681echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019682if test "${ac_cv_lib_util_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019683 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019684else
Martin v. Löwis11437992002-04-12 09:54:03 +000019685 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019686LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019687cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019688/* confdefs.h. */
19689_ACEOF
19690cat confdefs.h >>conftest.$ac_ext
19691cat >>conftest.$ac_ext <<_ACEOF
19692/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019693
Martin v. Löwiseba40652007-08-30 20:10:57 +000019694/* Override any GCC internal prototype to avoid an error.
19695 Use char because int might match the return type of a GCC
19696 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019697#ifdef __cplusplus
19698extern "C"
19699#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019700char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019701int
19702main ()
19703{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019704return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019705 ;
19706 return 0;
19707}
19708_ACEOF
19709rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019710if { (ac_try="$ac_link"
19711case "(($ac_try" in
19712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19713 *) ac_try_echo=$ac_try;;
19714esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019716 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019717 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019718 grep -v '^ *+' conftest.er1 >conftest.err
19719 rm -f conftest.er1
19720 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019722 (exit $ac_status); } && {
19723 test -z "$ac_c_werror_flag" ||
19724 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019725 } && test -s conftest$ac_exeext &&
19726 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019727 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019728else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019729 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019730sed 's/^/| /' conftest.$ac_ext >&5
19731
Martin v. Löwiseba40652007-08-30 20:10:57 +000019732 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019733fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019734
19735rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019736 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019737LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019738fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019739{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19740echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19741if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019742 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019743#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019744_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019745 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019746else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019747 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19748echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019749if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019750 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019751else
19752 ac_check_lib_save_LIBS=$LIBS
19753LIBS="-lbsd $LIBS"
19754cat >conftest.$ac_ext <<_ACEOF
19755/* confdefs.h. */
19756_ACEOF
19757cat confdefs.h >>conftest.$ac_ext
19758cat >>conftest.$ac_ext <<_ACEOF
19759/* end confdefs.h. */
19760
Martin v. Löwiseba40652007-08-30 20:10:57 +000019761/* Override any GCC internal prototype to avoid an error.
19762 Use char because int might match the return type of a GCC
19763 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019764#ifdef __cplusplus
19765extern "C"
19766#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019767char openpty ();
19768int
19769main ()
19770{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019771return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019772 ;
19773 return 0;
19774}
19775_ACEOF
19776rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019777if { (ac_try="$ac_link"
19778case "(($ac_try" in
19779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19780 *) ac_try_echo=$ac_try;;
19781esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019783 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019784 ac_status=$?
19785 grep -v '^ *+' conftest.er1 >conftest.err
19786 rm -f conftest.er1
19787 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019789 (exit $ac_status); } && {
19790 test -z "$ac_c_werror_flag" ||
19791 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019792 } && test -s conftest$ac_exeext &&
19793 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019794 ac_cv_lib_bsd_openpty=yes
19795else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019796 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019797sed 's/^/| /' conftest.$ac_ext >&5
19798
Martin v. Löwiseba40652007-08-30 20:10:57 +000019799 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019800fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019801
19802rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019803 conftest$ac_exeext conftest.$ac_ext
19804LIBS=$ac_check_lib_save_LIBS
19805fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019806{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19807echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
19808if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019809 cat >>confdefs.h <<\_ACEOF
19810#define HAVE_OPENPTY 1
19811_ACEOF
19812 LIBS="$LIBS -lbsd"
19813fi
19814
19815
19816fi
19817
Fred Drake8cef4cf2000-06-28 16:40:38 +000019818
19819fi
19820done
19821
Martin v. Löwis11437992002-04-12 09:54:03 +000019822
Fred Drake8cef4cf2000-06-28 16:40:38 +000019823for ac_func in forkpty
19824do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019825as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19826{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19827echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019828if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019829 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019830else
Martin v. Löwis11437992002-04-12 09:54:03 +000019831 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019832/* confdefs.h. */
19833_ACEOF
19834cat confdefs.h >>conftest.$ac_ext
19835cat >>conftest.$ac_ext <<_ACEOF
19836/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019837/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19838 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19839#define $ac_func innocuous_$ac_func
19840
Fred Drake8cef4cf2000-06-28 16:40:38 +000019841/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019842 which can conflict with char $ac_func (); below.
19843 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019844 <limits.h> exists even on freestanding compilers. */
19845
19846#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019847# include <limits.h>
19848#else
19849# include <assert.h>
19850#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019851
19852#undef $ac_func
19853
Martin v. Löwiseba40652007-08-30 20:10:57 +000019854/* Override any GCC internal prototype to avoid an error.
19855 Use char because int might match the return type of a GCC
19856 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019857#ifdef __cplusplus
19858extern "C"
19859#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019860char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019861/* The GNU C library defines this for functions which it implements
19862 to always fail with ENOSYS. Some functions are actually named
19863 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019864#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019865choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019866#endif
19867
Skip Montanaro6dead952003-09-25 14:50:04 +000019868int
19869main ()
19870{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019871return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019872 ;
19873 return 0;
19874}
19875_ACEOF
19876rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019877if { (ac_try="$ac_link"
19878case "(($ac_try" in
19879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19880 *) ac_try_echo=$ac_try;;
19881esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019883 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019884 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019885 grep -v '^ *+' conftest.er1 >conftest.err
19886 rm -f conftest.er1
19887 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019889 (exit $ac_status); } && {
19890 test -z "$ac_c_werror_flag" ||
19891 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019892 } && test -s conftest$ac_exeext &&
19893 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019894 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019895else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019896 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019897sed 's/^/| /' conftest.$ac_ext >&5
19898
Martin v. Löwiseba40652007-08-30 20:10:57 +000019899 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019900fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019901
19902rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019903 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019904fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019905ac_res=`eval echo '${'$as_ac_var'}'`
19906 { echo "$as_me:$LINENO: result: $ac_res" >&5
19907echo "${ECHO_T}$ac_res" >&6; }
19908if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019909 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019910#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019911_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019912
Fred Drake8cef4cf2000-06-28 16:40:38 +000019913else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019914 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19915echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019916if test "${ac_cv_lib_util_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019917 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019918else
Martin v. Löwis11437992002-04-12 09:54:03 +000019919 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019920LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019921cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019922/* confdefs.h. */
19923_ACEOF
19924cat confdefs.h >>conftest.$ac_ext
19925cat >>conftest.$ac_ext <<_ACEOF
19926/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019927
Martin v. Löwiseba40652007-08-30 20:10:57 +000019928/* Override any GCC internal prototype to avoid an error.
19929 Use char because int might match the return type of a GCC
19930 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019931#ifdef __cplusplus
19932extern "C"
19933#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019934char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019935int
19936main ()
19937{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019938return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019939 ;
19940 return 0;
19941}
19942_ACEOF
19943rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019944if { (ac_try="$ac_link"
19945case "(($ac_try" in
19946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19947 *) ac_try_echo=$ac_try;;
19948esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019950 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019951 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019952 grep -v '^ *+' conftest.er1 >conftest.err
19953 rm -f conftest.er1
19954 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019956 (exit $ac_status); } && {
19957 test -z "$ac_c_werror_flag" ||
19958 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019959 } && test -s conftest$ac_exeext &&
19960 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019961 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019962else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019963 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019964sed 's/^/| /' conftest.$ac_ext >&5
19965
Martin v. Löwiseba40652007-08-30 20:10:57 +000019966 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019967fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019968
19969rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019970 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019971LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019972fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019973{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19974echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19975if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019976 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019977#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019978_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019979 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019980else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019981 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19982echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019983if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019984 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019985else
19986 ac_check_lib_save_LIBS=$LIBS
19987LIBS="-lbsd $LIBS"
19988cat >conftest.$ac_ext <<_ACEOF
19989/* confdefs.h. */
19990_ACEOF
19991cat confdefs.h >>conftest.$ac_ext
19992cat >>conftest.$ac_ext <<_ACEOF
19993/* end confdefs.h. */
19994
Martin v. Löwiseba40652007-08-30 20:10:57 +000019995/* Override any GCC internal prototype to avoid an error.
19996 Use char because int might match the return type of a GCC
19997 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019998#ifdef __cplusplus
19999extern "C"
20000#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020001char forkpty ();
20002int
20003main ()
20004{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020005return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020006 ;
20007 return 0;
20008}
20009_ACEOF
20010rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020011if { (ac_try="$ac_link"
20012case "(($ac_try" in
20013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20014 *) ac_try_echo=$ac_try;;
20015esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020017 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020018 ac_status=$?
20019 grep -v '^ *+' conftest.er1 >conftest.err
20020 rm -f conftest.er1
20021 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020023 (exit $ac_status); } && {
20024 test -z "$ac_c_werror_flag" ||
20025 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020026 } && test -s conftest$ac_exeext &&
20027 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020028 ac_cv_lib_bsd_forkpty=yes
20029else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020030 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020031sed 's/^/| /' conftest.$ac_ext >&5
20032
Martin v. Löwiseba40652007-08-30 20:10:57 +000020033 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020034fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020035
20036rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020037 conftest$ac_exeext conftest.$ac_ext
20038LIBS=$ac_check_lib_save_LIBS
20039fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020040{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
20041echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
20042if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020043 cat >>confdefs.h <<\_ACEOF
20044#define HAVE_FORKPTY 1
20045_ACEOF
20046 LIBS="$LIBS -lbsd"
20047fi
20048
20049
20050fi
20051
Fred Drake8cef4cf2000-06-28 16:40:38 +000020052
20053fi
20054done
20055
Jack Jansendd19cf82001-12-06 22:36:17 +000020056
Brett Cannonaa5778d2008-03-18 04:09:00 +000020057# Stuff for expat.
20058
20059for ac_func in memmove
20060do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020061as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20062{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20063echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Brett Cannonaa5778d2008-03-18 04:09:00 +000020064if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020065 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannonaa5778d2008-03-18 04:09:00 +000020066else
20067 cat >conftest.$ac_ext <<_ACEOF
20068/* confdefs.h. */
20069_ACEOF
20070cat confdefs.h >>conftest.$ac_ext
20071cat >>conftest.$ac_ext <<_ACEOF
20072/* end confdefs.h. */
20073/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20074 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20075#define $ac_func innocuous_$ac_func
20076
20077/* System header to define __stub macros and hopefully few prototypes,
20078 which can conflict with char $ac_func (); below.
20079 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20080 <limits.h> exists even on freestanding compilers. */
20081
20082#ifdef __STDC__
20083# include <limits.h>
20084#else
20085# include <assert.h>
20086#endif
20087
20088#undef $ac_func
20089
20090/* Override any GCC internal prototype to avoid an error.
20091 Use char because int might match the return type of a GCC
20092 builtin and then its argument prototype would still apply. */
20093#ifdef __cplusplus
20094extern "C"
20095#endif
20096char $ac_func ();
20097/* The GNU C library defines this for functions which it implements
20098 to always fail with ENOSYS. Some functions are actually named
20099 something starting with __ and the normal name is an alias. */
20100#if defined __stub_$ac_func || defined __stub___$ac_func
20101choke me
20102#endif
20103
20104int
20105main ()
20106{
20107return $ac_func ();
20108 ;
20109 return 0;
20110}
20111_ACEOF
20112rm -f conftest.$ac_objext conftest$ac_exeext
20113if { (ac_try="$ac_link"
20114case "(($ac_try" in
20115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20116 *) ac_try_echo=$ac_try;;
20117esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020119 (eval "$ac_link") 2>conftest.er1
20120 ac_status=$?
20121 grep -v '^ *+' conftest.er1 >conftest.err
20122 rm -f conftest.er1
20123 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020125 (exit $ac_status); } && {
20126 test -z "$ac_c_werror_flag" ||
20127 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020128 } && test -s conftest$ac_exeext &&
20129 $as_test_x conftest$ac_exeext; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000020130 eval "$as_ac_var=yes"
20131else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020132 echo "$as_me: failed program was:" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020133sed 's/^/| /' conftest.$ac_ext >&5
20134
20135 eval "$as_ac_var=no"
20136fi
20137
20138rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20139 conftest$ac_exeext conftest.$ac_ext
20140fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020141ac_res=`eval echo '${'$as_ac_var'}'`
20142 { echo "$as_me:$LINENO: result: $ac_res" >&5
20143echo "${ECHO_T}$ac_res" >&6; }
20144if test `eval echo '${'$as_ac_var'}'` = yes; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000020145 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020146#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000020147_ACEOF
20148
20149fi
20150done
20151
20152
Michael W. Hudson54241132001-12-07 15:38:26 +000020153# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000020154
20155
20156
20157
20158
20159
Fred Drake8cef4cf2000-06-28 16:40:38 +000020160for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
20161do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020162as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20163{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20164echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020165if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020166 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020167else
Martin v. Löwis11437992002-04-12 09:54:03 +000020168 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020169/* confdefs.h. */
20170_ACEOF
20171cat confdefs.h >>conftest.$ac_ext
20172cat >>conftest.$ac_ext <<_ACEOF
20173/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020174/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20175 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20176#define $ac_func innocuous_$ac_func
20177
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020178/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020179 which can conflict with char $ac_func (); below.
20180 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020181 <limits.h> exists even on freestanding compilers. */
20182
20183#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020184# include <limits.h>
20185#else
20186# include <assert.h>
20187#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020188
20189#undef $ac_func
20190
Martin v. Löwiseba40652007-08-30 20:10:57 +000020191/* Override any GCC internal prototype to avoid an error.
20192 Use char because int might match the return type of a GCC
20193 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020194#ifdef __cplusplus
20195extern "C"
20196#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020197char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020198/* The GNU C library defines this for functions which it implements
20199 to always fail with ENOSYS. Some functions are actually named
20200 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020201#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020202choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020203#endif
20204
Skip Montanaro6dead952003-09-25 14:50:04 +000020205int
20206main ()
20207{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020208return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020209 ;
20210 return 0;
20211}
20212_ACEOF
20213rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020214if { (ac_try="$ac_link"
20215case "(($ac_try" in
20216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20217 *) ac_try_echo=$ac_try;;
20218esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020219eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020220 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020221 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020222 grep -v '^ *+' conftest.er1 >conftest.err
20223 rm -f conftest.er1
20224 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020226 (exit $ac_status); } && {
20227 test -z "$ac_c_werror_flag" ||
20228 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020229 } && test -s conftest$ac_exeext &&
20230 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020231 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020232else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020233 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020234sed 's/^/| /' conftest.$ac_ext >&5
20235
Martin v. Löwiseba40652007-08-30 20:10:57 +000020236 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020237fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020238
20239rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020240 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020241fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020242ac_res=`eval echo '${'$as_ac_var'}'`
20243 { echo "$as_me:$LINENO: result: $ac_res" >&5
20244echo "${ECHO_T}$ac_res" >&6; }
20245if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020246 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020247#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020248_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000020249
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020250fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000020251done
20252
Michael W. Hudson54241132001-12-07 15:38:26 +000020253
Martin v. Löwis11437992002-04-12 09:54:03 +000020254
20255
20256
Brett Cannonaa5778d2008-03-18 04:09:00 +000020257for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000020258do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020259as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20260{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20261echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020262if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020263 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020264else
Martin v. Löwis11437992002-04-12 09:54:03 +000020265 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020266/* confdefs.h. */
20267_ACEOF
20268cat confdefs.h >>conftest.$ac_ext
20269cat >>conftest.$ac_ext <<_ACEOF
20270/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020271/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20272 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20273#define $ac_func innocuous_$ac_func
20274
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020275/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020276 which can conflict with char $ac_func (); below.
20277 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020278 <limits.h> exists even on freestanding compilers. */
20279
20280#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020281# include <limits.h>
20282#else
20283# include <assert.h>
20284#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020285
20286#undef $ac_func
20287
Martin v. Löwiseba40652007-08-30 20:10:57 +000020288/* Override any GCC internal prototype to avoid an error.
20289 Use char because int might match the return type of a GCC
20290 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020291#ifdef __cplusplus
20292extern "C"
20293#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020294char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000020295/* The GNU C library defines this for functions which it implements
20296 to always fail with ENOSYS. Some functions are actually named
20297 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020298#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000020299choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000020300#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020301
Skip Montanaro6dead952003-09-25 14:50:04 +000020302int
20303main ()
20304{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020305return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020306 ;
20307 return 0;
20308}
20309_ACEOF
20310rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020311if { (ac_try="$ac_link"
20312case "(($ac_try" in
20313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20314 *) ac_try_echo=$ac_try;;
20315esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020317 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020318 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020319 grep -v '^ *+' conftest.er1 >conftest.err
20320 rm -f conftest.er1
20321 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020323 (exit $ac_status); } && {
20324 test -z "$ac_c_werror_flag" ||
20325 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020326 } && test -s conftest$ac_exeext &&
20327 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020328 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020329else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020330 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020331sed 's/^/| /' conftest.$ac_ext >&5
20332
Martin v. Löwiseba40652007-08-30 20:10:57 +000020333 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020334fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020335
20336rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020337 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000020338fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020339ac_res=`eval echo '${'$as_ac_var'}'`
20340 { echo "$as_me:$LINENO: result: $ac_res" >&5
20341echo "${ECHO_T}$ac_res" >&6; }
20342if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020343 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020344#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020345_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000020346
Martin v. Löwis1142de32002-03-29 16:28:31 +000020347else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020348 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020349 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020350 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20351 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020352esac
20353
Martin v. Löwis1142de32002-03-29 16:28:31 +000020354fi
20355done
20356
20357
Martin v. Löwis11437992002-04-12 09:54:03 +000020358
Martin v. Löwis1142de32002-03-29 16:28:31 +000020359for ac_func in getpgrp
20360do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020361as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20362{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20363echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020364if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020365 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000020366else
Martin v. Löwis11437992002-04-12 09:54:03 +000020367 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020368/* confdefs.h. */
20369_ACEOF
20370cat confdefs.h >>conftest.$ac_ext
20371cat >>conftest.$ac_ext <<_ACEOF
20372/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020373/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20374 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20375#define $ac_func innocuous_$ac_func
20376
Martin v. Löwis1142de32002-03-29 16:28:31 +000020377/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020378 which can conflict with char $ac_func (); below.
20379 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020380 <limits.h> exists even on freestanding compilers. */
20381
20382#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020383# include <limits.h>
20384#else
20385# include <assert.h>
20386#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020387
20388#undef $ac_func
20389
Martin v. Löwiseba40652007-08-30 20:10:57 +000020390/* Override any GCC internal prototype to avoid an error.
20391 Use char because int might match the return type of a GCC
20392 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020393#ifdef __cplusplus
20394extern "C"
20395#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020396char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000020397/* The GNU C library defines this for functions which it implements
20398 to always fail with ENOSYS. Some functions are actually named
20399 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020400#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000020401choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000020402#endif
20403
Skip Montanaro6dead952003-09-25 14:50:04 +000020404int
20405main ()
20406{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020407return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020408 ;
20409 return 0;
20410}
20411_ACEOF
20412rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020413if { (ac_try="$ac_link"
20414case "(($ac_try" in
20415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20416 *) ac_try_echo=$ac_try;;
20417esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020419 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020420 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020421 grep -v '^ *+' conftest.er1 >conftest.err
20422 rm -f conftest.er1
20423 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020425 (exit $ac_status); } && {
20426 test -z "$ac_c_werror_flag" ||
20427 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020428 } && test -s conftest$ac_exeext &&
20429 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020430 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020431else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020432 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020433sed 's/^/| /' conftest.$ac_ext >&5
20434
Martin v. Löwiseba40652007-08-30 20:10:57 +000020435 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020436fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020437
20438rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020439 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020440fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020441ac_res=`eval echo '${'$as_ac_var'}'`
20442 { echo "$as_me:$LINENO: result: $ac_res" >&5
20443echo "${ECHO_T}$ac_res" >&6; }
20444if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020445 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020446#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020447_ACEOF
20448 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020449/* confdefs.h. */
20450_ACEOF
20451cat confdefs.h >>conftest.$ac_ext
20452cat >>conftest.$ac_ext <<_ACEOF
20453/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020454#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020455int
20456main ()
20457{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020458getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020459 ;
20460 return 0;
20461}
20462_ACEOF
20463rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020464if { (ac_try="$ac_compile"
20465case "(($ac_try" in
20466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20467 *) ac_try_echo=$ac_try;;
20468esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020470 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020471 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020472 grep -v '^ *+' conftest.er1 >conftest.err
20473 rm -f conftest.er1
20474 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020476 (exit $ac_status); } && {
20477 test -z "$ac_c_werror_flag" ||
20478 test ! -s conftest.err
20479 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020480
20481cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020482#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020483_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020484
Martin v. Löwis11437992002-04-12 09:54:03 +000020485
Guido van Rossumf78abae1997-01-21 22:02:36 +000020486else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020487 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020488sed 's/^/| /' conftest.$ac_ext >&5
20489
Martin v. Löwiseba40652007-08-30 20:10:57 +000020490
Guido van Rossum627b2d71993-12-24 10:39:16 +000020491fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020492
20493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020494
Guido van Rossum627b2d71993-12-24 10:39:16 +000020495fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020496done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020497
Jack Jansen150753c2003-03-29 22:07:47 +000020498
20499for ac_func in setpgrp
20500do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020501as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20502{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20503echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020504if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020505 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020506else
Martin v. Löwis11437992002-04-12 09:54:03 +000020507 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020508/* confdefs.h. */
20509_ACEOF
20510cat confdefs.h >>conftest.$ac_ext
20511cat >>conftest.$ac_ext <<_ACEOF
20512/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020513/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20514 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20515#define $ac_func innocuous_$ac_func
20516
Jack Jansen150753c2003-03-29 22:07:47 +000020517/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020518 which can conflict with char $ac_func (); below.
20519 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020520 <limits.h> exists even on freestanding compilers. */
20521
20522#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020523# include <limits.h>
20524#else
20525# include <assert.h>
20526#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020527
20528#undef $ac_func
20529
Martin v. Löwiseba40652007-08-30 20:10:57 +000020530/* Override any GCC internal prototype to avoid an error.
20531 Use char because int might match the return type of a GCC
20532 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020533#ifdef __cplusplus
20534extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020535#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020536char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020537/* The GNU C library defines this for functions which it implements
20538 to always fail with ENOSYS. Some functions are actually named
20539 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020540#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020541choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020542#endif
20543
Skip Montanaro6dead952003-09-25 14:50:04 +000020544int
20545main ()
20546{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020547return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020548 ;
20549 return 0;
20550}
20551_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020552rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020553if { (ac_try="$ac_link"
20554case "(($ac_try" in
20555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20556 *) ac_try_echo=$ac_try;;
20557esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020559 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020560 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020561 grep -v '^ *+' conftest.er1 >conftest.err
20562 rm -f conftest.er1
20563 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020565 (exit $ac_status); } && {
20566 test -z "$ac_c_werror_flag" ||
20567 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020568 } && test -s conftest$ac_exeext &&
20569 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000020570 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020571else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020572 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020573sed 's/^/| /' conftest.$ac_ext >&5
20574
Martin v. Löwiseba40652007-08-30 20:10:57 +000020575 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020576fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020577
20578rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020579 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020580fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020581ac_res=`eval echo '${'$as_ac_var'}'`
20582 { echo "$as_me:$LINENO: result: $ac_res" >&5
20583echo "${ECHO_T}$ac_res" >&6; }
20584if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020585 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020586#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020587_ACEOF
20588 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020589/* confdefs.h. */
20590_ACEOF
20591cat confdefs.h >>conftest.$ac_ext
20592cat >>conftest.$ac_ext <<_ACEOF
20593/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020594#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020595int
20596main ()
20597{
20598setpgrp(0,0);
20599 ;
20600 return 0;
20601}
20602_ACEOF
20603rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020604if { (ac_try="$ac_compile"
20605case "(($ac_try" in
20606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20607 *) ac_try_echo=$ac_try;;
20608esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020610 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020611 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020612 grep -v '^ *+' conftest.er1 >conftest.err
20613 rm -f conftest.er1
20614 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020616 (exit $ac_status); } && {
20617 test -z "$ac_c_werror_flag" ||
20618 test ! -s conftest.err
20619 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020620
20621cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020622#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020623_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020624
Jack Jansen150753c2003-03-29 22:07:47 +000020625
20626else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020627 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020628sed 's/^/| /' conftest.$ac_ext >&5
20629
Martin v. Löwiseba40652007-08-30 20:10:57 +000020630
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020631fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020632
20633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020634
20635fi
20636done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020637
Martin v. Löwis11437992002-04-12 09:54:03 +000020638
Thomas Wouters3a584202000-08-05 23:28:51 +000020639for ac_func in gettimeofday
20640do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020641as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20642{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20643echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020644if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020645 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020646else
Martin v. Löwis11437992002-04-12 09:54:03 +000020647 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020648/* confdefs.h. */
20649_ACEOF
20650cat confdefs.h >>conftest.$ac_ext
20651cat >>conftest.$ac_ext <<_ACEOF
20652/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020653/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20654 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20655#define $ac_func innocuous_$ac_func
20656
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020657/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020658 which can conflict with char $ac_func (); below.
20659 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020660 <limits.h> exists even on freestanding compilers. */
20661
20662#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020663# include <limits.h>
20664#else
20665# include <assert.h>
20666#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020667
20668#undef $ac_func
20669
Martin v. Löwiseba40652007-08-30 20:10:57 +000020670/* Override any GCC internal prototype to avoid an error.
20671 Use char because int might match the return type of a GCC
20672 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020673#ifdef __cplusplus
20674extern "C"
20675#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020676char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020677/* The GNU C library defines this for functions which it implements
20678 to always fail with ENOSYS. Some functions are actually named
20679 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020680#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020681choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020682#endif
20683
Skip Montanaro6dead952003-09-25 14:50:04 +000020684int
20685main ()
20686{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020687return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020688 ;
20689 return 0;
20690}
20691_ACEOF
20692rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020693if { (ac_try="$ac_link"
20694case "(($ac_try" in
20695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20696 *) ac_try_echo=$ac_try;;
20697esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020699 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020700 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020701 grep -v '^ *+' conftest.er1 >conftest.err
20702 rm -f conftest.er1
20703 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020705 (exit $ac_status); } && {
20706 test -z "$ac_c_werror_flag" ||
20707 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020708 } && test -s conftest$ac_exeext &&
20709 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020710 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020711else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020712 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020713sed 's/^/| /' conftest.$ac_ext >&5
20714
Martin v. Löwiseba40652007-08-30 20:10:57 +000020715 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020716fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020717
20718rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020719 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020720fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020721ac_res=`eval echo '${'$as_ac_var'}'`
20722 { echo "$as_me:$LINENO: result: $ac_res" >&5
20723echo "${ECHO_T}$ac_res" >&6; }
20724if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020725 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020726#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020727_ACEOF
20728 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020729/* confdefs.h. */
20730_ACEOF
20731cat confdefs.h >>conftest.$ac_ext
20732cat >>conftest.$ac_ext <<_ACEOF
20733/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020734#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020735int
20736main ()
20737{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020738gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020739 ;
20740 return 0;
20741}
20742_ACEOF
20743rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020744if { (ac_try="$ac_compile"
20745case "(($ac_try" in
20746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20747 *) ac_try_echo=$ac_try;;
20748esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020749eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020750 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020751 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020752 grep -v '^ *+' conftest.er1 >conftest.err
20753 rm -f conftest.er1
20754 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020756 (exit $ac_status); } && {
20757 test -z "$ac_c_werror_flag" ||
20758 test ! -s conftest.err
20759 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020760 :
20761else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020762 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020763sed 's/^/| /' conftest.$ac_ext >&5
20764
Martin v. Löwis11437992002-04-12 09:54:03 +000020765
20766cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020767#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020768_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020769
Martin v. Löwis11437992002-04-12 09:54:03 +000020770
Guido van Rossum627b2d71993-12-24 10:39:16 +000020771fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020772
20773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020774
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020775fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020776done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020777
Michael W. Hudson54241132001-12-07 15:38:26 +000020778
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020779{ echo "$as_me:$LINENO: checking for major" >&5
20780echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020781cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020782/* confdefs.h. */
20783_ACEOF
20784cat confdefs.h >>conftest.$ac_ext
20785cat >>conftest.$ac_ext <<_ACEOF
20786/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020787
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020788#if defined(MAJOR_IN_MKDEV)
20789#include <sys/mkdev.h>
20790#elif defined(MAJOR_IN_SYSMACROS)
20791#include <sys/sysmacros.h>
20792#else
20793#include <sys/types.h>
20794#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020795
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020796int
20797main ()
20798{
20799
20800 makedev(major(0),minor(0));
20801
20802 ;
20803 return 0;
20804}
20805_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020806rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020807if { (ac_try="$ac_link"
20808case "(($ac_try" in
20809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20810 *) ac_try_echo=$ac_try;;
20811esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020813 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020814 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020815 grep -v '^ *+' conftest.er1 >conftest.err
20816 rm -f conftest.er1
20817 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020819 (exit $ac_status); } && {
20820 test -z "$ac_c_werror_flag" ||
20821 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020822 } && test -s conftest$ac_exeext &&
20823 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020824
20825
20826cat >>confdefs.h <<\_ACEOF
20827#define HAVE_DEVICE_MACROS 1
20828_ACEOF
20829
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020830 { echo "$as_me:$LINENO: result: yes" >&5
20831echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020832
20833else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020834 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020835sed 's/^/| /' conftest.$ac_ext >&5
20836
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020837
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020838 { echo "$as_me:$LINENO: result: no" >&5
20839echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020840
20841fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020842
20843rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020844 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020845
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020846# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020847# for [no]getaddrinfo in netdb.h.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020848{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20849echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020850cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020851/* confdefs.h. */
20852_ACEOF
20853cat confdefs.h >>conftest.$ac_ext
20854cat >>conftest.$ac_ext <<_ACEOF
20855/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020856
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020857#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020858#include <sys/socket.h>
20859#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020860#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020861
Martin v. Löwis11437992002-04-12 09:54:03 +000020862int
20863main ()
20864{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020865getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020866 ;
20867 return 0;
20868}
20869_ACEOF
20870rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020871if { (ac_try="$ac_link"
20872case "(($ac_try" in
20873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20874 *) ac_try_echo=$ac_try;;
20875esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020876eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020877 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020878 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020879 grep -v '^ *+' conftest.er1 >conftest.err
20880 rm -f conftest.er1
20881 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020883 (exit $ac_status); } && {
20884 test -z "$ac_c_werror_flag" ||
20885 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020886 } && test -s conftest$ac_exeext &&
20887 $as_test_x conftest$ac_exeext; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020888 have_getaddrinfo=yes
20889else
20890 echo "$as_me: failed program was:" >&5
20891sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020892
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020893 have_getaddrinfo=no
20894fi
20895
20896rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20897 conftest$ac_exeext conftest.$ac_ext
20898{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20899echo "${ECHO_T}$have_getaddrinfo" >&6; }
20900if test $have_getaddrinfo = yes
20901then
20902 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020903echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020904 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
20905 echo $ECHO_N "(cached) $ECHO_C" >&6
20906else
20907 if test "$cross_compiling" = yes; then
20908 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020909else
Martin v. Löwis11437992002-04-12 09:54:03 +000020910 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020911/* confdefs.h. */
20912_ACEOF
20913cat confdefs.h >>conftest.$ac_ext
20914cat >>conftest.$ac_ext <<_ACEOF
20915/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020916
20917#include <sys/types.h>
20918#include <netdb.h>
20919#include <string.h>
20920#include <sys/socket.h>
20921#include <netinet/in.h>
20922
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020923int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020924{
20925 int passive, gaierr, inet4 = 0, inet6 = 0;
20926 struct addrinfo hints, *ai, *aitop;
20927 char straddr[INET6_ADDRSTRLEN], strport[16];
20928
20929 for (passive = 0; passive <= 1; passive++) {
20930 memset(&hints, 0, sizeof(hints));
20931 hints.ai_family = AF_UNSPEC;
20932 hints.ai_flags = passive ? AI_PASSIVE : 0;
20933 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020934 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020935 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20936 (void)gai_strerror(gaierr);
20937 goto bad;
20938 }
20939 for (ai = aitop; ai; ai = ai->ai_next) {
20940 if (ai->ai_addr == NULL ||
20941 ai->ai_addrlen == 0 ||
20942 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20943 straddr, sizeof(straddr), strport, sizeof(strport),
20944 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20945 goto bad;
20946 }
20947 switch (ai->ai_family) {
20948 case AF_INET:
20949 if (strcmp(strport, "54321") != 0) {
20950 goto bad;
20951 }
20952 if (passive) {
20953 if (strcmp(straddr, "0.0.0.0") != 0) {
20954 goto bad;
20955 }
20956 } else {
20957 if (strcmp(straddr, "127.0.0.1") != 0) {
20958 goto bad;
20959 }
20960 }
20961 inet4++;
20962 break;
20963 case AF_INET6:
20964 if (strcmp(strport, "54321") != 0) {
20965 goto bad;
20966 }
20967 if (passive) {
20968 if (strcmp(straddr, "::") != 0) {
20969 goto bad;
20970 }
20971 } else {
20972 if (strcmp(straddr, "::1") != 0) {
20973 goto bad;
20974 }
20975 }
20976 inet6++;
20977 break;
20978 case AF_UNSPEC:
20979 goto bad;
20980 break;
20981 default:
20982 /* another family support? */
20983 break;
20984 }
20985 }
20986 }
20987
20988 if (!(inet4 == 0 || inet4 == 2))
20989 goto bad;
20990 if (!(inet6 == 0 || inet6 == 2))
20991 goto bad;
20992
20993 if (aitop)
20994 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020995 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020996
20997 bad:
20998 if (aitop)
20999 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021000 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021001}
21002
Martin v. Löwis11437992002-04-12 09:54:03 +000021003_ACEOF
21004rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021005if { (ac_try="$ac_link"
21006case "(($ac_try" in
21007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21008 *) ac_try_echo=$ac_try;;
21009esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021010eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021011 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021012 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021014 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021015 { (case "(($ac_try" in
21016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21017 *) ac_try_echo=$ac_try;;
21018esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021020 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021021 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021023 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021024 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021025else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021026 echo "$as_me: program exited with status $ac_status" >&5
21027echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021028sed 's/^/| /' conftest.$ac_ext >&5
21029
Martin v. Löwis11437992002-04-12 09:54:03 +000021030( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021031ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021032fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021033rm -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 +000021034fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021035
21036
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021037fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021038
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021039fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021040
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021041if test $have_getaddrinfo = no -o $ac_cv_buggy_getaddrinfo = yes
21042then
21043 if test $ipv6 = yes
21044 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021045 echo 'Fatal: You must get working getaddrinfo() function.'
21046 echo ' or you can specify "--disable-ipv6"'.
21047 exit 1
21048 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021049else
Martin v. Löwis11437992002-04-12 09:54:03 +000021050
21051cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021052#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021053_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021054
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021055fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021056
Jack Jansen9a66b6d2001-08-08 13:56:14 +000021057for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021058do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021059as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21060{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21061echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021062if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021063 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021064else
Martin v. Löwis11437992002-04-12 09:54:03 +000021065 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021066/* confdefs.h. */
21067_ACEOF
21068cat confdefs.h >>conftest.$ac_ext
21069cat >>conftest.$ac_ext <<_ACEOF
21070/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021071/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21072 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21073#define $ac_func innocuous_$ac_func
21074
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021075/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021076 which can conflict with char $ac_func (); below.
21077 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021078 <limits.h> exists even on freestanding compilers. */
21079
21080#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021081# include <limits.h>
21082#else
21083# include <assert.h>
21084#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021085
21086#undef $ac_func
21087
Martin v. Löwiseba40652007-08-30 20:10:57 +000021088/* Override any GCC internal prototype to avoid an error.
21089 Use char because int might match the return type of a GCC
21090 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021091#ifdef __cplusplus
21092extern "C"
21093#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021094char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021095/* The GNU C library defines this for functions which it implements
21096 to always fail with ENOSYS. Some functions are actually named
21097 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021098#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021099choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021100#endif
21101
Skip Montanaro6dead952003-09-25 14:50:04 +000021102int
21103main ()
21104{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021105return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021106 ;
21107 return 0;
21108}
21109_ACEOF
21110rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021111if { (ac_try="$ac_link"
21112case "(($ac_try" in
21113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21114 *) ac_try_echo=$ac_try;;
21115esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021117 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021118 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021119 grep -v '^ *+' conftest.er1 >conftest.err
21120 rm -f conftest.er1
21121 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021123 (exit $ac_status); } && {
21124 test -z "$ac_c_werror_flag" ||
21125 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021126 } && test -s conftest$ac_exeext &&
21127 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021128 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021129else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021130 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021131sed 's/^/| /' conftest.$ac_ext >&5
21132
Martin v. Löwiseba40652007-08-30 20:10:57 +000021133 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021134fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021135
21136rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021137 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021138fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021139ac_res=`eval echo '${'$as_ac_var'}'`
21140 { echo "$as_me:$LINENO: result: $ac_res" >&5
21141echo "${ECHO_T}$ac_res" >&6; }
21142if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021143 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021144#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021145_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021146
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021147fi
21148done
21149
Michael W. Hudson54241132001-12-07 15:38:26 +000021150
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021151# checks for structures
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021152{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
21153echo $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 +000021154if test "${ac_cv_header_time+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021155 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021156else
Martin v. Löwis11437992002-04-12 09:54:03 +000021157 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021158/* confdefs.h. */
21159_ACEOF
21160cat confdefs.h >>conftest.$ac_ext
21161cat >>conftest.$ac_ext <<_ACEOF
21162/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021163#include <sys/types.h>
21164#include <sys/time.h>
21165#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021166
Martin v. Löwis11437992002-04-12 09:54:03 +000021167int
21168main ()
21169{
21170if ((struct tm *) 0)
21171return 0;
21172 ;
21173 return 0;
21174}
21175_ACEOF
21176rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021177if { (ac_try="$ac_compile"
21178case "(($ac_try" in
21179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21180 *) ac_try_echo=$ac_try;;
21181esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021183 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021184 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021185 grep -v '^ *+' conftest.er1 >conftest.err
21186 rm -f conftest.er1
21187 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021189 (exit $ac_status); } && {
21190 test -z "$ac_c_werror_flag" ||
21191 test ! -s conftest.err
21192 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021193 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021194else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021195 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021196sed 's/^/| /' conftest.$ac_ext >&5
21197
Martin v. Löwiseba40652007-08-30 20:10:57 +000021198 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021199fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021200
21201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021202fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021203{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
21204echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021205if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021206
21207cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021208#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021209_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021210
21211fi
21212
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021213{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
21214echo $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 +000021215if test "${ac_cv_struct_tm+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021216 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021217else
Martin v. Löwis11437992002-04-12 09:54:03 +000021218 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021219/* confdefs.h. */
21220_ACEOF
21221cat confdefs.h >>conftest.$ac_ext
21222cat >>conftest.$ac_ext <<_ACEOF
21223/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021224#include <sys/types.h>
21225#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021226
Martin v. Löwis11437992002-04-12 09:54:03 +000021227int
21228main ()
21229{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021230struct tm tm;
21231 int *p = &tm.tm_sec;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021232 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000021233 ;
21234 return 0;
21235}
21236_ACEOF
21237rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021238if { (ac_try="$ac_compile"
21239case "(($ac_try" in
21240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21241 *) ac_try_echo=$ac_try;;
21242esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021244 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021245 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021246 grep -v '^ *+' conftest.er1 >conftest.err
21247 rm -f conftest.er1
21248 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021250 (exit $ac_status); } && {
21251 test -z "$ac_c_werror_flag" ||
21252 test ! -s conftest.err
21253 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021254 ac_cv_struct_tm=time.h
21255else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021256 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021257sed 's/^/| /' conftest.$ac_ext >&5
21258
Martin v. Löwiseba40652007-08-30 20:10:57 +000021259 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021260fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021261
21262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021263fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021264{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
21265echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021266if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021267
21268cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021269#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021270_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021271
21272fi
21273
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021274{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
21275echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021276if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021277 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021278else
Martin v. Löwis11437992002-04-12 09:54:03 +000021279 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021280/* confdefs.h. */
21281_ACEOF
21282cat confdefs.h >>conftest.$ac_ext
21283cat >>conftest.$ac_ext <<_ACEOF
21284/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021285#include <sys/types.h>
21286#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000021287
21288
Martin v. Löwis11437992002-04-12 09:54:03 +000021289int
21290main ()
21291{
21292static struct tm ac_aggr;
21293if (ac_aggr.tm_zone)
21294return 0;
21295 ;
21296 return 0;
21297}
21298_ACEOF
21299rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021300if { (ac_try="$ac_compile"
21301case "(($ac_try" in
21302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21303 *) ac_try_echo=$ac_try;;
21304esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021306 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021307 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021308 grep -v '^ *+' conftest.er1 >conftest.err
21309 rm -f conftest.er1
21310 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021312 (exit $ac_status); } && {
21313 test -z "$ac_c_werror_flag" ||
21314 test ! -s conftest.err
21315 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021316 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021317else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021318 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021319sed 's/^/| /' conftest.$ac_ext >&5
21320
Martin v. Löwiseba40652007-08-30 20:10:57 +000021321 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021322/* confdefs.h. */
21323_ACEOF
21324cat confdefs.h >>conftest.$ac_ext
21325cat >>conftest.$ac_ext <<_ACEOF
21326/* end confdefs.h. */
21327#include <sys/types.h>
21328#include <$ac_cv_struct_tm>
21329
21330
21331int
21332main ()
21333{
21334static struct tm ac_aggr;
21335if (sizeof ac_aggr.tm_zone)
21336return 0;
21337 ;
21338 return 0;
21339}
21340_ACEOF
21341rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021342if { (ac_try="$ac_compile"
21343case "(($ac_try" in
21344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21345 *) ac_try_echo=$ac_try;;
21346esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021347eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021348 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021349 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021350 grep -v '^ *+' conftest.er1 >conftest.err
21351 rm -f conftest.er1
21352 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021354 (exit $ac_status); } && {
21355 test -z "$ac_c_werror_flag" ||
21356 test ! -s conftest.err
21357 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021358 ac_cv_member_struct_tm_tm_zone=yes
21359else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021360 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021361sed 's/^/| /' conftest.$ac_ext >&5
21362
Martin v. Löwiseba40652007-08-30 20:10:57 +000021363 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021364fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021365
21366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021367fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021368
21369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021370fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021371{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21372echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
21373if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021374
21375cat >>confdefs.h <<_ACEOF
21376#define HAVE_STRUCT_TM_TM_ZONE 1
21377_ACEOF
21378
21379
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021380fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021381
Martin v. Löwis11437992002-04-12 09:54:03 +000021382if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21383
21384cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021385#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021386_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021387
21388else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021389 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
21390echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021391if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021392 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000021393else
21394 cat >conftest.$ac_ext <<_ACEOF
21395/* confdefs.h. */
21396_ACEOF
21397cat confdefs.h >>conftest.$ac_ext
21398cat >>conftest.$ac_ext <<_ACEOF
21399/* end confdefs.h. */
21400#include <time.h>
21401
21402int
21403main ()
21404{
21405#ifndef tzname
21406 (void) tzname;
21407#endif
21408
21409 ;
21410 return 0;
21411}
21412_ACEOF
21413rm -f conftest.$ac_objext
21414if { (ac_try="$ac_compile"
21415case "(($ac_try" in
21416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21417 *) ac_try_echo=$ac_try;;
21418esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021420 (eval "$ac_compile") 2>conftest.er1
21421 ac_status=$?
21422 grep -v '^ *+' conftest.er1 >conftest.err
21423 rm -f conftest.er1
21424 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021426 (exit $ac_status); } && {
21427 test -z "$ac_c_werror_flag" ||
21428 test ! -s conftest.err
21429 } && test -s conftest.$ac_objext; then
21430 ac_cv_have_decl_tzname=yes
21431else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021432 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021433sed 's/^/| /' conftest.$ac_ext >&5
21434
21435 ac_cv_have_decl_tzname=no
21436fi
21437
21438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21439fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021440{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
21441echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
21442if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021443
21444cat >>confdefs.h <<_ACEOF
21445#define HAVE_DECL_TZNAME 1
21446_ACEOF
21447
21448
21449else
21450 cat >>confdefs.h <<_ACEOF
21451#define HAVE_DECL_TZNAME 0
21452_ACEOF
21453
21454
21455fi
21456
21457
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021458 { echo "$as_me:$LINENO: checking for tzname" >&5
21459echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021460if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021461 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021462else
Martin v. Löwis11437992002-04-12 09:54:03 +000021463 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021464/* confdefs.h. */
21465_ACEOF
21466cat confdefs.h >>conftest.$ac_ext
21467cat >>conftest.$ac_ext <<_ACEOF
21468/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021469#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000021470#if !HAVE_DECL_TZNAME
21471extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021472#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021473
Martin v. Löwis11437992002-04-12 09:54:03 +000021474int
21475main ()
21476{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021477return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021478 ;
21479 return 0;
21480}
21481_ACEOF
21482rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021483if { (ac_try="$ac_link"
21484case "(($ac_try" in
21485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21486 *) ac_try_echo=$ac_try;;
21487esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021489 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021490 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021491 grep -v '^ *+' conftest.er1 >conftest.err
21492 rm -f conftest.er1
21493 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021495 (exit $ac_status); } && {
21496 test -z "$ac_c_werror_flag" ||
21497 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021498 } && test -s conftest$ac_exeext &&
21499 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021500 ac_cv_var_tzname=yes
21501else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021502 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021503sed 's/^/| /' conftest.$ac_ext >&5
21504
Martin v. Löwiseba40652007-08-30 20:10:57 +000021505 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021506fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021507
21508rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021509 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021510fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021511{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21512echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021513 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021514
21515cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021516#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021517_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021518
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021519 fi
21520fi
21521
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021522{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21523echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021524if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021525 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021526else
21527 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021528/* confdefs.h. */
21529_ACEOF
21530cat confdefs.h >>conftest.$ac_ext
21531cat >>conftest.$ac_ext <<_ACEOF
21532/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021533$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021534int
21535main ()
21536{
21537static struct stat ac_aggr;
21538if (ac_aggr.st_rdev)
21539return 0;
21540 ;
21541 return 0;
21542}
21543_ACEOF
21544rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021545if { (ac_try="$ac_compile"
21546case "(($ac_try" in
21547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21548 *) ac_try_echo=$ac_try;;
21549esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021551 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021552 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021553 grep -v '^ *+' conftest.er1 >conftest.err
21554 rm -f conftest.er1
21555 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021557 (exit $ac_status); } && {
21558 test -z "$ac_c_werror_flag" ||
21559 test ! -s conftest.err
21560 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021561 ac_cv_member_struct_stat_st_rdev=yes
21562else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021563 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021564sed 's/^/| /' conftest.$ac_ext >&5
21565
Martin v. Löwiseba40652007-08-30 20:10:57 +000021566 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021567/* confdefs.h. */
21568_ACEOF
21569cat confdefs.h >>conftest.$ac_ext
21570cat >>conftest.$ac_ext <<_ACEOF
21571/* end confdefs.h. */
21572$ac_includes_default
21573int
21574main ()
21575{
21576static struct stat ac_aggr;
21577if (sizeof ac_aggr.st_rdev)
21578return 0;
21579 ;
21580 return 0;
21581}
21582_ACEOF
21583rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021584if { (ac_try="$ac_compile"
21585case "(($ac_try" in
21586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21587 *) ac_try_echo=$ac_try;;
21588esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021590 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021591 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021592 grep -v '^ *+' conftest.er1 >conftest.err
21593 rm -f conftest.er1
21594 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021596 (exit $ac_status); } && {
21597 test -z "$ac_c_werror_flag" ||
21598 test ! -s conftest.err
21599 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021600 ac_cv_member_struct_stat_st_rdev=yes
21601else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021602 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021603sed 's/^/| /' conftest.$ac_ext >&5
21604
Martin v. Löwiseba40652007-08-30 20:10:57 +000021605 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021606fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021607
21608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021609fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021610
21611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021612fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021613{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21614echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21615if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021616
21617cat >>confdefs.h <<_ACEOF
21618#define HAVE_STRUCT_STAT_ST_RDEV 1
21619_ACEOF
21620
21621
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021622fi
21623
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021624{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21625echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021626if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021627 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021628else
Martin v. Löwis11437992002-04-12 09:54:03 +000021629 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021630/* confdefs.h. */
21631_ACEOF
21632cat confdefs.h >>conftest.$ac_ext
21633cat >>conftest.$ac_ext <<_ACEOF
21634/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021635$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021636int
21637main ()
21638{
21639static struct stat ac_aggr;
21640if (ac_aggr.st_blksize)
21641return 0;
21642 ;
21643 return 0;
21644}
21645_ACEOF
21646rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021647if { (ac_try="$ac_compile"
21648case "(($ac_try" in
21649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21650 *) ac_try_echo=$ac_try;;
21651esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021652eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021653 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021654 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021655 grep -v '^ *+' conftest.er1 >conftest.err
21656 rm -f conftest.er1
21657 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021659 (exit $ac_status); } && {
21660 test -z "$ac_c_werror_flag" ||
21661 test ! -s conftest.err
21662 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021663 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021664else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021665 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021666sed 's/^/| /' conftest.$ac_ext >&5
21667
Martin v. Löwiseba40652007-08-30 20:10:57 +000021668 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021669/* confdefs.h. */
21670_ACEOF
21671cat confdefs.h >>conftest.$ac_ext
21672cat >>conftest.$ac_ext <<_ACEOF
21673/* end confdefs.h. */
21674$ac_includes_default
21675int
21676main ()
21677{
21678static struct stat ac_aggr;
21679if (sizeof ac_aggr.st_blksize)
21680return 0;
21681 ;
21682 return 0;
21683}
21684_ACEOF
21685rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021686if { (ac_try="$ac_compile"
21687case "(($ac_try" in
21688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21689 *) ac_try_echo=$ac_try;;
21690esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021692 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021693 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021694 grep -v '^ *+' conftest.er1 >conftest.err
21695 rm -f conftest.er1
21696 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021698 (exit $ac_status); } && {
21699 test -z "$ac_c_werror_flag" ||
21700 test ! -s conftest.err
21701 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021702 ac_cv_member_struct_stat_st_blksize=yes
21703else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021704 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021705sed 's/^/| /' conftest.$ac_ext >&5
21706
Martin v. Löwiseba40652007-08-30 20:10:57 +000021707 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021708fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021709
21710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021711fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021712
21713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021714fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021715{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21716echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21717if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021718
Martin v. Löwis11437992002-04-12 09:54:03 +000021719cat >>confdefs.h <<_ACEOF
21720#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21721_ACEOF
21722
21723
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021724fi
21725
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021726{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21727echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021728if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021729 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021730else
21731 cat >conftest.$ac_ext <<_ACEOF
21732/* confdefs.h. */
21733_ACEOF
21734cat confdefs.h >>conftest.$ac_ext
21735cat >>conftest.$ac_ext <<_ACEOF
21736/* end confdefs.h. */
21737$ac_includes_default
21738int
21739main ()
21740{
21741static struct stat ac_aggr;
21742if (ac_aggr.st_flags)
21743return 0;
21744 ;
21745 return 0;
21746}
21747_ACEOF
21748rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021749if { (ac_try="$ac_compile"
21750case "(($ac_try" in
21751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21752 *) ac_try_echo=$ac_try;;
21753esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021754eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021755 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021756 ac_status=$?
21757 grep -v '^ *+' conftest.er1 >conftest.err
21758 rm -f conftest.er1
21759 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021761 (exit $ac_status); } && {
21762 test -z "$ac_c_werror_flag" ||
21763 test ! -s conftest.err
21764 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021765 ac_cv_member_struct_stat_st_flags=yes
21766else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021767 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021768sed 's/^/| /' conftest.$ac_ext >&5
21769
Martin v. Löwiseba40652007-08-30 20:10:57 +000021770 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021771/* confdefs.h. */
21772_ACEOF
21773cat confdefs.h >>conftest.$ac_ext
21774cat >>conftest.$ac_ext <<_ACEOF
21775/* end confdefs.h. */
21776$ac_includes_default
21777int
21778main ()
21779{
21780static struct stat ac_aggr;
21781if (sizeof ac_aggr.st_flags)
21782return 0;
21783 ;
21784 return 0;
21785}
21786_ACEOF
21787rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021788if { (ac_try="$ac_compile"
21789case "(($ac_try" in
21790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21791 *) ac_try_echo=$ac_try;;
21792esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021794 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021795 ac_status=$?
21796 grep -v '^ *+' conftest.er1 >conftest.err
21797 rm -f conftest.er1
21798 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021800 (exit $ac_status); } && {
21801 test -z "$ac_c_werror_flag" ||
21802 test ! -s conftest.err
21803 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021804 ac_cv_member_struct_stat_st_flags=yes
21805else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021806 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021807sed 's/^/| /' conftest.$ac_ext >&5
21808
Martin v. Löwiseba40652007-08-30 20:10:57 +000021809 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021810fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021811
21812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021813fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021814
21815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021816fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021817{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21818echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
21819if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021820
21821cat >>confdefs.h <<_ACEOF
21822#define HAVE_STRUCT_STAT_ST_FLAGS 1
21823_ACEOF
21824
21825
21826fi
21827
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021828{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
21829echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021830if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021831 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021832else
21833 cat >conftest.$ac_ext <<_ACEOF
21834/* confdefs.h. */
21835_ACEOF
21836cat confdefs.h >>conftest.$ac_ext
21837cat >>conftest.$ac_ext <<_ACEOF
21838/* end confdefs.h. */
21839$ac_includes_default
21840int
21841main ()
21842{
21843static struct stat ac_aggr;
21844if (ac_aggr.st_gen)
21845return 0;
21846 ;
21847 return 0;
21848}
21849_ACEOF
21850rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021851if { (ac_try="$ac_compile"
21852case "(($ac_try" in
21853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21854 *) ac_try_echo=$ac_try;;
21855esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021857 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021858 ac_status=$?
21859 grep -v '^ *+' conftest.er1 >conftest.err
21860 rm -f conftest.er1
21861 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021863 (exit $ac_status); } && {
21864 test -z "$ac_c_werror_flag" ||
21865 test ! -s conftest.err
21866 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021867 ac_cv_member_struct_stat_st_gen=yes
21868else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021869 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021870sed 's/^/| /' conftest.$ac_ext >&5
21871
Martin v. Löwiseba40652007-08-30 20:10:57 +000021872 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021873/* confdefs.h. */
21874_ACEOF
21875cat confdefs.h >>conftest.$ac_ext
21876cat >>conftest.$ac_ext <<_ACEOF
21877/* end confdefs.h. */
21878$ac_includes_default
21879int
21880main ()
21881{
21882static struct stat ac_aggr;
21883if (sizeof ac_aggr.st_gen)
21884return 0;
21885 ;
21886 return 0;
21887}
21888_ACEOF
21889rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021890if { (ac_try="$ac_compile"
21891case "(($ac_try" in
21892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21893 *) ac_try_echo=$ac_try;;
21894esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021896 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021897 ac_status=$?
21898 grep -v '^ *+' conftest.er1 >conftest.err
21899 rm -f conftest.er1
21900 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021902 (exit $ac_status); } && {
21903 test -z "$ac_c_werror_flag" ||
21904 test ! -s conftest.err
21905 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021906 ac_cv_member_struct_stat_st_gen=yes
21907else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021908 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021909sed 's/^/| /' conftest.$ac_ext >&5
21910
Martin v. Löwiseba40652007-08-30 20:10:57 +000021911 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021912fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021913
21914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021915fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021916
21917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021918fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021919{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21920echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21921if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021922
21923cat >>confdefs.h <<_ACEOF
21924#define HAVE_STRUCT_STAT_ST_GEN 1
21925_ACEOF
21926
21927
21928fi
21929
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021930{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21931echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021932if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021933 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021934else
21935 cat >conftest.$ac_ext <<_ACEOF
21936/* confdefs.h. */
21937_ACEOF
21938cat confdefs.h >>conftest.$ac_ext
21939cat >>conftest.$ac_ext <<_ACEOF
21940/* end confdefs.h. */
21941$ac_includes_default
21942int
21943main ()
21944{
21945static struct stat ac_aggr;
21946if (ac_aggr.st_birthtime)
21947return 0;
21948 ;
21949 return 0;
21950}
21951_ACEOF
21952rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021953if { (ac_try="$ac_compile"
21954case "(($ac_try" in
21955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21956 *) ac_try_echo=$ac_try;;
21957esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021958eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021959 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021960 ac_status=$?
21961 grep -v '^ *+' conftest.er1 >conftest.err
21962 rm -f conftest.er1
21963 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021965 (exit $ac_status); } && {
21966 test -z "$ac_c_werror_flag" ||
21967 test ! -s conftest.err
21968 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021969 ac_cv_member_struct_stat_st_birthtime=yes
21970else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021971 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021972sed 's/^/| /' conftest.$ac_ext >&5
21973
Martin v. Löwiseba40652007-08-30 20:10:57 +000021974 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021975/* confdefs.h. */
21976_ACEOF
21977cat confdefs.h >>conftest.$ac_ext
21978cat >>conftest.$ac_ext <<_ACEOF
21979/* end confdefs.h. */
21980$ac_includes_default
21981int
21982main ()
21983{
21984static struct stat ac_aggr;
21985if (sizeof ac_aggr.st_birthtime)
21986return 0;
21987 ;
21988 return 0;
21989}
21990_ACEOF
21991rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021992if { (ac_try="$ac_compile"
21993case "(($ac_try" in
21994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21995 *) ac_try_echo=$ac_try;;
21996esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021998 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021999 ac_status=$?
22000 grep -v '^ *+' conftest.er1 >conftest.err
22001 rm -f conftest.er1
22002 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022004 (exit $ac_status); } && {
22005 test -z "$ac_c_werror_flag" ||
22006 test ! -s conftest.err
22007 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022008 ac_cv_member_struct_stat_st_birthtime=yes
22009else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022010 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022011sed 's/^/| /' conftest.$ac_ext >&5
22012
Martin v. Löwiseba40652007-08-30 20:10:57 +000022013 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022014fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022015
22016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022017fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022018
22019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022020fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022021{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
22022echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
22023if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022024
22025cat >>confdefs.h <<_ACEOF
22026#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
22027_ACEOF
22028
22029
22030fi
22031
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022032{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
22033echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022034if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022035 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022036else
Martin v. Löwis11437992002-04-12 09:54:03 +000022037 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022038/* confdefs.h. */
22039_ACEOF
22040cat confdefs.h >>conftest.$ac_ext
22041cat >>conftest.$ac_ext <<_ACEOF
22042/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022043$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022044int
22045main ()
22046{
22047static struct stat ac_aggr;
22048if (ac_aggr.st_blocks)
22049return 0;
22050 ;
22051 return 0;
22052}
22053_ACEOF
22054rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022055if { (ac_try="$ac_compile"
22056case "(($ac_try" in
22057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22058 *) ac_try_echo=$ac_try;;
22059esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022061 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022062 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022063 grep -v '^ *+' conftest.er1 >conftest.err
22064 rm -f conftest.er1
22065 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022067 (exit $ac_status); } && {
22068 test -z "$ac_c_werror_flag" ||
22069 test ! -s conftest.err
22070 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022071 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000022072else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022073 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022074sed 's/^/| /' conftest.$ac_ext >&5
22075
Martin v. Löwiseba40652007-08-30 20:10:57 +000022076 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022077/* confdefs.h. */
22078_ACEOF
22079cat confdefs.h >>conftest.$ac_ext
22080cat >>conftest.$ac_ext <<_ACEOF
22081/* end confdefs.h. */
22082$ac_includes_default
22083int
22084main ()
22085{
22086static struct stat ac_aggr;
22087if (sizeof ac_aggr.st_blocks)
22088return 0;
22089 ;
22090 return 0;
22091}
22092_ACEOF
22093rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022094if { (ac_try="$ac_compile"
22095case "(($ac_try" in
22096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22097 *) ac_try_echo=$ac_try;;
22098esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022100 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000022101 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022102 grep -v '^ *+' conftest.er1 >conftest.err
22103 rm -f conftest.er1
22104 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022106 (exit $ac_status); } && {
22107 test -z "$ac_c_werror_flag" ||
22108 test ! -s conftest.err
22109 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022110 ac_cv_member_struct_stat_st_blocks=yes
22111else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022112 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022113sed 's/^/| /' conftest.$ac_ext >&5
22114
Martin v. Löwiseba40652007-08-30 20:10:57 +000022115 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000022116fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022117
22118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022119fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022120
22121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000022122fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022123{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
22124echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
22125if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000022126
Martin v. Löwis11437992002-04-12 09:54:03 +000022127cat >>confdefs.h <<_ACEOF
22128#define HAVE_STRUCT_STAT_ST_BLOCKS 1
22129_ACEOF
22130
22131
22132cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022133#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022134_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022135
22136else
Martin v. Löwiseba40652007-08-30 20:10:57 +000022137 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000022138 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022139 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
22140 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022141esac
22142
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022143fi
22144
Michael W. Hudson54241132001-12-07 15:38:26 +000022145
Martin v. Löwis11437992002-04-12 09:54:03 +000022146
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022147{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
22148echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022149if test "${ac_cv_header_time_altzone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022150 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022151else
Martin v. Löwis11437992002-04-12 09:54:03 +000022152 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022153/* confdefs.h. */
22154_ACEOF
22155cat confdefs.h >>conftest.$ac_ext
22156cat >>conftest.$ac_ext <<_ACEOF
22157/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022158#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022159int
22160main ()
22161{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022162return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000022163 ;
22164 return 0;
22165}
22166_ACEOF
22167rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022168if { (ac_try="$ac_compile"
22169case "(($ac_try" in
22170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22171 *) ac_try_echo=$ac_try;;
22172esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022174 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022175 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022176 grep -v '^ *+' conftest.er1 >conftest.err
22177 rm -f conftest.er1
22178 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022180 (exit $ac_status); } && {
22181 test -z "$ac_c_werror_flag" ||
22182 test ! -s conftest.err
22183 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022184 ac_cv_header_time_altzone=yes
22185else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022186 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022187sed 's/^/| /' conftest.$ac_ext >&5
22188
Martin v. Löwiseba40652007-08-30 20:10:57 +000022189 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022190fi
22191
Martin v. Löwiseba40652007-08-30 20:10:57 +000022192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22193fi
22194
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022195{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
22196echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022197if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022198
22199cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022200#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022201_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022202
22203fi
22204
Guido van Rossumda88dad1995-01-26 00:46:29 +000022205was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022206{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
22207echo $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 +000022208cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022209/* confdefs.h. */
22210_ACEOF
22211cat confdefs.h >>conftest.$ac_ext
22212cat >>conftest.$ac_ext <<_ACEOF
22213/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022214
22215#include <sys/types.h>
22216#include <sys/select.h>
22217#include <sys/time.h>
22218
Martin v. Löwis11437992002-04-12 09:54:03 +000022219int
22220main ()
22221{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022222;
Martin v. Löwis11437992002-04-12 09:54:03 +000022223 ;
22224 return 0;
22225}
22226_ACEOF
22227rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022228if { (ac_try="$ac_compile"
22229case "(($ac_try" in
22230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22231 *) ac_try_echo=$ac_try;;
22232esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022234 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022235 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022236 grep -v '^ *+' conftest.er1 >conftest.err
22237 rm -f conftest.er1
22238 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022240 (exit $ac_status); } && {
22241 test -z "$ac_c_werror_flag" ||
22242 test ! -s conftest.err
22243 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022244
22245
22246cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022247#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022248_ACEOF
22249
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022250 was_it_defined=yes
22251
Guido van Rossumf78abae1997-01-21 22:02:36 +000022252else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022253 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022254sed 's/^/| /' conftest.$ac_ext >&5
22255
Brett Cannon19fab762007-06-02 03:02:29 +000022256
Martin v. Löwiseba40652007-08-30 20:10:57 +000022257fi
22258
22259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022260{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
22261echo "${ECHO_T}$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022262
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022263{ echo "$as_me:$LINENO: checking for addrinfo" >&5
22264echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022265if test "${ac_cv_struct_addrinfo+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022266 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022267else
Martin v. Löwis11437992002-04-12 09:54:03 +000022268 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022269/* confdefs.h. */
22270_ACEOF
22271cat confdefs.h >>conftest.$ac_ext
22272cat >>conftest.$ac_ext <<_ACEOF
22273/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022274
22275# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022276int
22277main ()
22278{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022279struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000022280 ;
22281 return 0;
22282}
22283_ACEOF
22284rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022285if { (ac_try="$ac_compile"
22286case "(($ac_try" in
22287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22288 *) ac_try_echo=$ac_try;;
22289esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022291 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022292 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022293 grep -v '^ *+' conftest.er1 >conftest.err
22294 rm -f conftest.er1
22295 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022297 (exit $ac_status); } && {
22298 test -z "$ac_c_werror_flag" ||
22299 test ! -s conftest.err
22300 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022301 ac_cv_struct_addrinfo=yes
22302else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022303 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022304sed 's/^/| /' conftest.$ac_ext >&5
22305
Martin v. Löwiseba40652007-08-30 20:10:57 +000022306 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022307fi
22308
Martin v. Löwiseba40652007-08-30 20:10:57 +000022309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22310fi
22311
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022312{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
22313echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022314if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022315
22316cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022317#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022318_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022319
22320fi
22321
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022322{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
22323echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022324if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022325 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022326else
Martin v. Löwis11437992002-04-12 09:54:03 +000022327 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022328/* confdefs.h. */
22329_ACEOF
22330cat confdefs.h >>conftest.$ac_ext
22331cat >>conftest.$ac_ext <<_ACEOF
22332/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022333
22334# include <sys/types.h>
22335# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022336int
22337main ()
22338{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022339struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000022340 ;
22341 return 0;
22342}
22343_ACEOF
22344rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022345if { (ac_try="$ac_compile"
22346case "(($ac_try" in
22347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22348 *) ac_try_echo=$ac_try;;
22349esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022351 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022352 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022353 grep -v '^ *+' conftest.er1 >conftest.err
22354 rm -f conftest.er1
22355 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022357 (exit $ac_status); } && {
22358 test -z "$ac_c_werror_flag" ||
22359 test ! -s conftest.err
22360 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022361 ac_cv_struct_sockaddr_storage=yes
22362else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022363 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022364sed 's/^/| /' conftest.$ac_ext >&5
22365
Martin v. Löwiseba40652007-08-30 20:10:57 +000022366 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022367fi
22368
Martin v. Löwiseba40652007-08-30 20:10:57 +000022369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22370fi
22371
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022372{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
22373echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022374if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022375
22376cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022377#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022378_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022379
22380fi
22381
Guido van Rossum627b2d71993-12-24 10:39:16 +000022382# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000022383
Michael W. Hudson54241132001-12-07 15:38:26 +000022384
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022385{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
22386echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022387if test "${ac_cv_c_char_unsigned+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022388 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000022389else
Martin v. Löwis11437992002-04-12 09:54:03 +000022390 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022391/* confdefs.h. */
22392_ACEOF
22393cat confdefs.h >>conftest.$ac_ext
22394cat >>conftest.$ac_ext <<_ACEOF
22395/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022396$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022397int
22398main ()
22399{
22400static int test_array [1 - 2 * !(((char) -1) < 0)];
22401test_array [0] = 0
22402
22403 ;
22404 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000022405}
Martin v. Löwis11437992002-04-12 09:54:03 +000022406_ACEOF
22407rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022408if { (ac_try="$ac_compile"
22409case "(($ac_try" in
22410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22411 *) ac_try_echo=$ac_try;;
22412esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022414 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022415 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022416 grep -v '^ *+' conftest.er1 >conftest.err
22417 rm -f conftest.er1
22418 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022420 (exit $ac_status); } && {
22421 test -z "$ac_c_werror_flag" ||
22422 test ! -s conftest.err
22423 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022424 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022425else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022426 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022427sed 's/^/| /' conftest.$ac_ext >&5
22428
Martin v. Löwiseba40652007-08-30 20:10:57 +000022429 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022430fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022431
22432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022433fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022434{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
22435echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022436if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022437 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022438#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022439_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022440
22441fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000022442
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022443{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
22444echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022445if test "${ac_cv_c_const+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022446 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022447else
22448 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022449/* confdefs.h. */
22450_ACEOF
22451cat confdefs.h >>conftest.$ac_ext
22452cat >>conftest.$ac_ext <<_ACEOF
22453/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022454
Martin v. Löwis11437992002-04-12 09:54:03 +000022455int
22456main ()
22457{
22458/* FIXME: Include the comments suggested by Paul. */
22459#ifndef __cplusplus
22460 /* Ultrix mips cc rejects this. */
22461 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000022462 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022463 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022464 char const *const *pcpcc;
22465 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022466 /* NEC SVR4.0.2 mips cc rejects this. */
22467 struct point {int x, y;};
22468 static struct point const zero = {0,0};
22469 /* AIX XL C 1.02.0.0 rejects this.
22470 It does not let you subtract one const X* pointer from another in
22471 an arm of an if-expression whose if-part is not a constant
22472 expression */
22473 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000022474 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022475 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022476 ++pcpcc;
22477 ppc = (char**) pcpcc;
22478 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022479 { /* SCO 3.2v4 cc rejects this. */
22480 char *t;
22481 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022482
Martin v. Löwis11437992002-04-12 09:54:03 +000022483 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022484 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022485 }
22486 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22487 int x[] = {25, 17};
22488 const int *foo = &x[0];
22489 ++foo;
22490 }
22491 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22492 typedef const int *iptr;
22493 iptr p = 0;
22494 ++p;
22495 }
22496 { /* AIX XL C 1.02.0.0 rejects this saying
22497 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22498 struct s { int j; const int *ap[3]; };
22499 struct s *b; b->j = 5;
22500 }
22501 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22502 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022503 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022504 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022505 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022506#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022507
Martin v. Löwis11437992002-04-12 09:54:03 +000022508 ;
22509 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022510}
Martin v. Löwis11437992002-04-12 09:54:03 +000022511_ACEOF
22512rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022513if { (ac_try="$ac_compile"
22514case "(($ac_try" in
22515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22516 *) ac_try_echo=$ac_try;;
22517esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022519 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022520 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022521 grep -v '^ *+' conftest.er1 >conftest.err
22522 rm -f conftest.er1
22523 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022525 (exit $ac_status); } && {
22526 test -z "$ac_c_werror_flag" ||
22527 test ! -s conftest.err
22528 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022529 ac_cv_c_const=yes
22530else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022531 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022532sed 's/^/| /' conftest.$ac_ext >&5
22533
Martin v. Löwiseba40652007-08-30 20:10:57 +000022534 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022535fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022536
22537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022538fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022539{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22540echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022541if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022542
22543cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022544#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000022545_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022546
22547fi
22548
Michael W. Hudson54241132001-12-07 15:38:26 +000022549
Guido van Rossumda88dad1995-01-26 00:46:29 +000022550works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022551{ echo "$as_me:$LINENO: checking for working volatile" >&5
22552echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022553cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022554/* confdefs.h. */
22555_ACEOF
22556cat confdefs.h >>conftest.$ac_ext
22557cat >>conftest.$ac_ext <<_ACEOF
22558/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000022559
Martin v. Löwis11437992002-04-12 09:54:03 +000022560int
22561main ()
22562{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022563volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022564 ;
22565 return 0;
22566}
22567_ACEOF
22568rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022569if { (ac_try="$ac_compile"
22570case "(($ac_try" in
22571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22572 *) ac_try_echo=$ac_try;;
22573esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022575 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022576 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022577 grep -v '^ *+' conftest.er1 >conftest.err
22578 rm -f conftest.er1
22579 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022581 (exit $ac_status); } && {
22582 test -z "$ac_c_werror_flag" ||
22583 test ! -s conftest.err
22584 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022585 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022586else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022587 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022588sed 's/^/| /' conftest.$ac_ext >&5
22589
Martin v. Löwis11437992002-04-12 09:54:03 +000022590
22591cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022592#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022593_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022594
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022595
Guido van Rossum627b2d71993-12-24 10:39:16 +000022596fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022597
22598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022599{ echo "$as_me:$LINENO: result: $works" >&5
22600echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022601
Guido van Rossumda88dad1995-01-26 00:46:29 +000022602works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022603{ echo "$as_me:$LINENO: checking for working signed char" >&5
22604echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022605cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022606/* confdefs.h. */
22607_ACEOF
22608cat confdefs.h >>conftest.$ac_ext
22609cat >>conftest.$ac_ext <<_ACEOF
22610/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022611
Martin v. Löwis11437992002-04-12 09:54:03 +000022612int
22613main ()
22614{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022615signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022616 ;
22617 return 0;
22618}
22619_ACEOF
22620rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022621if { (ac_try="$ac_compile"
22622case "(($ac_try" in
22623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22624 *) ac_try_echo=$ac_try;;
22625esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022627 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022628 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022629 grep -v '^ *+' conftest.er1 >conftest.err
22630 rm -f conftest.er1
22631 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022633 (exit $ac_status); } && {
22634 test -z "$ac_c_werror_flag" ||
22635 test ! -s conftest.err
22636 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022637 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022638else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022639 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022640sed 's/^/| /' conftest.$ac_ext >&5
22641
Martin v. Löwis11437992002-04-12 09:54:03 +000022642
22643cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022644#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022645_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022646
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022647
Guido van Rossum7f43da71994-08-01 12:15:30 +000022648fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022649
22650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022651{ echo "$as_me:$LINENO: result: $works" >&5
22652echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022653
Guido van Rossumda88dad1995-01-26 00:46:29 +000022654have_prototypes=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022655{ echo "$as_me:$LINENO: checking for prototypes" >&5
22656echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022657cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022658/* confdefs.h. */
22659_ACEOF
22660cat confdefs.h >>conftest.$ac_ext
22661cat >>conftest.$ac_ext <<_ACEOF
22662/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022663int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022664int
22665main ()
22666{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022667return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022668 ;
22669 return 0;
22670}
22671_ACEOF
22672rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022673if { (ac_try="$ac_compile"
22674case "(($ac_try" in
22675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22676 *) ac_try_echo=$ac_try;;
22677esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022679 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022680 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022681 grep -v '^ *+' conftest.er1 >conftest.err
22682 rm -f conftest.er1
22683 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022685 (exit $ac_status); } && {
22686 test -z "$ac_c_werror_flag" ||
22687 test ! -s conftest.err
22688 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022689
22690
22691cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022692#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022693_ACEOF
22694
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022695 have_prototypes=yes
22696
Guido van Rossumf78abae1997-01-21 22:02:36 +000022697else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022698 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022699sed 's/^/| /' conftest.$ac_ext >&5
22700
Martin v. Löwiseba40652007-08-30 20:10:57 +000022701
Guido van Rossum7f43da71994-08-01 12:15:30 +000022702fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022703
22704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022705{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22706echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022707
Guido van Rossumda88dad1995-01-26 00:46:29 +000022708works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022709{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22710echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022711cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022712/* confdefs.h. */
22713_ACEOF
22714cat confdefs.h >>conftest.$ac_ext
22715cat >>conftest.$ac_ext <<_ACEOF
22716/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022717
22718#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022719int foo(int x, ...) {
22720 va_list va;
22721 va_start(va, x);
22722 va_arg(va, int);
22723 va_arg(va, char *);
22724 va_arg(va, double);
22725 return 0;
22726}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022727
Martin v. Löwis11437992002-04-12 09:54:03 +000022728int
22729main ()
22730{
Guido van Rossum90eea071996-08-30 20:58:57 +000022731return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022732 ;
22733 return 0;
22734}
22735_ACEOF
22736rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022737if { (ac_try="$ac_compile"
22738case "(($ac_try" in
22739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22740 *) ac_try_echo=$ac_try;;
22741esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022742eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022743 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022744 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022745 grep -v '^ *+' conftest.er1 >conftest.err
22746 rm -f conftest.er1
22747 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022749 (exit $ac_status); } && {
22750 test -z "$ac_c_werror_flag" ||
22751 test ! -s conftest.err
22752 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022753
22754
22755cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022756#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022757_ACEOF
22758
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022759 works=yes
22760
Guido van Rossumf78abae1997-01-21 22:02:36 +000022761else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022762 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022763sed 's/^/| /' conftest.$ac_ext >&5
22764
Martin v. Löwiseba40652007-08-30 20:10:57 +000022765
Guido van Rossum627b2d71993-12-24 10:39:16 +000022766fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022767
22768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022769{ echo "$as_me:$LINENO: result: $works" >&5
22770echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022771
Martin v. Löwisd6320502004-08-12 13:45:08 +000022772# check for socketpair
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022773{ echo "$as_me:$LINENO: checking for socketpair" >&5
22774echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022775cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022776/* confdefs.h. */
22777_ACEOF
22778cat confdefs.h >>conftest.$ac_ext
22779cat >>conftest.$ac_ext <<_ACEOF
22780/* end confdefs.h. */
22781
22782#include <sys/types.h>
22783#include <sys/socket.h>
22784
22785int
22786main ()
22787{
22788void *x=socketpair
22789 ;
22790 return 0;
22791}
22792_ACEOF
22793rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022794if { (ac_try="$ac_compile"
22795case "(($ac_try" in
22796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22797 *) ac_try_echo=$ac_try;;
22798esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022800 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000022801 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022802 grep -v '^ *+' conftest.er1 >conftest.err
22803 rm -f conftest.er1
22804 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022806 (exit $ac_status); } && {
22807 test -z "$ac_c_werror_flag" ||
22808 test ! -s conftest.err
22809 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000022810
22811cat >>confdefs.h <<\_ACEOF
22812#define HAVE_SOCKETPAIR 1
22813_ACEOF
22814
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022815 { echo "$as_me:$LINENO: result: yes" >&5
22816echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022817else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022818 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000022819sed 's/^/| /' conftest.$ac_ext >&5
22820
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022821 { echo "$as_me:$LINENO: result: no" >&5
22822echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022823
22824fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022825
22826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022827
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022828# check if sockaddr has sa_len member
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022829{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
22830echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022831cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022832/* confdefs.h. */
22833_ACEOF
22834cat confdefs.h >>conftest.$ac_ext
22835cat >>conftest.$ac_ext <<_ACEOF
22836/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022837#include <sys/types.h>
22838#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022839int
22840main ()
22841{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022842struct sockaddr x;
22843x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022844 ;
22845 return 0;
22846}
22847_ACEOF
22848rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022849if { (ac_try="$ac_compile"
22850case "(($ac_try" in
22851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22852 *) ac_try_echo=$ac_try;;
22853esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022854eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022855 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022856 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022857 grep -v '^ *+' conftest.er1 >conftest.err
22858 rm -f conftest.er1
22859 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022861 (exit $ac_status); } && {
22862 test -z "$ac_c_werror_flag" ||
22863 test ! -s conftest.err
22864 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022865 { echo "$as_me:$LINENO: result: yes" >&5
22866echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022867
22868cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022869#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022870_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022871
22872else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022873 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022874sed 's/^/| /' conftest.$ac_ext >&5
22875
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022876 { echo "$as_me:$LINENO: result: no" >&5
22877echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022878fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022879
22880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022881
Guido van Rossumda88dad1995-01-26 00:46:29 +000022882va_list_is_array=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022883{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22884echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022885cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022886/* confdefs.h. */
22887_ACEOF
22888cat confdefs.h >>conftest.$ac_ext
22889cat >>conftest.$ac_ext <<_ACEOF
22890/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022891
22892#ifdef HAVE_STDARG_PROTOTYPES
22893#include <stdarg.h>
22894#else
22895#include <varargs.h>
22896#endif
22897
Martin v. Löwis11437992002-04-12 09:54:03 +000022898int
22899main ()
22900{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022901va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022902 ;
22903 return 0;
22904}
22905_ACEOF
22906rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022907if { (ac_try="$ac_compile"
22908case "(($ac_try" in
22909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22910 *) ac_try_echo=$ac_try;;
22911esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022913 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022914 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022915 grep -v '^ *+' conftest.er1 >conftest.err
22916 rm -f conftest.er1
22917 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022919 (exit $ac_status); } && {
22920 test -z "$ac_c_werror_flag" ||
22921 test ! -s conftest.err
22922 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022923 :
22924else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022925 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022926sed 's/^/| /' conftest.$ac_ext >&5
22927
Martin v. Löwis11437992002-04-12 09:54:03 +000022928
22929
22930cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022931#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022932_ACEOF
22933
Guido van Rossumda88dad1995-01-26 00:46:29 +000022934 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022935
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022936fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022937
22938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022939{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22940echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022941
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022942# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022943
22944
22945
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022946{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22947echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022948if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022949 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022950else
Martin v. Löwis11437992002-04-12 09:54:03 +000022951 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022952/* confdefs.h. */
22953_ACEOF
22954cat confdefs.h >>conftest.$ac_ext
22955cat >>conftest.$ac_ext <<_ACEOF
22956/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022957/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22958 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22959#define gethostbyname_r innocuous_gethostbyname_r
22960
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022961/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022962 which can conflict with char gethostbyname_r (); below.
22963 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022964 <limits.h> exists even on freestanding compilers. */
22965
22966#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022967# include <limits.h>
22968#else
22969# include <assert.h>
22970#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022971
22972#undef gethostbyname_r
22973
Martin v. Löwiseba40652007-08-30 20:10:57 +000022974/* Override any GCC internal prototype to avoid an error.
22975 Use char because int might match the return type of a GCC
22976 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022977#ifdef __cplusplus
22978extern "C"
22979#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022980char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022981/* The GNU C library defines this for functions which it implements
22982 to always fail with ENOSYS. Some functions are actually named
22983 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022984#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022985choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022986#endif
22987
Skip Montanaro6dead952003-09-25 14:50:04 +000022988int
22989main ()
22990{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022991return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022992 ;
22993 return 0;
22994}
22995_ACEOF
22996rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022997if { (ac_try="$ac_link"
22998case "(($ac_try" in
22999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23000 *) ac_try_echo=$ac_try;;
23001esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023003 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023004 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023005 grep -v '^ *+' conftest.er1 >conftest.err
23006 rm -f conftest.er1
23007 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023009 (exit $ac_status); } && {
23010 test -z "$ac_c_werror_flag" ||
23011 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023012 } && test -s conftest$ac_exeext &&
23013 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023014 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023015else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023016 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023017sed 's/^/| /' conftest.$ac_ext >&5
23018
Martin v. Löwiseba40652007-08-30 20:10:57 +000023019 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023020fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023021
23022rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023023 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023024fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023025{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
23026echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
23027if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023028
Martin v. Löwis11437992002-04-12 09:54:03 +000023029 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023030#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023031_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023032
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023033 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
23034echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023035 OLD_CFLAGS=$CFLAGS
23036 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023037 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023038/* confdefs.h. */
23039_ACEOF
23040cat confdefs.h >>conftest.$ac_ext
23041cat >>conftest.$ac_ext <<_ACEOF
23042/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023043
23044# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023045
Martin v. Löwis11437992002-04-12 09:54:03 +000023046int
23047main ()
23048{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023049
23050 char *name;
23051 struct hostent *he, *res;
23052 char buffer[2048];
23053 int buflen = 2048;
23054 int h_errnop;
23055
23056 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000023057
23058 ;
23059 return 0;
23060}
23061_ACEOF
23062rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023063if { (ac_try="$ac_compile"
23064case "(($ac_try" in
23065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23066 *) ac_try_echo=$ac_try;;
23067esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023069 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023070 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023071 grep -v '^ *+' conftest.er1 >conftest.err
23072 rm -f conftest.er1
23073 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023075 (exit $ac_status); } && {
23076 test -z "$ac_c_werror_flag" ||
23077 test ! -s conftest.err
23078 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023079
23080 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023081#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023082_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023083
Martin v. Löwis11437992002-04-12 09:54:03 +000023084
23085cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023086#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023087_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023088
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023089 { echo "$as_me:$LINENO: result: yes" >&5
23090echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023091
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023092else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023093 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023094sed 's/^/| /' conftest.$ac_ext >&5
23095
Martin v. Löwis11437992002-04-12 09:54:03 +000023096
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023097 { echo "$as_me:$LINENO: result: no" >&5
23098echo "${ECHO_T}no" >&6; }
23099 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
23100echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023101 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023102/* confdefs.h. */
23103_ACEOF
23104cat confdefs.h >>conftest.$ac_ext
23105cat >>conftest.$ac_ext <<_ACEOF
23106/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023107
23108# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023109
Martin v. Löwis11437992002-04-12 09:54:03 +000023110int
23111main ()
23112{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023113
23114 char *name;
23115 struct hostent *he;
23116 char buffer[2048];
23117 int buflen = 2048;
23118 int h_errnop;
23119
23120 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000023121
23122 ;
23123 return 0;
23124}
23125_ACEOF
23126rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023127if { (ac_try="$ac_compile"
23128case "(($ac_try" in
23129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23130 *) ac_try_echo=$ac_try;;
23131esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023133 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023134 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023135 grep -v '^ *+' conftest.er1 >conftest.err
23136 rm -f conftest.er1
23137 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023139 (exit $ac_status); } && {
23140 test -z "$ac_c_werror_flag" ||
23141 test ! -s conftest.err
23142 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023143
23144 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023145#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023146_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023147
Martin v. Löwis11437992002-04-12 09:54:03 +000023148
23149cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023150#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023151_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023152
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023153 { echo "$as_me:$LINENO: result: yes" >&5
23154echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023155
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023156else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023157 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023158sed 's/^/| /' conftest.$ac_ext >&5
23159
Martin v. Löwis11437992002-04-12 09:54:03 +000023160
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023161 { echo "$as_me:$LINENO: result: no" >&5
23162echo "${ECHO_T}no" >&6; }
23163 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
23164echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023165 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023166/* confdefs.h. */
23167_ACEOF
23168cat confdefs.h >>conftest.$ac_ext
23169cat >>conftest.$ac_ext <<_ACEOF
23170/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023171
23172# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023173
Martin v. Löwis11437992002-04-12 09:54:03 +000023174int
23175main ()
23176{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023177
23178 char *name;
23179 struct hostent *he;
23180 struct hostent_data data;
23181
23182 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000023183
23184 ;
23185 return 0;
23186}
23187_ACEOF
23188rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023189if { (ac_try="$ac_compile"
23190case "(($ac_try" in
23191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23192 *) ac_try_echo=$ac_try;;
23193esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023195 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023196 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023197 grep -v '^ *+' conftest.er1 >conftest.err
23198 rm -f conftest.er1
23199 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023201 (exit $ac_status); } && {
23202 test -z "$ac_c_werror_flag" ||
23203 test ! -s conftest.err
23204 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023205
23206 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023207#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023208_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023209
Martin v. Löwis11437992002-04-12 09:54:03 +000023210
23211cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023212#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023213_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023214
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023215 { echo "$as_me:$LINENO: result: yes" >&5
23216echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023217
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023218else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023219 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023220sed 's/^/| /' conftest.$ac_ext >&5
23221
Martin v. Löwis11437992002-04-12 09:54:03 +000023222
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023223 { echo "$as_me:$LINENO: result: no" >&5
23224echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023225
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023226fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023227
23228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023229
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023230fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023231
23232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023233
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023234fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023235
23236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023237 CFLAGS=$OLD_CFLAGS
23238
23239else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023240
Martin v. Löwis11437992002-04-12 09:54:03 +000023241
23242for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000023243do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023244as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23245{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23246echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023247if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023248 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023249else
Martin v. Löwis11437992002-04-12 09:54:03 +000023250 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023251/* confdefs.h. */
23252_ACEOF
23253cat confdefs.h >>conftest.$ac_ext
23254cat >>conftest.$ac_ext <<_ACEOF
23255/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023256/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23257 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23258#define $ac_func innocuous_$ac_func
23259
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023260/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023261 which can conflict with char $ac_func (); below.
23262 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023263 <limits.h> exists even on freestanding compilers. */
23264
23265#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023266# include <limits.h>
23267#else
23268# include <assert.h>
23269#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023270
23271#undef $ac_func
23272
Martin v. Löwiseba40652007-08-30 20:10:57 +000023273/* Override any GCC internal prototype to avoid an error.
23274 Use char because int might match the return type of a GCC
23275 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023276#ifdef __cplusplus
23277extern "C"
23278#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023279char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023280/* The GNU C library defines this for functions which it implements
23281 to always fail with ENOSYS. Some functions are actually named
23282 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023283#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023284choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023285#endif
23286
Skip Montanaro6dead952003-09-25 14:50:04 +000023287int
23288main ()
23289{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023290return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023291 ;
23292 return 0;
23293}
23294_ACEOF
23295rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023296if { (ac_try="$ac_link"
23297case "(($ac_try" in
23298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23299 *) ac_try_echo=$ac_try;;
23300esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023302 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023303 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023304 grep -v '^ *+' conftest.er1 >conftest.err
23305 rm -f conftest.er1
23306 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023308 (exit $ac_status); } && {
23309 test -z "$ac_c_werror_flag" ||
23310 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023311 } && test -s conftest$ac_exeext &&
23312 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023313 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000023314else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023315 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023316sed 's/^/| /' conftest.$ac_ext >&5
23317
Martin v. Löwiseba40652007-08-30 20:10:57 +000023318 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000023319fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023320
23321rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023322 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000023323fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023324ac_res=`eval echo '${'$as_ac_var'}'`
23325 { echo "$as_me:$LINENO: result: $ac_res" >&5
23326echo "${ECHO_T}$ac_res" >&6; }
23327if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023328 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023329#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023330_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023331
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023332fi
Thomas Wouters3a584202000-08-05 23:28:51 +000023333done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023334
Michael W. Hudson54241132001-12-07 15:38:26 +000023335
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023336fi
23337
Michael W. Hudson54241132001-12-07 15:38:26 +000023338
23339
23340
23341
23342
23343
Guido van Rossum627b2d71993-12-24 10:39:16 +000023344# checks for system services
23345# (none yet)
23346
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023347# Linux requires this for correct f.p. operations
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023348{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
23349echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023350if test "${ac_cv_func___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023351 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023352else
Martin v. Löwis11437992002-04-12 09:54:03 +000023353 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023354/* confdefs.h. */
23355_ACEOF
23356cat confdefs.h >>conftest.$ac_ext
23357cat >>conftest.$ac_ext <<_ACEOF
23358/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023359/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
23360 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23361#define __fpu_control innocuous___fpu_control
23362
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023363/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023364 which can conflict with char __fpu_control (); below.
23365 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023366 <limits.h> exists even on freestanding compilers. */
23367
23368#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023369# include <limits.h>
23370#else
23371# include <assert.h>
23372#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023373
23374#undef __fpu_control
23375
Martin v. Löwiseba40652007-08-30 20:10:57 +000023376/* Override any GCC internal prototype to avoid an error.
23377 Use char because int might match the return type of a GCC
23378 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023379#ifdef __cplusplus
23380extern "C"
23381#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023382char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023383/* The GNU C library defines this for functions which it implements
23384 to always fail with ENOSYS. Some functions are actually named
23385 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023386#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023387choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023388#endif
23389
Skip Montanaro6dead952003-09-25 14:50:04 +000023390int
23391main ()
23392{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023393return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023394 ;
23395 return 0;
23396}
23397_ACEOF
23398rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023399if { (ac_try="$ac_link"
23400case "(($ac_try" in
23401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23402 *) ac_try_echo=$ac_try;;
23403esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023405 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023406 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023407 grep -v '^ *+' conftest.er1 >conftest.err
23408 rm -f conftest.er1
23409 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023411 (exit $ac_status); } && {
23412 test -z "$ac_c_werror_flag" ||
23413 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023414 } && test -s conftest$ac_exeext &&
23415 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023416 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023417else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023418 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023419sed 's/^/| /' conftest.$ac_ext >&5
23420
Martin v. Löwiseba40652007-08-30 20:10:57 +000023421 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023422fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023423
23424rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023425 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023426fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023427{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
23428echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
23429if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023430 :
23431else
Martin v. Löwis11437992002-04-12 09:54:03 +000023432
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023433{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
23434echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023435if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023436 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023437else
Martin v. Löwis11437992002-04-12 09:54:03 +000023438 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023439LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023440cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023441/* confdefs.h. */
23442_ACEOF
23443cat confdefs.h >>conftest.$ac_ext
23444cat >>conftest.$ac_ext <<_ACEOF
23445/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023446
Martin v. Löwiseba40652007-08-30 20:10:57 +000023447/* Override any GCC internal prototype to avoid an error.
23448 Use char because int might match the return type of a GCC
23449 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023450#ifdef __cplusplus
23451extern "C"
23452#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023453char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023454int
23455main ()
23456{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023457return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023458 ;
23459 return 0;
23460}
23461_ACEOF
23462rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023463if { (ac_try="$ac_link"
23464case "(($ac_try" in
23465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23466 *) ac_try_echo=$ac_try;;
23467esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023468eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023469 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023470 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023471 grep -v '^ *+' conftest.er1 >conftest.err
23472 rm -f conftest.er1
23473 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023475 (exit $ac_status); } && {
23476 test -z "$ac_c_werror_flag" ||
23477 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023478 } && test -s conftest$ac_exeext &&
23479 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023480 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023481else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023482 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023483sed 's/^/| /' conftest.$ac_ext >&5
23484
Martin v. Löwiseba40652007-08-30 20:10:57 +000023485 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023486fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023487
23488rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023489 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023490LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023491fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023492{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23493echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
23494if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023495 cat >>confdefs.h <<_ACEOF
23496#define HAVE_LIBIEEE 1
23497_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023498
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023499 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023500
Guido van Rossum627b2d71993-12-24 10:39:16 +000023501fi
23502
Michael W. Hudson54241132001-12-07 15:38:26 +000023503
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023504fi
23505
Michael W. Hudson54241132001-12-07 15:38:26 +000023506
Guido van Rossum7f253911997-05-09 02:42:48 +000023507# Check for --with-fpectl
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023508{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23509echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023510
Martin v. Löwiseba40652007-08-30 20:10:57 +000023511# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023512if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023513 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023514if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023515then
23516
23517cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023518#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023519_ACEOF
23520
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023521 { echo "$as_me:$LINENO: result: yes" >&5
23522echo "${ECHO_T}yes" >&6; }
23523else { echo "$as_me:$LINENO: result: no" >&5
23524echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023525fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023526else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023527 { echo "$as_me:$LINENO: result: no" >&5
23528echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023529fi
23530
Guido van Rossum7f253911997-05-09 02:42:48 +000023531
Guido van Rossum7f43da71994-08-01 12:15:30 +000023532# check for --with-libm=...
23533
Guido van Rossum563e7081996-09-10 18:20:48 +000023534case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023535Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000023536BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023537*) LIBM=-lm
23538esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023539{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23540echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023541
Martin v. Löwiseba40652007-08-30 20:10:57 +000023542# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023543if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023544 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023545if test "$withval" = no
23546then LIBM=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023547 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
23548echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023549elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023550then LIBM=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023551 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23552echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
23553else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23554echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023555 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023556fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023557else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023558 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23559echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023560fi
23561
Guido van Rossum7f43da71994-08-01 12:15:30 +000023562
23563# check for --with-libc=...
23564
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023565{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23566echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023567
Martin v. Löwiseba40652007-08-30 20:10:57 +000023568# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023569if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023570 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023571if test "$withval" = no
23572then LIBC=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023573 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
23574echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023575elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023576then LIBC=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023577 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23578echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23579else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23580echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023581 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023582fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023583else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023584 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23585echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023586fi
23587
Guido van Rossum7f43da71994-08-01 12:15:30 +000023588
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023589# **************************************************
23590# * Check for various properties of floating point *
23591# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000023592
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023593{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
23594echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
23595if test "${ac_cv_little_endian_double+set}" = set; then
23596 echo $ECHO_N "(cached) $ECHO_C" >&6
23597else
23598
23599if test "$cross_compiling" = yes; then
23600 ac_cv_little_endian_double=no
23601else
23602 cat >conftest.$ac_ext <<_ACEOF
23603/* confdefs.h. */
23604_ACEOF
23605cat confdefs.h >>conftest.$ac_ext
23606cat >>conftest.$ac_ext <<_ACEOF
23607/* end confdefs.h. */
23608
23609#include <string.h>
23610int main() {
23611 double x = 9006104071832581.0;
23612 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
23613 return 0;
23614 else
23615 return 1;
23616}
23617
23618_ACEOF
23619rm -f conftest$ac_exeext
23620if { (ac_try="$ac_link"
23621case "(($ac_try" in
23622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23623 *) ac_try_echo=$ac_try;;
23624esac
23625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23626 (eval "$ac_link") 2>&5
23627 ac_status=$?
23628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23629 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23630 { (case "(($ac_try" in
23631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23632 *) ac_try_echo=$ac_try;;
23633esac
23634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23635 (eval "$ac_try") 2>&5
23636 ac_status=$?
23637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23638 (exit $ac_status); }; }; then
23639 ac_cv_little_endian_double=yes
23640else
23641 echo "$as_me: program exited with status $ac_status" >&5
23642echo "$as_me: failed program was:" >&5
23643sed 's/^/| /' conftest.$ac_ext >&5
23644
23645( exit $ac_status )
23646ac_cv_little_endian_double=no
23647fi
23648rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23649fi
23650
23651
23652fi
23653
23654{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
23655echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
23656if test "$ac_cv_little_endian_double" = yes
23657then
23658
23659cat >>confdefs.h <<\_ACEOF
23660#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
23661_ACEOF
23662
23663fi
23664
23665{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
23666echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
23667if test "${ac_cv_big_endian_double+set}" = set; then
23668 echo $ECHO_N "(cached) $ECHO_C" >&6
23669else
23670
23671if test "$cross_compiling" = yes; then
23672 ac_cv_big_endian_double=no
23673else
23674 cat >conftest.$ac_ext <<_ACEOF
23675/* confdefs.h. */
23676_ACEOF
23677cat confdefs.h >>conftest.$ac_ext
23678cat >>conftest.$ac_ext <<_ACEOF
23679/* end confdefs.h. */
23680
23681#include <string.h>
23682int main() {
23683 double x = 9006104071832581.0;
23684 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
23685 return 0;
23686 else
23687 return 1;
23688}
23689
23690_ACEOF
23691rm -f conftest$ac_exeext
23692if { (ac_try="$ac_link"
23693case "(($ac_try" in
23694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23695 *) ac_try_echo=$ac_try;;
23696esac
23697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23698 (eval "$ac_link") 2>&5
23699 ac_status=$?
23700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23701 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23702 { (case "(($ac_try" in
23703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23704 *) ac_try_echo=$ac_try;;
23705esac
23706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23707 (eval "$ac_try") 2>&5
23708 ac_status=$?
23709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23710 (exit $ac_status); }; }; then
23711 ac_cv_big_endian_double=yes
23712else
23713 echo "$as_me: program exited with status $ac_status" >&5
23714echo "$as_me: failed program was:" >&5
23715sed 's/^/| /' conftest.$ac_ext >&5
23716
23717( exit $ac_status )
23718ac_cv_big_endian_double=no
23719fi
23720rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23721fi
23722
23723
23724fi
23725
23726{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23727echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
23728if test "$ac_cv_big_endian_double" = yes
23729then
23730
23731cat >>confdefs.h <<\_ACEOF
23732#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23733_ACEOF
23734
23735fi
23736
23737# Some ARM platforms use a mixed-endian representation for doubles.
23738# While Python doesn't currently have full support for these platforms
23739# (see e.g., issue 1762561), we can at least make sure that float <-> string
23740# conversions work.
23741{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23742echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
23743if test "${ac_cv_mixed_endian_double+set}" = set; then
23744 echo $ECHO_N "(cached) $ECHO_C" >&6
23745else
23746
23747if test "$cross_compiling" = yes; then
23748 ac_cv_mixed_endian_double=no
23749else
23750 cat >conftest.$ac_ext <<_ACEOF
23751/* confdefs.h. */
23752_ACEOF
23753cat confdefs.h >>conftest.$ac_ext
23754cat >>conftest.$ac_ext <<_ACEOF
23755/* end confdefs.h. */
23756
23757#include <string.h>
23758int main() {
23759 double x = 9006104071832581.0;
23760 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23761 return 0;
23762 else
23763 return 1;
23764}
23765
23766_ACEOF
23767rm -f conftest$ac_exeext
23768if { (ac_try="$ac_link"
23769case "(($ac_try" in
23770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23771 *) ac_try_echo=$ac_try;;
23772esac
23773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23774 (eval "$ac_link") 2>&5
23775 ac_status=$?
23776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23777 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23778 { (case "(($ac_try" in
23779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23780 *) ac_try_echo=$ac_try;;
23781esac
23782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23783 (eval "$ac_try") 2>&5
23784 ac_status=$?
23785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23786 (exit $ac_status); }; }; then
23787 ac_cv_mixed_endian_double=yes
23788else
23789 echo "$as_me: program exited with status $ac_status" >&5
23790echo "$as_me: failed program was:" >&5
23791sed 's/^/| /' conftest.$ac_ext >&5
23792
23793( exit $ac_status )
23794ac_cv_mixed_endian_double=no
23795fi
23796rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23797fi
23798
23799
23800fi
23801
23802{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
23803echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
23804if test "$ac_cv_mixed_endian_double" = yes
23805then
23806
23807cat >>confdefs.h <<\_ACEOF
23808#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
23809_ACEOF
23810
23811fi
23812
23813# The short float repr introduced in Python 3.1 requires the
23814# correctly-rounded string <-> double conversion functions from
23815# Python/dtoa.c, which in turn require that the FPU uses 53-bit
23816# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000023817# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023818# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000023819
23820# This inline assembler syntax may also work for suncc and icc,
23821# so we try it on all platforms.
23822
23823{ 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 +000023824echo $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 +000023825cat >conftest.$ac_ext <<_ACEOF
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023826/* confdefs.h. */
23827_ACEOF
23828cat confdefs.h >>conftest.$ac_ext
23829cat >>conftest.$ac_ext <<_ACEOF
23830/* end confdefs.h. */
23831
23832int
23833main ()
23834{
23835
Mark Dickinsona548dee2009-11-15 13:12:43 +000023836 unsigned short cw;
23837 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
23838 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023839
23840 ;
23841 return 0;
23842}
23843_ACEOF
23844rm -f conftest.$ac_objext
23845if { (ac_try="$ac_compile"
23846case "(($ac_try" in
23847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23848 *) ac_try_echo=$ac_try;;
23849esac
23850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23851 (eval "$ac_compile") 2>conftest.er1
23852 ac_status=$?
23853 grep -v '^ *+' conftest.er1 >conftest.err
23854 rm -f conftest.er1
23855 cat conftest.err >&5
23856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23857 (exit $ac_status); } && {
23858 test -z "$ac_c_werror_flag" ||
23859 test ! -s conftest.err
23860 } && test -s conftest.$ac_objext; then
23861 have_gcc_asm_for_x87=yes
23862else
23863 echo "$as_me: failed program was:" >&5
23864sed 's/^/| /' conftest.$ac_ext >&5
23865
23866 have_gcc_asm_for_x87=no
23867fi
23868
23869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsona548dee2009-11-15 13:12:43 +000023870{ echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023871echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000023872if test "$have_gcc_asm_for_x87" = yes
23873then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023874
23875cat >>confdefs.h <<\_ACEOF
23876#define HAVE_GCC_ASM_FOR_X87 1
23877_ACEOF
23878
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023879fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000023880
Mark Dickinson04b27232009-01-04 12:29:36 +000023881# Detect whether system arithmetic is subject to x87-style double
23882# rounding issues. The result of this test has little meaning on non
23883# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23884# mode is round-to-nearest and double rounding issues are present, and
23885# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023886{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23887echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000023888# $BASECFLAGS may affect the result
23889ac_save_cc="$CC"
23890CC="$CC $BASECFLAGS"
Mark Dickinson04b27232009-01-04 12:29:36 +000023891if test "$cross_compiling" = yes; then
23892 ac_cv_x87_double_rounding=no
23893else
23894 cat >conftest.$ac_ext <<_ACEOF
23895/* confdefs.h. */
23896_ACEOF
23897cat confdefs.h >>conftest.$ac_ext
23898cat >>conftest.$ac_ext <<_ACEOF
23899/* end confdefs.h. */
23900
23901#include <stdlib.h>
23902#include <math.h>
23903int main() {
23904 volatile double x, y, z;
23905 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23906 x = 0.99999999999999989; /* 1-2**-53 */
23907 y = 1./x;
23908 if (y != 1.)
23909 exit(0);
23910 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23911 x = 1e16;
23912 y = 2.99999;
23913 z = x + y;
23914 if (z != 1e16+4.)
23915 exit(0);
23916 /* both tests show evidence of double rounding */
23917 exit(1);
23918}
23919
23920_ACEOF
23921rm -f conftest$ac_exeext
23922if { (ac_try="$ac_link"
23923case "(($ac_try" in
23924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23925 *) ac_try_echo=$ac_try;;
23926esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023927eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023928 (eval "$ac_link") 2>&5
23929 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023931 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23932 { (case "(($ac_try" in
23933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23934 *) ac_try_echo=$ac_try;;
23935esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023937 (eval "$ac_try") 2>&5
23938 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023940 (exit $ac_status); }; }; then
23941 ac_cv_x87_double_rounding=no
23942else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023943 echo "$as_me: program exited with status $ac_status" >&5
23944echo "$as_me: failed program was:" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023945sed 's/^/| /' conftest.$ac_ext >&5
23946
23947( exit $ac_status )
23948ac_cv_x87_double_rounding=yes
23949fi
23950rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23951fi
23952
23953
Mark Dickinson99abd142009-10-24 13:44:16 +000023954CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023955{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23956echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000023957if test "$ac_cv_x87_double_rounding" = yes
23958then
23959
23960cat >>confdefs.h <<\_ACEOF
23961#define X87_DOUBLE_ROUNDING 1
23962_ACEOF
23963
23964fi
23965
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023966# ************************************
23967# * Check for mathematical functions *
23968# ************************************
23969
23970LIBS_SAVE=$LIBS
23971LIBS="$LIBS $LIBM"
23972
Mark Dickinson265d7382008-04-21 22:32:24 +000023973# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23974# -0. on some architectures.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023975{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23976echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000023977if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023978 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000023979else
23980
23981if test "$cross_compiling" = yes; then
23982 ac_cv_tanh_preserves_zero_sign=no
23983else
23984 cat >conftest.$ac_ext <<_ACEOF
23985/* confdefs.h. */
23986_ACEOF
23987cat confdefs.h >>conftest.$ac_ext
23988cat >>conftest.$ac_ext <<_ACEOF
23989/* end confdefs.h. */
23990
23991#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000023992#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000023993int main() {
23994 /* return 0 if either negative zeros don't exist
23995 on this platform or if negative zeros exist
23996 and tanh(-0.) == -0. */
23997 if (atan2(0., -1.) == atan2(-0., -1.) ||
23998 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23999 else exit(1);
24000}
24001
24002_ACEOF
24003rm -f conftest$ac_exeext
24004if { (ac_try="$ac_link"
24005case "(($ac_try" in
24006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24007 *) ac_try_echo=$ac_try;;
24008esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024010 (eval "$ac_link") 2>&5
24011 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024013 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24014 { (case "(($ac_try" in
24015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24016 *) ac_try_echo=$ac_try;;
24017esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024019 (eval "$ac_try") 2>&5
24020 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024022 (exit $ac_status); }; }; then
24023 ac_cv_tanh_preserves_zero_sign=yes
24024else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024025 echo "$as_me: program exited with status $ac_status" >&5
24026echo "$as_me: failed program was:" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024027sed 's/^/| /' conftest.$ac_ext >&5
24028
24029( exit $ac_status )
24030ac_cv_tanh_preserves_zero_sign=no
24031fi
24032rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24033fi
24034
24035
24036fi
24037
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024038{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
24039echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000024040if test "$ac_cv_tanh_preserves_zero_sign" = yes
24041then
24042
24043cat >>confdefs.h <<\_ACEOF
24044#define TANH_PRESERVES_ZERO_SIGN 1
24045_ACEOF
24046
24047fi
24048
Martin v. Löwis11437992002-04-12 09:54:03 +000024049
Guido van Rossum2b3ac691996-08-30 15:18:41 +000024050
Michael W. Hudson54241132001-12-07 15:38:26 +000024051
Christian Heimes0a8143f2007-12-18 23:22:54 +000024052
24053
24054
24055
24056
Mark Dickinson8e5446f2009-04-18 14:41:37 +000024057
Mark Dickinson65898e02009-09-05 10:27:00 +000024058for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
24059do
24060as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24061{ echo "$as_me:$LINENO: checking for $ac_func" >&5
24062echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
24063if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
24064 echo $ECHO_N "(cached) $ECHO_C" >&6
24065else
24066 cat >conftest.$ac_ext <<_ACEOF
24067/* confdefs.h. */
24068_ACEOF
24069cat confdefs.h >>conftest.$ac_ext
24070cat >>conftest.$ac_ext <<_ACEOF
24071/* end confdefs.h. */
24072/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24073 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24074#define $ac_func innocuous_$ac_func
24075
24076/* System header to define __stub macros and hopefully few prototypes,
24077 which can conflict with char $ac_func (); below.
24078 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24079 <limits.h> exists even on freestanding compilers. */
24080
24081#ifdef __STDC__
24082# include <limits.h>
24083#else
24084# include <assert.h>
24085#endif
24086
24087#undef $ac_func
24088
24089/* Override any GCC internal prototype to avoid an error.
24090 Use char because int might match the return type of a GCC
24091 builtin and then its argument prototype would still apply. */
24092#ifdef __cplusplus
24093extern "C"
24094#endif
24095char $ac_func ();
24096/* The GNU C library defines this for functions which it implements
24097 to always fail with ENOSYS. Some functions are actually named
24098 something starting with __ and the normal name is an alias. */
24099#if defined __stub_$ac_func || defined __stub___$ac_func
24100choke me
24101#endif
24102
24103int
24104main ()
24105{
24106return $ac_func ();
24107 ;
24108 return 0;
24109}
24110_ACEOF
24111rm -f conftest.$ac_objext conftest$ac_exeext
24112if { (ac_try="$ac_link"
24113case "(($ac_try" in
24114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24115 *) ac_try_echo=$ac_try;;
24116esac
24117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24118 (eval "$ac_link") 2>conftest.er1
24119 ac_status=$?
24120 grep -v '^ *+' conftest.er1 >conftest.err
24121 rm -f conftest.er1
24122 cat conftest.err >&5
24123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24124 (exit $ac_status); } && {
24125 test -z "$ac_c_werror_flag" ||
24126 test ! -s conftest.err
24127 } && test -s conftest$ac_exeext &&
24128 $as_test_x conftest$ac_exeext; then
24129 eval "$as_ac_var=yes"
24130else
24131 echo "$as_me: failed program was:" >&5
24132sed 's/^/| /' conftest.$ac_ext >&5
24133
24134 eval "$as_ac_var=no"
24135fi
24136
24137rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24138 conftest$ac_exeext conftest.$ac_ext
24139fi
24140ac_res=`eval echo '${'$as_ac_var'}'`
24141 { echo "$as_me:$LINENO: result: $ac_res" >&5
24142echo "${ECHO_T}$ac_res" >&6; }
24143if test `eval echo '${'$as_ac_var'}'` = yes; then
24144 cat >>confdefs.h <<_ACEOF
24145#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24146_ACEOF
24147
24148fi
24149done
24150
24151
24152
24153
24154
24155
24156for ac_func in hypot lgamma log1p round tgamma
Christian Heimes0a8143f2007-12-18 23:22:54 +000024157do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024158as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24159{ echo "$as_me:$LINENO: checking for $ac_func" >&5
24160echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes0a8143f2007-12-18 23:22:54 +000024161if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024162 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes0a8143f2007-12-18 23:22:54 +000024163else
24164 cat >conftest.$ac_ext <<_ACEOF
24165/* confdefs.h. */
24166_ACEOF
24167cat confdefs.h >>conftest.$ac_ext
24168cat >>conftest.$ac_ext <<_ACEOF
24169/* end confdefs.h. */
24170/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24171 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24172#define $ac_func innocuous_$ac_func
24173
24174/* System header to define __stub macros and hopefully few prototypes,
24175 which can conflict with char $ac_func (); below.
24176 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24177 <limits.h> exists even on freestanding compilers. */
24178
24179#ifdef __STDC__
24180# include <limits.h>
24181#else
24182# include <assert.h>
24183#endif
24184
24185#undef $ac_func
24186
24187/* Override any GCC internal prototype to avoid an error.
24188 Use char because int might match the return type of a GCC
24189 builtin and then its argument prototype would still apply. */
24190#ifdef __cplusplus
24191extern "C"
24192#endif
24193char $ac_func ();
24194/* The GNU C library defines this for functions which it implements
24195 to always fail with ENOSYS. Some functions are actually named
24196 something starting with __ and the normal name is an alias. */
24197#if defined __stub_$ac_func || defined __stub___$ac_func
24198choke me
24199#endif
24200
24201int
24202main ()
24203{
24204return $ac_func ();
24205 ;
24206 return 0;
24207}
24208_ACEOF
24209rm -f conftest.$ac_objext conftest$ac_exeext
24210if { (ac_try="$ac_link"
24211case "(($ac_try" in
24212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24213 *) ac_try_echo=$ac_try;;
24214esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024215eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024216 (eval "$ac_link") 2>conftest.er1
24217 ac_status=$?
24218 grep -v '^ *+' conftest.er1 >conftest.err
24219 rm -f conftest.er1
24220 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024222 (exit $ac_status); } && {
24223 test -z "$ac_c_werror_flag" ||
24224 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024225 } && test -s conftest$ac_exeext &&
24226 $as_test_x conftest$ac_exeext; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000024227 eval "$as_ac_var=yes"
24228else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024229 echo "$as_me: failed program was:" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024230sed 's/^/| /' conftest.$ac_ext >&5
24231
24232 eval "$as_ac_var=no"
24233fi
24234
24235rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24236 conftest$ac_exeext conftest.$ac_ext
24237fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024238ac_res=`eval echo '${'$as_ac_var'}'`
24239 { echo "$as_me:$LINENO: result: $ac_res" >&5
24240echo "${ECHO_T}$ac_res" >&6; }
24241if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000024242 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024243#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000024244_ACEOF
24245
24246fi
24247done
24248
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024249{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
24250echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024251if test "${ac_cv_have_decl_isinf+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024252 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024253else
24254 cat >conftest.$ac_ext <<_ACEOF
24255/* confdefs.h. */
24256_ACEOF
24257cat confdefs.h >>conftest.$ac_ext
24258cat >>conftest.$ac_ext <<_ACEOF
24259/* end confdefs.h. */
24260#include <math.h>
24261
24262int
24263main ()
24264{
24265#ifndef isinf
24266 (void) isinf;
24267#endif
24268
24269 ;
24270 return 0;
24271}
24272_ACEOF
24273rm -f conftest.$ac_objext
24274if { (ac_try="$ac_compile"
24275case "(($ac_try" in
24276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24277 *) ac_try_echo=$ac_try;;
24278esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024280 (eval "$ac_compile") 2>conftest.er1
24281 ac_status=$?
24282 grep -v '^ *+' conftest.er1 >conftest.err
24283 rm -f conftest.er1
24284 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024286 (exit $ac_status); } && {
24287 test -z "$ac_c_werror_flag" ||
24288 test ! -s conftest.err
24289 } && test -s conftest.$ac_objext; then
24290 ac_cv_have_decl_isinf=yes
24291else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024292 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024293sed 's/^/| /' conftest.$ac_ext >&5
24294
24295 ac_cv_have_decl_isinf=no
24296fi
24297
24298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24299fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024300{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
24301echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
24302if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024303
24304cat >>confdefs.h <<_ACEOF
24305#define HAVE_DECL_ISINF 1
24306_ACEOF
24307
24308
24309else
24310 cat >>confdefs.h <<_ACEOF
24311#define HAVE_DECL_ISINF 0
24312_ACEOF
24313
24314
24315fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024316{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
24317echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024318if test "${ac_cv_have_decl_isnan+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024319 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024320else
24321 cat >conftest.$ac_ext <<_ACEOF
24322/* confdefs.h. */
24323_ACEOF
24324cat confdefs.h >>conftest.$ac_ext
24325cat >>conftest.$ac_ext <<_ACEOF
24326/* end confdefs.h. */
24327#include <math.h>
24328
24329int
24330main ()
24331{
24332#ifndef isnan
24333 (void) isnan;
24334#endif
24335
24336 ;
24337 return 0;
24338}
24339_ACEOF
24340rm -f conftest.$ac_objext
24341if { (ac_try="$ac_compile"
24342case "(($ac_try" in
24343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24344 *) ac_try_echo=$ac_try;;
24345esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024347 (eval "$ac_compile") 2>conftest.er1
24348 ac_status=$?
24349 grep -v '^ *+' conftest.er1 >conftest.err
24350 rm -f conftest.er1
24351 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024353 (exit $ac_status); } && {
24354 test -z "$ac_c_werror_flag" ||
24355 test ! -s conftest.err
24356 } && test -s conftest.$ac_objext; then
24357 ac_cv_have_decl_isnan=yes
24358else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024359 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024360sed 's/^/| /' conftest.$ac_ext >&5
24361
24362 ac_cv_have_decl_isnan=no
24363fi
24364
24365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24366fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024367{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
24368echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
24369if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024370
24371cat >>confdefs.h <<_ACEOF
24372#define HAVE_DECL_ISNAN 1
24373_ACEOF
24374
24375
24376else
24377 cat >>confdefs.h <<_ACEOF
24378#define HAVE_DECL_ISNAN 0
24379_ACEOF
24380
24381
24382fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024383{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
24384echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024385if test "${ac_cv_have_decl_isfinite+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024386 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024387else
24388 cat >conftest.$ac_ext <<_ACEOF
24389/* confdefs.h. */
24390_ACEOF
24391cat confdefs.h >>conftest.$ac_ext
24392cat >>conftest.$ac_ext <<_ACEOF
24393/* end confdefs.h. */
24394#include <math.h>
24395
24396int
24397main ()
24398{
24399#ifndef isfinite
24400 (void) isfinite;
24401#endif
24402
24403 ;
24404 return 0;
24405}
24406_ACEOF
24407rm -f conftest.$ac_objext
24408if { (ac_try="$ac_compile"
24409case "(($ac_try" in
24410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24411 *) ac_try_echo=$ac_try;;
24412esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024414 (eval "$ac_compile") 2>conftest.er1
24415 ac_status=$?
24416 grep -v '^ *+' conftest.er1 >conftest.err
24417 rm -f conftest.er1
24418 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024420 (exit $ac_status); } && {
24421 test -z "$ac_c_werror_flag" ||
24422 test ! -s conftest.err
24423 } && test -s conftest.$ac_objext; then
24424 ac_cv_have_decl_isfinite=yes
24425else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024426 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024427sed 's/^/| /' conftest.$ac_ext >&5
24428
24429 ac_cv_have_decl_isfinite=no
24430fi
24431
24432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24433fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024434{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
24435echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
24436if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024437
24438cat >>confdefs.h <<_ACEOF
24439#define HAVE_DECL_ISFINITE 1
24440_ACEOF
24441
24442
24443else
24444 cat >>confdefs.h <<_ACEOF
24445#define HAVE_DECL_ISFINITE 0
24446_ACEOF
24447
24448
24449fi
24450
24451
Christian Heimes0a8143f2007-12-18 23:22:54 +000024452
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000024453LIBS=$LIBS_SAVE
24454
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024455# For multiprocessing module, check that sem_open
24456# actually works. For FreeBSD versions <= 7.2,
24457# the kernel module that provides POSIX semaphores
24458# isn't loaded by default, so an attempt to call
24459# sem_open results in a 'Signal 12' error.
24460{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
24461echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
24462if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
24463 echo $ECHO_N "(cached) $ECHO_C" >&6
24464else
24465 if test "$cross_compiling" = yes; then
24466 ac_cv_posix_semaphores_enabled=yes
24467else
24468 cat >conftest.$ac_ext <<_ACEOF
24469/* confdefs.h. */
24470_ACEOF
24471cat confdefs.h >>conftest.$ac_ext
24472cat >>conftest.$ac_ext <<_ACEOF
24473/* end confdefs.h. */
24474
24475#include <unistd.h>
24476#include <fcntl.h>
24477#include <stdio.h>
24478#include <semaphore.h>
24479#include <sys/stat.h>
24480
24481int main(void) {
24482 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
24483 if (a == SEM_FAILED) {
24484 perror("sem_open");
24485 return 1;
24486 }
24487 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024488 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024489 return 0;
24490}
24491
24492_ACEOF
24493rm -f conftest$ac_exeext
24494if { (ac_try="$ac_link"
24495case "(($ac_try" in
24496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24497 *) ac_try_echo=$ac_try;;
24498esac
24499eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24500 (eval "$ac_link") 2>&5
24501 ac_status=$?
24502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24503 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24504 { (case "(($ac_try" in
24505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24506 *) ac_try_echo=$ac_try;;
24507esac
24508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24509 (eval "$ac_try") 2>&5
24510 ac_status=$?
24511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24512 (exit $ac_status); }; }; then
24513 ac_cv_posix_semaphores_enabled=yes
24514else
24515 echo "$as_me: program exited with status $ac_status" >&5
24516echo "$as_me: failed program was:" >&5
24517sed 's/^/| /' conftest.$ac_ext >&5
24518
24519( exit $ac_status )
24520ac_cv_posix_semaphores_enabled=no
24521fi
24522rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24523fi
24524
24525
24526
24527fi
24528
24529{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
24530echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
24531if test $ac_cv_posix_semaphores_enabled = no
24532then
24533
24534cat >>confdefs.h <<\_ACEOF
24535#define POSIX_SEMAPHORES_NOT_ENABLED 1
24536_ACEOF
24537
24538fi
24539
24540# Multiprocessing check for broken sem_getvalue
24541{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
24542echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
24543if test "${ac_cv_broken_sem_getvalue+set}" = set; then
24544 echo $ECHO_N "(cached) $ECHO_C" >&6
24545else
24546 if test "$cross_compiling" = yes; then
24547 ac_cv_broken_sem_getvalue=yes
24548else
24549 cat >conftest.$ac_ext <<_ACEOF
24550/* confdefs.h. */
24551_ACEOF
24552cat confdefs.h >>conftest.$ac_ext
24553cat >>conftest.$ac_ext <<_ACEOF
24554/* end confdefs.h. */
24555
24556#include <unistd.h>
24557#include <fcntl.h>
24558#include <stdio.h>
24559#include <semaphore.h>
24560#include <sys/stat.h>
24561
24562int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024563 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024564 int count;
24565 int res;
24566 if(a==SEM_FAILED){
24567 perror("sem_open");
24568 return 1;
24569
24570 }
24571 res = sem_getvalue(a, &count);
24572 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024573 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024574 return res==-1 ? 1 : 0;
24575}
24576
24577_ACEOF
24578rm -f conftest$ac_exeext
24579if { (ac_try="$ac_link"
24580case "(($ac_try" in
24581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24582 *) ac_try_echo=$ac_try;;
24583esac
24584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24585 (eval "$ac_link") 2>&5
24586 ac_status=$?
24587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24588 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24589 { (case "(($ac_try" in
24590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24591 *) ac_try_echo=$ac_try;;
24592esac
24593eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24594 (eval "$ac_try") 2>&5
24595 ac_status=$?
24596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24597 (exit $ac_status); }; }; then
24598 ac_cv_broken_sem_getvalue=no
24599else
24600 echo "$as_me: program exited with status $ac_status" >&5
24601echo "$as_me: failed program was:" >&5
24602sed 's/^/| /' conftest.$ac_ext >&5
24603
24604( exit $ac_status )
24605ac_cv_broken_sem_getvalue=yes
24606fi
24607rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24608fi
24609
24610
24611
24612fi
24613
24614{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
24615echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
24616if test $ac_cv_broken_sem_getvalue = yes
24617then
24618
24619cat >>confdefs.h <<\_ACEOF
24620#define HAVE_BROKEN_SEM_GETVALUE 1
24621_ACEOF
24622
24623fi
24624
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024625# determine what size digit to use for Python's longs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024626{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
24627echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024628# Check whether --enable-big-digits was given.
24629if test "${enable_big_digits+set}" = set; then
24630 enableval=$enable_big_digits; case $enable_big_digits in
24631yes)
24632 enable_big_digits=30 ;;
24633no)
24634 enable_big_digits=15 ;;
2463515|30)
24636 ;;
24637*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024638 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
24639echo "$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 +000024640 { (exit 1); exit 1; }; } ;;
24641esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024642{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
24643echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024644
24645cat >>confdefs.h <<_ACEOF
24646#define PYLONG_BITS_IN_DIGIT $enable_big_digits
24647_ACEOF
24648
24649
24650else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024651 { echo "$as_me:$LINENO: result: no value specified" >&5
24652echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024653fi
24654
24655
Guido van Rossumef2255b2000-03-10 22:30:29 +000024656# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000024657if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024658 { echo "$as_me:$LINENO: checking for wchar.h" >&5
24659echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024660if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024661 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024662fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024663{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24664echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024665else
Martin v. Löwis11437992002-04-12 09:54:03 +000024666 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024667{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
24668echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024669cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024670/* confdefs.h. */
24671_ACEOF
24672cat confdefs.h >>conftest.$ac_ext
24673cat >>conftest.$ac_ext <<_ACEOF
24674/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024675$ac_includes_default
24676#include <wchar.h>
24677_ACEOF
24678rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024679if { (ac_try="$ac_compile"
24680case "(($ac_try" in
24681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24682 *) ac_try_echo=$ac_try;;
24683esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024684eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024685 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024686 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024687 grep -v '^ *+' conftest.er1 >conftest.err
24688 rm -f conftest.er1
24689 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024691 (exit $ac_status); } && {
24692 test -z "$ac_c_werror_flag" ||
24693 test ! -s conftest.err
24694 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024695 ac_header_compiler=yes
24696else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024697 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024698sed 's/^/| /' conftest.$ac_ext >&5
24699
Martin v. Löwiseba40652007-08-30 20:10:57 +000024700 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000024701fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024702
24703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024704{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24705echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024706
24707# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024708{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
24709echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024710cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024711/* confdefs.h. */
24712_ACEOF
24713cat confdefs.h >>conftest.$ac_ext
24714cat >>conftest.$ac_ext <<_ACEOF
24715/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024716#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024717_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024718if { (ac_try="$ac_cpp conftest.$ac_ext"
24719case "(($ac_try" in
24720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24721 *) ac_try_echo=$ac_try;;
24722esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024724 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024725 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024726 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024727 rm -f conftest.er1
24728 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024730 (exit $ac_status); } >/dev/null && {
24731 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24732 test ! -s conftest.err
24733 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024734 ac_header_preproc=yes
24735else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024736 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024737sed 's/^/| /' conftest.$ac_ext >&5
24738
Martin v. Löwis11437992002-04-12 09:54:03 +000024739 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024740fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024741
Martin v. Löwis11437992002-04-12 09:54:03 +000024742rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024743{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24744echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024745
24746# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024747case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24748 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024749 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24750echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24751 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24752echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024753 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024754 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024755 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024756 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24757echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24758 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24759echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24760 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24761echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24762 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24763echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24764 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24765echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24766 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24767echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000024768 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000024769## -------------------------------------- ##
24770## Report this to http://bugs.python.org/ ##
24771## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024772_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000024773 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024774 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024775esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024776{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24777echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024778if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024779 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024780else
24781 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024782fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024783{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24784echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024785
24786fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024787if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024788
24789
24790cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024791#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024792_ACEOF
24793
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024794 wchar_h="yes"
24795
Guido van Rossumef2255b2000-03-10 22:30:29 +000024796else
Martin v. Löwis11437992002-04-12 09:54:03 +000024797 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000024798
24799fi
24800
Michael W. Hudson54241132001-12-07 15:38:26 +000024801
Martin v. Löwis11437992002-04-12 09:54:03 +000024802
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024803# determine wchar_t size
24804if test "$wchar_h" = yes
24805then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024806 { echo "$as_me:$LINENO: checking for wchar_t" >&5
24807echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
24808if test "${ac_cv_type_wchar_t+set}" = set; then
24809 echo $ECHO_N "(cached) $ECHO_C" >&6
24810else
24811 cat >conftest.$ac_ext <<_ACEOF
24812/* confdefs.h. */
24813_ACEOF
24814cat confdefs.h >>conftest.$ac_ext
24815cat >>conftest.$ac_ext <<_ACEOF
24816/* end confdefs.h. */
24817#include <wchar.h>
24818
24819typedef wchar_t ac__type_new_;
24820int
24821main ()
24822{
24823if ((ac__type_new_ *) 0)
24824 return 0;
24825if (sizeof (ac__type_new_))
24826 return 0;
24827 ;
24828 return 0;
24829}
24830_ACEOF
24831rm -f conftest.$ac_objext
24832if { (ac_try="$ac_compile"
24833case "(($ac_try" in
24834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24835 *) ac_try_echo=$ac_try;;
24836esac
24837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24838 (eval "$ac_compile") 2>conftest.er1
24839 ac_status=$?
24840 grep -v '^ *+' conftest.er1 >conftest.err
24841 rm -f conftest.er1
24842 cat conftest.err >&5
24843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24844 (exit $ac_status); } && {
24845 test -z "$ac_c_werror_flag" ||
24846 test ! -s conftest.err
24847 } && test -s conftest.$ac_objext; then
24848 ac_cv_type_wchar_t=yes
24849else
24850 echo "$as_me: failed program was:" >&5
24851sed 's/^/| /' conftest.$ac_ext >&5
24852
24853 ac_cv_type_wchar_t=no
24854fi
24855
24856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24857fi
24858{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
24859echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
24860
24861# The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000024862# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24863# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24864# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024865{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
24866echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024867if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024868 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024869else
Martin v. Löwis11437992002-04-12 09:54:03 +000024870 if test "$cross_compiling" = yes; then
24871 # Depending upon the size, compute the lo and hi bounds.
24872cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024873/* confdefs.h. */
24874_ACEOF
24875cat confdefs.h >>conftest.$ac_ext
24876cat >>conftest.$ac_ext <<_ACEOF
24877/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024878#include <wchar.h>
24879
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024880 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024881int
24882main ()
24883{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024884static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024885test_array [0] = 0
24886
24887 ;
24888 return 0;
24889}
24890_ACEOF
24891rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024892if { (ac_try="$ac_compile"
24893case "(($ac_try" in
24894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24895 *) ac_try_echo=$ac_try;;
24896esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024898 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024899 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024900 grep -v '^ *+' conftest.er1 >conftest.err
24901 rm -f conftest.er1
24902 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024904 (exit $ac_status); } && {
24905 test -z "$ac_c_werror_flag" ||
24906 test ! -s conftest.err
24907 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024908 ac_lo=0 ac_mid=0
24909 while :; do
24910 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024911/* confdefs.h. */
24912_ACEOF
24913cat confdefs.h >>conftest.$ac_ext
24914cat >>conftest.$ac_ext <<_ACEOF
24915/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024916#include <wchar.h>
24917
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024918 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024919int
24920main ()
24921{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024922static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024923test_array [0] = 0
24924
24925 ;
24926 return 0;
24927}
24928_ACEOF
24929rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024930if { (ac_try="$ac_compile"
24931case "(($ac_try" in
24932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24933 *) ac_try_echo=$ac_try;;
24934esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024936 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024937 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024938 grep -v '^ *+' conftest.er1 >conftest.err
24939 rm -f conftest.er1
24940 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024942 (exit $ac_status); } && {
24943 test -z "$ac_c_werror_flag" ||
24944 test ! -s conftest.err
24945 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024946 ac_hi=$ac_mid; break
24947else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024948 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024949sed 's/^/| /' conftest.$ac_ext >&5
24950
Martin v. Löwiseba40652007-08-30 20:10:57 +000024951 ac_lo=`expr $ac_mid + 1`
24952 if test $ac_lo -le $ac_mid; then
24953 ac_lo= ac_hi=
24954 break
24955 fi
24956 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024957fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024958
24959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024960 done
24961else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024962 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024963sed 's/^/| /' conftest.$ac_ext >&5
24964
Martin v. Löwiseba40652007-08-30 20:10:57 +000024965 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024966/* confdefs.h. */
24967_ACEOF
24968cat confdefs.h >>conftest.$ac_ext
24969cat >>conftest.$ac_ext <<_ACEOF
24970/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024971#include <wchar.h>
24972
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024973 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024974int
24975main ()
24976{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024977static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024978test_array [0] = 0
24979
24980 ;
24981 return 0;
24982}
24983_ACEOF
24984rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024985if { (ac_try="$ac_compile"
24986case "(($ac_try" in
24987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24988 *) ac_try_echo=$ac_try;;
24989esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024991 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024992 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024993 grep -v '^ *+' conftest.er1 >conftest.err
24994 rm -f conftest.er1
24995 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024997 (exit $ac_status); } && {
24998 test -z "$ac_c_werror_flag" ||
24999 test ! -s conftest.err
25000 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025001 ac_hi=-1 ac_mid=-1
25002 while :; do
25003 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025004/* confdefs.h. */
25005_ACEOF
25006cat confdefs.h >>conftest.$ac_ext
25007cat >>conftest.$ac_ext <<_ACEOF
25008/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025009#include <wchar.h>
25010
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025011 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025012int
25013main ()
25014{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025015static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025016test_array [0] = 0
25017
25018 ;
25019 return 0;
25020}
25021_ACEOF
25022rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025023if { (ac_try="$ac_compile"
25024case "(($ac_try" in
25025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25026 *) ac_try_echo=$ac_try;;
25027esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025028eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025029 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025030 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025031 grep -v '^ *+' conftest.er1 >conftest.err
25032 rm -f conftest.er1
25033 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025035 (exit $ac_status); } && {
25036 test -z "$ac_c_werror_flag" ||
25037 test ! -s conftest.err
25038 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025039 ac_lo=$ac_mid; break
25040else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025041 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025042sed 's/^/| /' conftest.$ac_ext >&5
25043
Martin v. Löwiseba40652007-08-30 20:10:57 +000025044 ac_hi=`expr '(' $ac_mid ')' - 1`
25045 if test $ac_mid -le $ac_hi; then
25046 ac_lo= ac_hi=
25047 break
25048 fi
25049 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000025050fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025051
25052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025053 done
25054else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025055 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025056sed 's/^/| /' conftest.$ac_ext >&5
25057
Martin v. Löwiseba40652007-08-30 20:10:57 +000025058 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000025059fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025060
25061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025062fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025063
25064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025065# Binary search between lo and hi bounds.
25066while test "x$ac_lo" != "x$ac_hi"; do
25067 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25068 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025069/* confdefs.h. */
25070_ACEOF
25071cat confdefs.h >>conftest.$ac_ext
25072cat >>conftest.$ac_ext <<_ACEOF
25073/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025074#include <wchar.h>
25075
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025076 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025077int
25078main ()
25079{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025080static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025081test_array [0] = 0
25082
25083 ;
25084 return 0;
25085}
25086_ACEOF
25087rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025088if { (ac_try="$ac_compile"
25089case "(($ac_try" in
25090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25091 *) ac_try_echo=$ac_try;;
25092esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025094 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025095 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025096 grep -v '^ *+' conftest.er1 >conftest.err
25097 rm -f conftest.er1
25098 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025100 (exit $ac_status); } && {
25101 test -z "$ac_c_werror_flag" ||
25102 test ! -s conftest.err
25103 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025104 ac_hi=$ac_mid
25105else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025106 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025107sed 's/^/| /' conftest.$ac_ext >&5
25108
Martin v. Löwiseba40652007-08-30 20:10:57 +000025109 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000025110fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025111
25112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025113done
25114case $ac_lo in
25115?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025116'') if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025117 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025118See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025119echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025120See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025121 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025122 else
25123 ac_cv_sizeof_wchar_t=0
25124 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025125esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025126else
Martin v. Löwis11437992002-04-12 09:54:03 +000025127 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025128/* confdefs.h. */
25129_ACEOF
25130cat confdefs.h >>conftest.$ac_ext
25131cat >>conftest.$ac_ext <<_ACEOF
25132/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025133#include <wchar.h>
25134
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025135 typedef wchar_t ac__type_sizeof_;
25136static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
25137static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000025138#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025139#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025140int
25141main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025142{
Martin v. Löwis11437992002-04-12 09:54:03 +000025143
25144 FILE *f = fopen ("conftest.val", "w");
25145 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000025146 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025147 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000025148 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000025149 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025150 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000025151 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025152 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000025153 }
25154 else
25155 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000025156 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025157 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000025158 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025159 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000025160 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025161 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000025162
25163 ;
25164 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025165}
Martin v. Löwis11437992002-04-12 09:54:03 +000025166_ACEOF
25167rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025168if { (ac_try="$ac_link"
25169case "(($ac_try" in
25170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25171 *) ac_try_echo=$ac_try;;
25172esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025174 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025175 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025177 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025178 { (case "(($ac_try" in
25179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25180 *) ac_try_echo=$ac_try;;
25181esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025183 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025184 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025186 (exit $ac_status); }; }; then
25187 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000025188else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025189 echo "$as_me: program exited with status $ac_status" >&5
25190echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025191sed 's/^/| /' conftest.$ac_ext >&5
25192
Martin v. Löwis11437992002-04-12 09:54:03 +000025193( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000025194if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025195 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025196See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025197echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025198See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025199 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025200 else
25201 ac_cv_sizeof_wchar_t=0
25202 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025203fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025204rm -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 +000025205fi
25206rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000025207fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025208{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
25209echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025210
25211
25212
Martin v. Löwis11437992002-04-12 09:54:03 +000025213cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025214#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025215_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025216
Michael W. Hudson54241132001-12-07 15:38:26 +000025217
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025218fi
25219
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025220{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
25221echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025222have_ucs4_tcl=no
25223cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025224/* confdefs.h. */
25225_ACEOF
25226cat confdefs.h >>conftest.$ac_ext
25227cat >>conftest.$ac_ext <<_ACEOF
25228/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025229
25230#include <tcl.h>
25231#if TCL_UTF_MAX != 6
25232# error "NOT UCS4_TCL"
25233#endif
25234int
25235main ()
25236{
25237
25238 ;
25239 return 0;
25240}
25241_ACEOF
25242rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025243if { (ac_try="$ac_compile"
25244case "(($ac_try" in
25245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25246 *) ac_try_echo=$ac_try;;
25247esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025249 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025250 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025251 grep -v '^ *+' conftest.er1 >conftest.err
25252 rm -f conftest.er1
25253 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025255 (exit $ac_status); } && {
25256 test -z "$ac_c_werror_flag" ||
25257 test ! -s conftest.err
25258 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025259
25260
25261cat >>confdefs.h <<\_ACEOF
25262#define HAVE_UCS4_TCL 1
25263_ACEOF
25264
25265 have_ucs4_tcl=yes
25266
25267else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025268 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025269sed 's/^/| /' conftest.$ac_ext >&5
25270
Martin v. Löwiseba40652007-08-30 20:10:57 +000025271
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025272fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025273
25274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025275{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
25276echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025277
Skip Montanaro6dead952003-09-25 14:50:04 +000025278# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025279if test "$wchar_h" = yes
25280then
25281 # check whether wchar_t is signed or not
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025282 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
25283echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025284 if test "${ac_cv_wchar_t_signed+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025285 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025286else
25287
25288 if test "$cross_compiling" = yes; then
25289 ac_cv_wchar_t_signed=yes
25290else
25291 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025292/* confdefs.h. */
25293_ACEOF
25294cat confdefs.h >>conftest.$ac_ext
25295cat >>conftest.$ac_ext <<_ACEOF
25296/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025297
25298 #include <wchar.h>
25299 int main()
25300 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000025301 /* Success: exit code 0 */
25302 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025303 }
25304
25305_ACEOF
25306rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025307if { (ac_try="$ac_link"
25308case "(($ac_try" in
25309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25310 *) ac_try_echo=$ac_try;;
25311esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025312eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025313 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025314 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025316 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025317 { (case "(($ac_try" in
25318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25319 *) ac_try_echo=$ac_try;;
25320esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025322 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025323 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025325 (exit $ac_status); }; }; then
25326 ac_cv_wchar_t_signed=yes
25327else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025328 echo "$as_me: program exited with status $ac_status" >&5
25329echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025330sed 's/^/| /' conftest.$ac_ext >&5
25331
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025332( exit $ac_status )
25333ac_cv_wchar_t_signed=no
25334fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025335rm -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 +000025336fi
25337
Martin v. Löwiseba40652007-08-30 20:10:57 +000025338
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025339fi
25340
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025341 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
25342echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025343fi
25344
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025345{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
25346echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025347# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025348if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025349 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025350else
25351 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000025352fi
25353
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025354
25355if test $enable_unicode = yes
25356then
Martin v. Löwisfd917792001-06-27 20:22:04 +000025357 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025358 case "$have_ucs4_tcl" in
25359 yes) enable_unicode="ucs4"
25360 ;;
25361 *) enable_unicode="ucs2"
25362 ;;
25363 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025364fi
25365
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025366
25367
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025368case "$enable_unicode" in
25369ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000025370 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025371#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000025372_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025373
25374 ;;
25375ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000025376 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025377#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000025378_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025379
25380 ;;
25381esac
25382
Michael W. Hudson54241132001-12-07 15:38:26 +000025383
Martin v. Löwis11437992002-04-12 09:54:03 +000025384
25385
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025386
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025387if test "$enable_unicode" = "no"
25388then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000025389 UNICODE_OBJS=""
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025390 { echo "$as_me:$LINENO: result: not used" >&5
25391echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025392else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000025393 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000025394
25395cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025396#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025397_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025398
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025399
25400 # wchar_t is only usable if it maps to an unsigned type
25401 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000025402 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025403 then
25404 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025405
Martin v. Löwis11437992002-04-12 09:54:03 +000025406cat >>confdefs.h <<\_ACEOF
25407#define HAVE_USABLE_WCHAR_T 1
25408_ACEOF
25409
25410 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025411#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025412_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025413
25414 elif test "$ac_cv_sizeof_short" = "$unicode_size"
25415 then
25416 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000025417 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025418#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000025419_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025420
25421 elif test "$ac_cv_sizeof_long" = "$unicode_size"
25422 then
25423 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000025424 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025425#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000025426_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025427
25428 else
25429 PY_UNICODE_TYPE="no type found"
25430 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025431 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
25432echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025433fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000025434
25435# check for endianness
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025436{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
25437echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025438if test "${ac_cv_c_bigendian+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025439 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000025440else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025441 # See if sys/param.h defines the BYTE_ORDER macro.
25442cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025443/* confdefs.h. */
25444_ACEOF
25445cat confdefs.h >>conftest.$ac_ext
25446cat >>conftest.$ac_ext <<_ACEOF
25447/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025448#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025449#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025450
Martin v. Löwis11437992002-04-12 09:54:03 +000025451int
25452main ()
25453{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025454#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
25455 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
25456 bogus endian macros
25457#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025458
25459 ;
25460 return 0;
25461}
25462_ACEOF
25463rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025464if { (ac_try="$ac_compile"
25465case "(($ac_try" in
25466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25467 *) ac_try_echo=$ac_try;;
25468esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025470 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025471 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025472 grep -v '^ *+' conftest.er1 >conftest.err
25473 rm -f conftest.er1
25474 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025476 (exit $ac_status); } && {
25477 test -z "$ac_c_werror_flag" ||
25478 test ! -s conftest.err
25479 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025480 # It does; now see whether it defined to BIG_ENDIAN or not.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025481cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025482/* confdefs.h. */
25483_ACEOF
25484cat confdefs.h >>conftest.$ac_ext
25485cat >>conftest.$ac_ext <<_ACEOF
25486/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025487#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025488#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025489
Martin v. Löwis11437992002-04-12 09:54:03 +000025490int
25491main ()
25492{
Guido van Rossumef2255b2000-03-10 22:30:29 +000025493#if BYTE_ORDER != BIG_ENDIAN
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025494 not big endian
25495#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025496
25497 ;
25498 return 0;
25499}
25500_ACEOF
25501rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025502if { (ac_try="$ac_compile"
25503case "(($ac_try" in
25504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25505 *) ac_try_echo=$ac_try;;
25506esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025508 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025509 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025510 grep -v '^ *+' conftest.er1 >conftest.err
25511 rm -f conftest.er1
25512 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025514 (exit $ac_status); } && {
25515 test -z "$ac_c_werror_flag" ||
25516 test ! -s conftest.err
25517 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025518 ac_cv_c_bigendian=yes
25519else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025520 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025521sed 's/^/| /' conftest.$ac_ext >&5
25522
Martin v. Löwiseba40652007-08-30 20:10:57 +000025523 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000025524fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025525
25526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000025527else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025528 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025529sed 's/^/| /' conftest.$ac_ext >&5
25530
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025531 # It does not; compile a test program.
25532if test "$cross_compiling" = yes; then
25533 # try to guess the endianness by grepping values into an object file
25534 ac_cv_c_bigendian=unknown
25535 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025536/* confdefs.h. */
25537_ACEOF
25538cat confdefs.h >>conftest.$ac_ext
25539cat >>conftest.$ac_ext <<_ACEOF
25540/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025541short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
25542short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
25543void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
25544short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
25545short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
25546void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025547int
25548main ()
25549{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025550 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025551 ;
25552 return 0;
25553}
25554_ACEOF
25555rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025556if { (ac_try="$ac_compile"
25557case "(($ac_try" in
25558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25559 *) ac_try_echo=$ac_try;;
25560esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025562 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025563 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025564 grep -v '^ *+' conftest.er1 >conftest.err
25565 rm -f conftest.er1
25566 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025568 (exit $ac_status); } && {
25569 test -z "$ac_c_werror_flag" ||
25570 test ! -s conftest.err
25571 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025572 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025573 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025574fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025575if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
25576 if test "$ac_cv_c_bigendian" = unknown; then
25577 ac_cv_c_bigendian=no
25578 else
25579 # finding both strings is unlikely to happen, but who knows?
25580 ac_cv_c_bigendian=unknown
25581 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025582fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025583else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025584 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025585sed 's/^/| /' conftest.$ac_ext >&5
25586
Martin v. Löwiseba40652007-08-30 20:10:57 +000025587
Martin v. Löwis11437992002-04-12 09:54:03 +000025588fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025589
25590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025591else
25592 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025593/* confdefs.h. */
25594_ACEOF
25595cat confdefs.h >>conftest.$ac_ext
25596cat >>conftest.$ac_ext <<_ACEOF
25597/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000025598$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000025599int
25600main ()
25601{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025602
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025603 /* Are we little or big endian? From Harbison&Steele. */
25604 union
25605 {
25606 long int l;
25607 char c[sizeof (long int)];
25608 } u;
25609 u.l = 1;
25610 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025611
25612 ;
25613 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025614}
Martin v. Löwis11437992002-04-12 09:54:03 +000025615_ACEOF
25616rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025617if { (ac_try="$ac_link"
25618case "(($ac_try" in
25619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25620 *) ac_try_echo=$ac_try;;
25621esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025623 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025624 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025626 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025627 { (case "(($ac_try" in
25628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25629 *) ac_try_echo=$ac_try;;
25630esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025632 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025633 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025635 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025636 ac_cv_c_bigendian=no
25637else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025638 echo "$as_me: program exited with status $ac_status" >&5
25639echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025640sed 's/^/| /' conftest.$ac_ext >&5
25641
Martin v. Löwis11437992002-04-12 09:54:03 +000025642( exit $ac_status )
25643ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000025644fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025645rm -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 +000025646fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025647
25648
Martin v. Löwis11437992002-04-12 09:54:03 +000025649fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025650
25651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25652fi
25653{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
25654echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
25655case $ac_cv_c_bigendian in
25656 yes)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025657
25658cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025659#define WORDS_BIGENDIAN 1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025660_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025661 ;;
25662 no)
25663 ;;
25664 *)
25665 { { echo "$as_me:$LINENO: error: unknown endianness
25666presetting ac_cv_c_bigendian=no (or yes) will help" >&5
25667echo "$as_me: error: unknown endianness
25668presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025669 { (exit 1); exit 1; }; } ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025670esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000025671
Michael W. Hudson54241132001-12-07 15:38:26 +000025672
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025673# Check whether right shifting a negative integer extends the sign bit
25674# or fills with zeros (like the Cray J90, according to Tim Peters).
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025675{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
25676echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025677if test "${ac_cv_rshift_extends_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025678 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000025679else
Martin v. Löwis11437992002-04-12 09:54:03 +000025680
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025681if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025682 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025683else
Martin v. Löwis11437992002-04-12 09:54:03 +000025684 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025685/* confdefs.h. */
25686_ACEOF
25687cat confdefs.h >>conftest.$ac_ext
25688cat >>conftest.$ac_ext <<_ACEOF
25689/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025690
25691int main()
25692{
Vladimir Marangozova6180282000-07-12 05:05:06 +000025693 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025694}
25695
Martin v. Löwis11437992002-04-12 09:54:03 +000025696_ACEOF
25697rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025698if { (ac_try="$ac_link"
25699case "(($ac_try" in
25700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25701 *) ac_try_echo=$ac_try;;
25702esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025704 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025705 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025707 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025708 { (case "(($ac_try" in
25709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25710 *) ac_try_echo=$ac_try;;
25711esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025713 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025714 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025716 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000025717 ac_cv_rshift_extends_sign=yes
25718else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025719 echo "$as_me: program exited with status $ac_status" >&5
25720echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025721sed 's/^/| /' conftest.$ac_ext >&5
25722
Martin v. Löwis11437992002-04-12 09:54:03 +000025723( exit $ac_status )
25724ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000025725fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025726rm -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 +000025727fi
25728
Martin v. Löwiseba40652007-08-30 20:10:57 +000025729
25730fi
25731
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025732{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25733echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025734if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025735then
Martin v. Löwis11437992002-04-12 09:54:03 +000025736
25737cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025738#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025739_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025740
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025741fi
25742
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025743# check for getc_unlocked and related locking functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025744{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25745echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025746if test "${ac_cv_have_getc_unlocked+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025747 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025748else
Martin v. Löwis11437992002-04-12 09:54:03 +000025749
25750cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025751/* confdefs.h. */
25752_ACEOF
25753cat confdefs.h >>conftest.$ac_ext
25754cat >>conftest.$ac_ext <<_ACEOF
25755/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025756#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025757int
25758main ()
25759{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025760
25761 FILE *f = fopen("/dev/null", "r");
25762 flockfile(f);
25763 getc_unlocked(f);
25764 funlockfile(f);
25765
Martin v. Löwis11437992002-04-12 09:54:03 +000025766 ;
25767 return 0;
25768}
25769_ACEOF
25770rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025771if { (ac_try="$ac_link"
25772case "(($ac_try" in
25773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25774 *) ac_try_echo=$ac_try;;
25775esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025777 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025778 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025779 grep -v '^ *+' conftest.er1 >conftest.err
25780 rm -f conftest.er1
25781 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025783 (exit $ac_status); } && {
25784 test -z "$ac_c_werror_flag" ||
25785 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025786 } && test -s conftest$ac_exeext &&
25787 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025788 ac_cv_have_getc_unlocked=yes
25789else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025790 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025791sed 's/^/| /' conftest.$ac_ext >&5
25792
Martin v. Löwiseba40652007-08-30 20:10:57 +000025793 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025794fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025795
25796rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025797 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025798fi
25799
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025800{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
25801echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025802if test "$ac_cv_have_getc_unlocked" = yes
25803then
Martin v. Löwis11437992002-04-12 09:54:03 +000025804
25805cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025806#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025807_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025808
25809fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025810
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025811# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000025812# save the value of LIBS so we don't actually link Python with readline
25813LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025814
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025815# On some systems we need to link readline to a termcap compatible
25816# library. NOTE: Keep the precedence of listed libraries synchronised
25817# with setup.py.
25818py_cv_lib_readline=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025819{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
25820echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025821for py_libtermcap in "" ncursesw ncurses curses termcap; do
25822 if test -z "$py_libtermcap"; then
25823 READLINE_LIBS="-lreadline"
25824 else
25825 READLINE_LIBS="-lreadline -l$py_libtermcap"
25826 fi
25827 LIBS="$READLINE_LIBS $LIBS_no_readline"
25828 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025829/* confdefs.h. */
25830_ACEOF
25831cat confdefs.h >>conftest.$ac_ext
25832cat >>conftest.$ac_ext <<_ACEOF
25833/* end confdefs.h. */
25834
Martin v. Löwiseba40652007-08-30 20:10:57 +000025835/* Override any GCC internal prototype to avoid an error.
25836 Use char because int might match the return type of a GCC
25837 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025838#ifdef __cplusplus
25839extern "C"
25840#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025841char readline ();
25842int
25843main ()
25844{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025845return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025846 ;
25847 return 0;
25848}
25849_ACEOF
25850rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025851if { (ac_try="$ac_link"
25852case "(($ac_try" in
25853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25854 *) ac_try_echo=$ac_try;;
25855esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025857 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025858 ac_status=$?
25859 grep -v '^ *+' conftest.er1 >conftest.err
25860 rm -f conftest.er1
25861 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025863 (exit $ac_status); } && {
25864 test -z "$ac_c_werror_flag" ||
25865 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025866 } && test -s conftest$ac_exeext &&
25867 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025868 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025869else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025870 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025871sed 's/^/| /' conftest.$ac_ext >&5
25872
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025873
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025874fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025875
25876rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025877 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025878 if test $py_cv_lib_readline = yes; then
25879 break
25880 fi
25881done
25882# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
25883#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000025884if test $py_cv_lib_readline = no; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025885 { echo "$as_me:$LINENO: result: none" >&5
25886echo "${ECHO_T}none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025887else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025888 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
25889echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025890
25891cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025892#define HAVE_LIBREADLINE 1
25893_ACEOF
25894
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025895fi
25896
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025897# check for readline 2.1
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025898{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
25899echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025900if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025901 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025902else
25903 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025904LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025905cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025906/* confdefs.h. */
25907_ACEOF
25908cat confdefs.h >>conftest.$ac_ext
25909cat >>conftest.$ac_ext <<_ACEOF
25910/* end confdefs.h. */
25911
Martin v. Löwiseba40652007-08-30 20:10:57 +000025912/* Override any GCC internal prototype to avoid an error.
25913 Use char because int might match the return type of a GCC
25914 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025915#ifdef __cplusplus
25916extern "C"
25917#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025918char rl_callback_handler_install ();
25919int
25920main ()
25921{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025922return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025923 ;
25924 return 0;
25925}
25926_ACEOF
25927rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025928if { (ac_try="$ac_link"
25929case "(($ac_try" in
25930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25931 *) ac_try_echo=$ac_try;;
25932esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025933eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025934 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025935 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025936 grep -v '^ *+' conftest.er1 >conftest.err
25937 rm -f conftest.er1
25938 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025940 (exit $ac_status); } && {
25941 test -z "$ac_c_werror_flag" ||
25942 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025943 } && test -s conftest$ac_exeext &&
25944 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025945 ac_cv_lib_readline_rl_callback_handler_install=yes
25946else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025947 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025948sed 's/^/| /' conftest.$ac_ext >&5
25949
Martin v. Löwiseba40652007-08-30 20:10:57 +000025950 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025951fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025952
25953rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025954 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025955LIBS=$ac_check_lib_save_LIBS
25956fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025957{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25958echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25959if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025960
25961cat >>confdefs.h <<\_ACEOF
25962#define HAVE_RL_CALLBACK 1
25963_ACEOF
25964
25965fi
25966
25967
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025968# check for readline 2.2
25969cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025970/* confdefs.h. */
25971_ACEOF
25972cat confdefs.h >>conftest.$ac_ext
25973cat >>conftest.$ac_ext <<_ACEOF
25974/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025975#include <readline/readline.h>
25976_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025977if { (ac_try="$ac_cpp conftest.$ac_ext"
25978case "(($ac_try" in
25979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25980 *) ac_try_echo=$ac_try;;
25981esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025983 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025984 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025985 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025986 rm -f conftest.er1
25987 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025989 (exit $ac_status); } >/dev/null && {
25990 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25991 test ! -s conftest.err
25992 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025993 have_readline=yes
25994else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025995 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025996sed 's/^/| /' conftest.$ac_ext >&5
25997
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025998 have_readline=no
25999fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026000
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026001rm -f conftest.err conftest.$ac_ext
26002if test $have_readline = yes
26003then
26004 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026005/* confdefs.h. */
26006_ACEOF
26007cat confdefs.h >>conftest.$ac_ext
26008cat >>conftest.$ac_ext <<_ACEOF
26009/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026010#include <readline/readline.h>
26011
26012_ACEOF
26013if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000026014 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026015
26016cat >>confdefs.h <<\_ACEOF
26017#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
26018_ACEOF
26019
26020fi
Benjamin Peterson2c196742009-12-31 03:17:18 +000026021rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000026022
26023 cat >conftest.$ac_ext <<_ACEOF
26024/* confdefs.h. */
26025_ACEOF
26026cat confdefs.h >>conftest.$ac_ext
26027cat >>conftest.$ac_ext <<_ACEOF
26028/* end confdefs.h. */
26029#include <readline/readline.h>
26030
26031_ACEOF
26032if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26033 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
26034
26035cat >>confdefs.h <<\_ACEOF
26036#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
26037_ACEOF
26038
26039fi
Benjamin Peterson2c196742009-12-31 03:17:18 +000026040rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026041
26042fi
26043
Martin v. Löwis0daad592001-09-30 21:09:59 +000026044# check for readline 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026045{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
26046echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026047if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026048 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000026049else
Martin v. Löwis11437992002-04-12 09:54:03 +000026050 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026051LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000026052cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026053/* confdefs.h. */
26054_ACEOF
26055cat confdefs.h >>conftest.$ac_ext
26056cat >>conftest.$ac_ext <<_ACEOF
26057/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026058
Martin v. Löwiseba40652007-08-30 20:10:57 +000026059/* Override any GCC internal prototype to avoid an error.
26060 Use char because int might match the return type of a GCC
26061 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026062#ifdef __cplusplus
26063extern "C"
26064#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000026065char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026066int
26067main ()
26068{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026069return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026070 ;
26071 return 0;
26072}
26073_ACEOF
26074rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026075if { (ac_try="$ac_link"
26076case "(($ac_try" in
26077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26078 *) ac_try_echo=$ac_try;;
26079esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026081 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026082 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026083 grep -v '^ *+' conftest.er1 >conftest.err
26084 rm -f conftest.er1
26085 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026087 (exit $ac_status); } && {
26088 test -z "$ac_c_werror_flag" ||
26089 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026090 } && test -s conftest$ac_exeext &&
26091 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026092 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000026093else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026094 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026095sed 's/^/| /' conftest.$ac_ext >&5
26096
Martin v. Löwiseba40652007-08-30 20:10:57 +000026097 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000026098fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026099
26100rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026101 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026102LIBS=$ac_check_lib_save_LIBS
26103fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026104{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
26105echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
26106if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000026107
Martin v. Löwis11437992002-04-12 09:54:03 +000026108cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000026109#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026110_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000026111
Martin v. Löwis0daad592001-09-30 21:09:59 +000026112fi
26113
Michael W. Hudson54241132001-12-07 15:38:26 +000026114
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026115# also in 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026116{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
26117echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026118if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026119 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026120else
26121 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026122LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026123cat >conftest.$ac_ext <<_ACEOF
26124/* confdefs.h. */
26125_ACEOF
26126cat confdefs.h >>conftest.$ac_ext
26127cat >>conftest.$ac_ext <<_ACEOF
26128/* end confdefs.h. */
26129
26130/* Override any GCC internal prototype to avoid an error.
26131 Use char because int might match the return type of a GCC
26132 builtin and then its argument prototype would still apply. */
26133#ifdef __cplusplus
26134extern "C"
26135#endif
26136char rl_completion_display_matches_hook ();
26137int
26138main ()
26139{
26140return rl_completion_display_matches_hook ();
26141 ;
26142 return 0;
26143}
26144_ACEOF
26145rm -f conftest.$ac_objext conftest$ac_exeext
26146if { (ac_try="$ac_link"
26147case "(($ac_try" in
26148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26149 *) ac_try_echo=$ac_try;;
26150esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026151eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026152 (eval "$ac_link") 2>conftest.er1
26153 ac_status=$?
26154 grep -v '^ *+' conftest.er1 >conftest.err
26155 rm -f conftest.er1
26156 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026158 (exit $ac_status); } && {
26159 test -z "$ac_c_werror_flag" ||
26160 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026161 } && test -s conftest$ac_exeext &&
26162 $as_test_x conftest$ac_exeext; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026163 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
26164else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026165 echo "$as_me: failed program was:" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026166sed 's/^/| /' conftest.$ac_ext >&5
26167
26168 ac_cv_lib_readline_rl_completion_display_matches_hook=no
26169fi
26170
26171rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26172 conftest$ac_exeext conftest.$ac_ext
26173LIBS=$ac_check_lib_save_LIBS
26174fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026175{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
26176echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
26177if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026178
26179cat >>confdefs.h <<\_ACEOF
26180#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
26181_ACEOF
26182
26183fi
26184
26185
Martin v. Löwis0daad592001-09-30 21:09:59 +000026186# check for readline 4.2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026187{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
26188echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026189if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026190 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000026191else
Martin v. Löwis11437992002-04-12 09:54:03 +000026192 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026193LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000026194cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026195/* confdefs.h. */
26196_ACEOF
26197cat confdefs.h >>conftest.$ac_ext
26198cat >>conftest.$ac_ext <<_ACEOF
26199/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026200
Martin v. Löwiseba40652007-08-30 20:10:57 +000026201/* Override any GCC internal prototype to avoid an error.
26202 Use char because int might match the return type of a GCC
26203 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026204#ifdef __cplusplus
26205extern "C"
26206#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000026207char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026208int
26209main ()
26210{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026211return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026212 ;
26213 return 0;
26214}
26215_ACEOF
26216rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026217if { (ac_try="$ac_link"
26218case "(($ac_try" in
26219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26220 *) ac_try_echo=$ac_try;;
26221esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026223 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026224 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026225 grep -v '^ *+' conftest.er1 >conftest.err
26226 rm -f conftest.er1
26227 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026229 (exit $ac_status); } && {
26230 test -z "$ac_c_werror_flag" ||
26231 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026232 } && test -s conftest$ac_exeext &&
26233 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026234 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000026235else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026236 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026237sed 's/^/| /' conftest.$ac_ext >&5
26238
Martin v. Löwiseba40652007-08-30 20:10:57 +000026239 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000026240fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026241
26242rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026243 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026244LIBS=$ac_check_lib_save_LIBS
26245fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026246{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
26247echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
26248if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000026249
Martin v. Löwis11437992002-04-12 09:54:03 +000026250cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000026251#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026252_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000026253
Guido van Rossum353ae582001-07-10 16:45:32 +000026254fi
26255
Jack Jansendd19cf82001-12-06 22:36:17 +000026256
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026257# also in readline 4.2
26258cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026259/* confdefs.h. */
26260_ACEOF
26261cat confdefs.h >>conftest.$ac_ext
26262cat >>conftest.$ac_ext <<_ACEOF
26263/* end confdefs.h. */
26264#include <readline/readline.h>
26265_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026266if { (ac_try="$ac_cpp conftest.$ac_ext"
26267case "(($ac_try" in
26268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26269 *) ac_try_echo=$ac_try;;
26270esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026271eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026272 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026273 ac_status=$?
26274 grep -v '^ *+' conftest.er1 >conftest.err
26275 rm -f conftest.er1
26276 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026278 (exit $ac_status); } >/dev/null && {
26279 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26280 test ! -s conftest.err
26281 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026282 have_readline=yes
26283else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026284 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026285sed 's/^/| /' conftest.$ac_ext >&5
26286
26287 have_readline=no
26288fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026289
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026290rm -f conftest.err conftest.$ac_ext
26291if test $have_readline = yes
26292then
26293 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026294/* confdefs.h. */
26295_ACEOF
26296cat confdefs.h >>conftest.$ac_ext
26297cat >>conftest.$ac_ext <<_ACEOF
26298/* end confdefs.h. */
26299#include <readline/readline.h>
26300
26301_ACEOF
26302if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26303 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
26304
26305cat >>confdefs.h <<\_ACEOF
26306#define HAVE_RL_CATCH_SIGNAL 1
26307_ACEOF
26308
26309fi
Benjamin Peterson2c196742009-12-31 03:17:18 +000026310rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026311
26312fi
26313
Martin v. Löwis82bca632006-02-10 20:49:30 +000026314# End of readline checks: restore LIBS
26315LIBS=$LIBS_no_readline
26316
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026317{ echo "$as_me:$LINENO: checking for broken nice()" >&5
26318echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026319if test "${ac_cv_broken_nice+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026320 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000026321else
Martin v. Löwis11437992002-04-12 09:54:03 +000026322
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026323if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000026324 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026325else
Martin v. Löwis11437992002-04-12 09:54:03 +000026326 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026327/* confdefs.h. */
26328_ACEOF
26329cat confdefs.h >>conftest.$ac_ext
26330cat >>conftest.$ac_ext <<_ACEOF
26331/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026332
26333int main()
26334{
26335 int val1 = nice(1);
26336 if (val1 != -1 && val1 == nice(2))
26337 exit(0);
26338 exit(1);
26339}
26340
Martin v. Löwis11437992002-04-12 09:54:03 +000026341_ACEOF
26342rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026343if { (ac_try="$ac_link"
26344case "(($ac_try" in
26345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26346 *) ac_try_echo=$ac_try;;
26347esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026348eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026349 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026350 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026352 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026353 { (case "(($ac_try" in
26354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26355 *) ac_try_echo=$ac_try;;
26356esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026358 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026359 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026361 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026362 ac_cv_broken_nice=yes
26363else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026364 echo "$as_me: program exited with status $ac_status" >&5
26365echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026366sed 's/^/| /' conftest.$ac_ext >&5
26367
Martin v. Löwis11437992002-04-12 09:54:03 +000026368( exit $ac_status )
26369ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026370fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026371rm -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 +000026372fi
26373
Martin v. Löwiseba40652007-08-30 20:10:57 +000026374
26375fi
26376
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026377{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
26378echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026379if test "$ac_cv_broken_nice" = yes
26380then
Martin v. Löwis11437992002-04-12 09:54:03 +000026381
26382cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026383#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026384_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026385
26386fi
26387
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026388{ echo "$as_me:$LINENO: checking for broken poll()" >&5
26389echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026390if test "${ac_cv_broken_poll+set}" = set; then
26391 echo $ECHO_N "(cached) $ECHO_C" >&6
26392else
26393 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026394 ac_cv_broken_poll=no
26395else
26396 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026397/* confdefs.h. */
26398_ACEOF
26399cat confdefs.h >>conftest.$ac_ext
26400cat >>conftest.$ac_ext <<_ACEOF
26401/* end confdefs.h. */
26402
26403#include <poll.h>
26404
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026405int main()
26406{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026407 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026408 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026409
26410 close (42);
26411
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026412 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026413 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026414 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026415 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026416 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026417 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026418 return 1;
26419}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026420
26421_ACEOF
26422rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026423if { (ac_try="$ac_link"
26424case "(($ac_try" in
26425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26426 *) ac_try_echo=$ac_try;;
26427esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026429 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026430 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026432 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026433 { (case "(($ac_try" in
26434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26435 *) ac_try_echo=$ac_try;;
26436esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026438 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026439 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026441 (exit $ac_status); }; }; then
26442 ac_cv_broken_poll=yes
26443else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026444 echo "$as_me: program exited with status $ac_status" >&5
26445echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026446sed 's/^/| /' conftest.$ac_ext >&5
26447
26448( exit $ac_status )
26449ac_cv_broken_poll=no
26450fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026451rm -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 +000026452fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026453
26454
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026455fi
26456
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026457{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
26458echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026459if test "$ac_cv_broken_poll" = yes
26460then
26461
26462cat >>confdefs.h <<\_ACEOF
26463#define HAVE_BROKEN_POLL 1
26464_ACEOF
26465
26466fi
26467
Brett Cannon43802422005-02-10 20:48:03 +000026468# 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 +000026469# (which is not required by ISO C or UNIX spec) and/or if we support
26470# tzname[]
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026471{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
26472echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026473if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026474 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026475else
26476 cat >conftest.$ac_ext <<_ACEOF
26477/* confdefs.h. */
26478_ACEOF
26479cat confdefs.h >>conftest.$ac_ext
26480cat >>conftest.$ac_ext <<_ACEOF
26481/* end confdefs.h. */
26482#include <sys/types.h>
26483#include <$ac_cv_struct_tm>
26484
26485
26486int
26487main ()
26488{
26489static struct tm ac_aggr;
26490if (ac_aggr.tm_zone)
26491return 0;
26492 ;
26493 return 0;
26494}
26495_ACEOF
26496rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026497if { (ac_try="$ac_compile"
26498case "(($ac_try" in
26499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26500 *) ac_try_echo=$ac_try;;
26501esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026503 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026504 ac_status=$?
26505 grep -v '^ *+' conftest.er1 >conftest.err
26506 rm -f conftest.er1
26507 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026509 (exit $ac_status); } && {
26510 test -z "$ac_c_werror_flag" ||
26511 test ! -s conftest.err
26512 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026513 ac_cv_member_struct_tm_tm_zone=yes
26514else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026515 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026516sed 's/^/| /' conftest.$ac_ext >&5
26517
Martin v. Löwiseba40652007-08-30 20:10:57 +000026518 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000026519/* confdefs.h. */
26520_ACEOF
26521cat confdefs.h >>conftest.$ac_ext
26522cat >>conftest.$ac_ext <<_ACEOF
26523/* end confdefs.h. */
26524#include <sys/types.h>
26525#include <$ac_cv_struct_tm>
26526
26527
26528int
26529main ()
26530{
26531static struct tm ac_aggr;
26532if (sizeof ac_aggr.tm_zone)
26533return 0;
26534 ;
26535 return 0;
26536}
26537_ACEOF
26538rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026539if { (ac_try="$ac_compile"
26540case "(($ac_try" in
26541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26542 *) ac_try_echo=$ac_try;;
26543esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026545 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026546 ac_status=$?
26547 grep -v '^ *+' conftest.er1 >conftest.err
26548 rm -f conftest.er1
26549 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026551 (exit $ac_status); } && {
26552 test -z "$ac_c_werror_flag" ||
26553 test ! -s conftest.err
26554 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026555 ac_cv_member_struct_tm_tm_zone=yes
26556else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026557 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026558sed 's/^/| /' conftest.$ac_ext >&5
26559
Martin v. Löwiseba40652007-08-30 20:10:57 +000026560 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000026561fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026562
26563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026564fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026565
26566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026567fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026568{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
26569echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
26570if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000026571
26572cat >>confdefs.h <<_ACEOF
26573#define HAVE_STRUCT_TM_TM_ZONE 1
26574_ACEOF
26575
26576
26577fi
26578
26579if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
26580
26581cat >>confdefs.h <<\_ACEOF
26582#define HAVE_TM_ZONE 1
26583_ACEOF
26584
26585else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026586 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
26587echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000026588if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026589 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000026590else
26591 cat >conftest.$ac_ext <<_ACEOF
26592/* confdefs.h. */
26593_ACEOF
26594cat confdefs.h >>conftest.$ac_ext
26595cat >>conftest.$ac_ext <<_ACEOF
26596/* end confdefs.h. */
26597#include <time.h>
26598
26599int
26600main ()
26601{
26602#ifndef tzname
26603 (void) tzname;
26604#endif
26605
26606 ;
26607 return 0;
26608}
26609_ACEOF
26610rm -f conftest.$ac_objext
26611if { (ac_try="$ac_compile"
26612case "(($ac_try" in
26613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26614 *) ac_try_echo=$ac_try;;
26615esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026617 (eval "$ac_compile") 2>conftest.er1
26618 ac_status=$?
26619 grep -v '^ *+' conftest.er1 >conftest.err
26620 rm -f conftest.er1
26621 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026623 (exit $ac_status); } && {
26624 test -z "$ac_c_werror_flag" ||
26625 test ! -s conftest.err
26626 } && test -s conftest.$ac_objext; then
26627 ac_cv_have_decl_tzname=yes
26628else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026629 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026630sed 's/^/| /' conftest.$ac_ext >&5
26631
26632 ac_cv_have_decl_tzname=no
26633fi
26634
26635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26636fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026637{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
26638echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
26639if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000026640
26641cat >>confdefs.h <<_ACEOF
26642#define HAVE_DECL_TZNAME 1
26643_ACEOF
26644
26645
26646else
26647 cat >>confdefs.h <<_ACEOF
26648#define HAVE_DECL_TZNAME 0
26649_ACEOF
26650
26651
26652fi
26653
26654
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026655 { echo "$as_me:$LINENO: checking for tzname" >&5
26656echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026657if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026658 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026659else
26660 cat >conftest.$ac_ext <<_ACEOF
26661/* confdefs.h. */
26662_ACEOF
26663cat confdefs.h >>conftest.$ac_ext
26664cat >>conftest.$ac_ext <<_ACEOF
26665/* end confdefs.h. */
26666#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000026667#if !HAVE_DECL_TZNAME
26668extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000026669#endif
26670
26671int
26672main ()
26673{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026674return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000026675 ;
26676 return 0;
26677}
26678_ACEOF
26679rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026680if { (ac_try="$ac_link"
26681case "(($ac_try" in
26682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26683 *) ac_try_echo=$ac_try;;
26684esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026686 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026687 ac_status=$?
26688 grep -v '^ *+' conftest.er1 >conftest.err
26689 rm -f conftest.er1
26690 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026692 (exit $ac_status); } && {
26693 test -z "$ac_c_werror_flag" ||
26694 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026695 } && test -s conftest$ac_exeext &&
26696 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000026697 ac_cv_var_tzname=yes
26698else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026699 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026700sed 's/^/| /' conftest.$ac_ext >&5
26701
Martin v. Löwiseba40652007-08-30 20:10:57 +000026702 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000026703fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026704
26705rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000026706 conftest$ac_exeext conftest.$ac_ext
26707fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026708{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
26709echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026710 if test $ac_cv_var_tzname = yes; then
26711
26712cat >>confdefs.h <<\_ACEOF
26713#define HAVE_TZNAME 1
26714_ACEOF
26715
26716 fi
26717fi
26718
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026719
Martin v. Löwis1d459062005-03-14 21:23:33 +000026720# check tzset(3) exists and works like we expect it to
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026721{ echo "$as_me:$LINENO: checking for working tzset()" >&5
26722echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026723if test "${ac_cv_working_tzset+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026724 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026725else
26726
26727if test "$cross_compiling" = yes; then
26728 ac_cv_working_tzset=no
26729else
26730 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026731/* confdefs.h. */
26732_ACEOF
26733cat confdefs.h >>conftest.$ac_ext
26734cat >>conftest.$ac_ext <<_ACEOF
26735/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026736
26737#include <stdlib.h>
26738#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000026739#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000026740
26741#if HAVE_TZNAME
26742extern char *tzname[];
26743#endif
26744
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026745int main()
26746{
Brett Cannon18367812003-09-19 00:59:16 +000026747 /* Note that we need to ensure that not only does tzset(3)
26748 do 'something' with localtime, but it works as documented
26749 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000026750 This includes making sure that tzname is set properly if
26751 tm->tm_zone does not exist since it is the alternative way
26752 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000026753
26754 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000026755 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000026756 */
26757
Martin v. Löwis1d459062005-03-14 21:23:33 +000026758 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000026759 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
26760
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026761 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026762 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026763 if (localtime(&groundhogday)->tm_hour != 0)
26764 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026765#if HAVE_TZNAME
26766 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26767 if (strcmp(tzname[0], "UTC") ||
26768 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26769 exit(1);
26770#endif
Brett Cannon18367812003-09-19 00:59:16 +000026771
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026772 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026773 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026774 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026775 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026776#if HAVE_TZNAME
26777 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26778 exit(1);
26779#endif
Brett Cannon18367812003-09-19 00:59:16 +000026780
26781 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26782 tzset();
26783 if (localtime(&groundhogday)->tm_hour != 11)
26784 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026785#if HAVE_TZNAME
26786 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26787 exit(1);
26788#endif
26789
26790#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000026791 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
26792 exit(1);
26793 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
26794 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026795#endif
Brett Cannon18367812003-09-19 00:59:16 +000026796
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026797 exit(0);
26798}
26799
26800_ACEOF
26801rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026802if { (ac_try="$ac_link"
26803case "(($ac_try" in
26804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26805 *) ac_try_echo=$ac_try;;
26806esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026808 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026809 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026811 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026812 { (case "(($ac_try" in
26813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26814 *) ac_try_echo=$ac_try;;
26815esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026817 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026818 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026820 (exit $ac_status); }; }; then
26821 ac_cv_working_tzset=yes
26822else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026823 echo "$as_me: program exited with status $ac_status" >&5
26824echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026825sed 's/^/| /' conftest.$ac_ext >&5
26826
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026827( exit $ac_status )
26828ac_cv_working_tzset=no
26829fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026830rm -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 +000026831fi
26832
Martin v. Löwiseba40652007-08-30 20:10:57 +000026833
26834fi
26835
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026836{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
26837echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026838if test "$ac_cv_working_tzset" = yes
26839then
26840
26841cat >>confdefs.h <<\_ACEOF
26842#define HAVE_WORKING_TZSET 1
26843_ACEOF
26844
26845fi
26846
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026847# Look for subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026848{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
26849echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026850if test "${ac_cv_stat_tv_nsec+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026851 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026852else
26853 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026854/* confdefs.h. */
26855_ACEOF
26856cat confdefs.h >>conftest.$ac_ext
26857cat >>conftest.$ac_ext <<_ACEOF
26858/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026859#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026860int
26861main ()
26862{
26863
26864struct stat st;
26865st.st_mtim.tv_nsec = 1;
26866
26867 ;
26868 return 0;
26869}
26870_ACEOF
26871rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026872if { (ac_try="$ac_compile"
26873case "(($ac_try" in
26874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26875 *) ac_try_echo=$ac_try;;
26876esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026878 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026879 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026880 grep -v '^ *+' conftest.er1 >conftest.err
26881 rm -f conftest.er1
26882 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026884 (exit $ac_status); } && {
26885 test -z "$ac_c_werror_flag" ||
26886 test ! -s conftest.err
26887 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000026888 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026889else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026890 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026891sed 's/^/| /' conftest.$ac_ext >&5
26892
Martin v. Löwiseba40652007-08-30 20:10:57 +000026893 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026894fi
26895
Martin v. Löwiseba40652007-08-30 20:10:57 +000026896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26897fi
26898
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026899{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
26900echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026901if test "$ac_cv_stat_tv_nsec" = yes
26902then
26903
26904cat >>confdefs.h <<\_ACEOF
26905#define HAVE_STAT_TV_NSEC 1
26906_ACEOF
26907
26908fi
26909
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026910# Look for BSD style subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026911{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
26912echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026913if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026914 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026915else
26916 cat >conftest.$ac_ext <<_ACEOF
26917/* confdefs.h. */
26918_ACEOF
26919cat confdefs.h >>conftest.$ac_ext
26920cat >>conftest.$ac_ext <<_ACEOF
26921/* end confdefs.h. */
26922#include <sys/stat.h>
26923int
26924main ()
26925{
26926
26927struct stat st;
26928st.st_mtimespec.tv_nsec = 1;
26929
26930 ;
26931 return 0;
26932}
26933_ACEOF
26934rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026935if { (ac_try="$ac_compile"
26936case "(($ac_try" in
26937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26938 *) ac_try_echo=$ac_try;;
26939esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026941 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026942 ac_status=$?
26943 grep -v '^ *+' conftest.er1 >conftest.err
26944 rm -f conftest.er1
26945 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026947 (exit $ac_status); } && {
26948 test -z "$ac_c_werror_flag" ||
26949 test ! -s conftest.err
26950 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026951 ac_cv_stat_tv_nsec2=yes
26952else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026953 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026954sed 's/^/| /' conftest.$ac_ext >&5
26955
Martin v. Löwiseba40652007-08-30 20:10:57 +000026956 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026957fi
26958
Martin v. Löwiseba40652007-08-30 20:10:57 +000026959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26960fi
26961
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026962{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26963echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026964if test "$ac_cv_stat_tv_nsec2" = yes
26965then
26966
26967cat >>confdefs.h <<\_ACEOF
26968#define HAVE_STAT_TV_NSEC2 1
26969_ACEOF
26970
26971fi
26972
Jack Jansen666b1e72001-10-31 12:11:48 +000026973# On HP/UX 11.0, mvwdelch is a block with a return statement
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026974{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26975echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026976if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026977 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026978else
Martin v. Löwis11437992002-04-12 09:54:03 +000026979 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026980/* confdefs.h. */
26981_ACEOF
26982cat confdefs.h >>conftest.$ac_ext
26983cat >>conftest.$ac_ext <<_ACEOF
26984/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026985#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026986int
26987main ()
26988{
Jack Jansen666b1e72001-10-31 12:11:48 +000026989
26990 int rtn;
26991 rtn = mvwdelch(0,0,0);
26992
Martin v. Löwis11437992002-04-12 09:54:03 +000026993 ;
26994 return 0;
26995}
26996_ACEOF
26997rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026998if { (ac_try="$ac_compile"
26999case "(($ac_try" in
27000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27001 *) ac_try_echo=$ac_try;;
27002esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027004 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027005 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027006 grep -v '^ *+' conftest.er1 >conftest.err
27007 rm -f conftest.er1
27008 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027010 (exit $ac_status); } && {
27011 test -z "$ac_c_werror_flag" ||
27012 test ! -s conftest.err
27013 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000027014 ac_cv_mvwdelch_is_expression=yes
27015else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027016 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027017sed 's/^/| /' conftest.$ac_ext >&5
27018
Martin v. Löwiseba40652007-08-30 20:10:57 +000027019 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000027020fi
27021
Martin v. Löwiseba40652007-08-30 20:10:57 +000027022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27023fi
27024
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027025{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
27026echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000027027
27028if test "$ac_cv_mvwdelch_is_expression" = yes
27029then
Martin v. Löwis11437992002-04-12 09:54:03 +000027030
27031cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027032#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000027033_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027034
27035fi
27036
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027037{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
27038echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027039if test "${ac_cv_window_has_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027040 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000027041else
Martin v. Löwis11437992002-04-12 09:54:03 +000027042 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027043/* confdefs.h. */
27044_ACEOF
27045cat confdefs.h >>conftest.$ac_ext
27046cat >>conftest.$ac_ext <<_ACEOF
27047/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000027048#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000027049int
27050main ()
27051{
Jack Jansen666b1e72001-10-31 12:11:48 +000027052
27053 WINDOW *w;
27054 w->_flags = 0;
27055
Martin v. Löwis11437992002-04-12 09:54:03 +000027056 ;
27057 return 0;
27058}
27059_ACEOF
27060rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027061if { (ac_try="$ac_compile"
27062case "(($ac_try" in
27063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27064 *) ac_try_echo=$ac_try;;
27065esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027067 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027068 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027069 grep -v '^ *+' conftest.er1 >conftest.err
27070 rm -f conftest.er1
27071 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027073 (exit $ac_status); } && {
27074 test -z "$ac_c_werror_flag" ||
27075 test ! -s conftest.err
27076 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000027077 ac_cv_window_has_flags=yes
27078else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027079 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027080sed 's/^/| /' conftest.$ac_ext >&5
27081
Martin v. Löwiseba40652007-08-30 20:10:57 +000027082 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000027083fi
27084
Martin v. Löwiseba40652007-08-30 20:10:57 +000027085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27086fi
27087
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027088{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
27089echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027090
Jack Jansen666b1e72001-10-31 12:11:48 +000027091
27092if test "$ac_cv_window_has_flags" = yes
27093then
Martin v. Löwis11437992002-04-12 09:54:03 +000027094
27095cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027096#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000027097_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027098
27099fi
27100
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027101{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
27102echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027103cat >conftest.$ac_ext <<_ACEOF
27104/* confdefs.h. */
27105_ACEOF
27106cat confdefs.h >>conftest.$ac_ext
27107cat >>conftest.$ac_ext <<_ACEOF
27108/* end confdefs.h. */
27109#include <curses.h>
27110int
27111main ()
27112{
27113void *x=is_term_resized
27114 ;
27115 return 0;
27116}
27117_ACEOF
27118rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027119if { (ac_try="$ac_compile"
27120case "(($ac_try" in
27121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27122 *) ac_try_echo=$ac_try;;
27123esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027125 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027126 ac_status=$?
27127 grep -v '^ *+' conftest.er1 >conftest.err
27128 rm -f conftest.er1
27129 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027131 (exit $ac_status); } && {
27132 test -z "$ac_c_werror_flag" ||
27133 test ! -s conftest.err
27134 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027135
27136cat >>confdefs.h <<\_ACEOF
27137#define HAVE_CURSES_IS_TERM_RESIZED 1
27138_ACEOF
27139
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027140 { echo "$as_me:$LINENO: result: yes" >&5
27141echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027142else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027143 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027144sed 's/^/| /' conftest.$ac_ext >&5
27145
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027146 { echo "$as_me:$LINENO: result: no" >&5
27147echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027148
27149fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027150
Martin v. Löwiseba40652007-08-30 20:10:57 +000027151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27152
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027153{ echo "$as_me:$LINENO: checking for resize_term" >&5
27154echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027155cat >conftest.$ac_ext <<_ACEOF
27156/* confdefs.h. */
27157_ACEOF
27158cat confdefs.h >>conftest.$ac_ext
27159cat >>conftest.$ac_ext <<_ACEOF
27160/* end confdefs.h. */
27161#include <curses.h>
27162int
27163main ()
27164{
27165void *x=resize_term
27166 ;
27167 return 0;
27168}
27169_ACEOF
27170rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027171if { (ac_try="$ac_compile"
27172case "(($ac_try" in
27173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27174 *) ac_try_echo=$ac_try;;
27175esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027177 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027178 ac_status=$?
27179 grep -v '^ *+' conftest.er1 >conftest.err
27180 rm -f conftest.er1
27181 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027183 (exit $ac_status); } && {
27184 test -z "$ac_c_werror_flag" ||
27185 test ! -s conftest.err
27186 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027187
27188cat >>confdefs.h <<\_ACEOF
27189#define HAVE_CURSES_RESIZE_TERM 1
27190_ACEOF
27191
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027192 { echo "$as_me:$LINENO: result: yes" >&5
27193echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027194else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027195 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027196sed 's/^/| /' conftest.$ac_ext >&5
27197
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027198 { echo "$as_me:$LINENO: result: no" >&5
27199echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027200
27201fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027202
Martin v. Löwiseba40652007-08-30 20:10:57 +000027203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27204
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027205{ echo "$as_me:$LINENO: checking for resizeterm" >&5
27206echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027207cat >conftest.$ac_ext <<_ACEOF
27208/* confdefs.h. */
27209_ACEOF
27210cat confdefs.h >>conftest.$ac_ext
27211cat >>conftest.$ac_ext <<_ACEOF
27212/* end confdefs.h. */
27213#include <curses.h>
27214int
27215main ()
27216{
27217void *x=resizeterm
27218 ;
27219 return 0;
27220}
27221_ACEOF
27222rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027223if { (ac_try="$ac_compile"
27224case "(($ac_try" in
27225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27226 *) ac_try_echo=$ac_try;;
27227esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027229 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027230 ac_status=$?
27231 grep -v '^ *+' conftest.er1 >conftest.err
27232 rm -f conftest.er1
27233 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027235 (exit $ac_status); } && {
27236 test -z "$ac_c_werror_flag" ||
27237 test ! -s conftest.err
27238 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027239
27240cat >>confdefs.h <<\_ACEOF
27241#define HAVE_CURSES_RESIZETERM 1
27242_ACEOF
27243
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027244 { echo "$as_me:$LINENO: result: yes" >&5
27245echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027246else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027247 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027248sed 's/^/| /' conftest.$ac_ext >&5
27249
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027250 { echo "$as_me:$LINENO: result: no" >&5
27251echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027252
27253fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027254
Martin v. Löwiseba40652007-08-30 20:10:57 +000027255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27256
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027257{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
27258echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027259
27260if test -r /dev/ptmx
27261then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027262 { echo "$as_me:$LINENO: result: yes" >&5
27263echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000027264
27265cat >>confdefs.h <<\_ACEOF
27266#define HAVE_DEV_PTMX 1
27267_ACEOF
27268
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027269else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027270 { echo "$as_me:$LINENO: result: no" >&5
27271echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000027272fi
27273
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027274{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
27275echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027276
27277if test -r /dev/ptc
27278then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027279 { echo "$as_me:$LINENO: result: yes" >&5
27280echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027281
27282cat >>confdefs.h <<\_ACEOF
27283#define HAVE_DEV_PTC 1
27284_ACEOF
27285
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027286else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027287 { echo "$as_me:$LINENO: result: no" >&5
27288echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027289fi
27290
Mark Dickinson82864d12009-11-15 16:18:58 +000027291if test "$have_long_long" = yes
27292then
27293 { echo "$as_me:$LINENO: checking for %lld and %llu printf() format support" >&5
27294echo $ECHO_N "checking for %lld and %llu printf() format support... $ECHO_C" >&6; }
27295 if test "${ac_cv_have_long_long_format+set}" = set; then
27296 echo $ECHO_N "(cached) $ECHO_C" >&6
27297else
27298 if test "$cross_compiling" = yes; then
27299 ac_cv_have_long_long_format=no
27300else
27301 cat >conftest.$ac_ext <<_ACEOF
27302/* confdefs.h. */
27303_ACEOF
27304cat confdefs.h >>conftest.$ac_ext
27305cat >>conftest.$ac_ext <<_ACEOF
27306/* end confdefs.h. */
27307
27308 #include <stdio.h>
27309 #include <stddef.h>
27310 #include <string.h>
27311
27312 #ifdef HAVE_SYS_TYPES_H
27313 #include <sys/types.h>
27314 #endif
27315
27316 int main()
27317 {
27318 char buffer[256];
27319
27320 if (sprintf(buffer, "%lld", (long long)123) < 0)
27321 return 1;
27322 if (strcmp(buffer, "123"))
27323 return 1;
27324
27325 if (sprintf(buffer, "%lld", (long long)-123) < 0)
27326 return 1;
27327 if (strcmp(buffer, "-123"))
27328 return 1;
27329
27330 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
27331 return 1;
27332 if (strcmp(buffer, "123"))
27333 return 1;
27334
27335 return 0;
27336 }
27337
27338_ACEOF
27339rm -f conftest$ac_exeext
27340if { (ac_try="$ac_link"
27341case "(($ac_try" in
27342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27343 *) ac_try_echo=$ac_try;;
27344esac
27345eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27346 (eval "$ac_link") 2>&5
27347 ac_status=$?
27348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27349 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27350 { (case "(($ac_try" in
27351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27352 *) ac_try_echo=$ac_try;;
27353esac
27354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27355 (eval "$ac_try") 2>&5
27356 ac_status=$?
27357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27358 (exit $ac_status); }; }; then
27359 ac_cv_have_long_long_format=yes
27360else
27361 echo "$as_me: program exited with status $ac_status" >&5
27362echo "$as_me: failed program was:" >&5
27363sed 's/^/| /' conftest.$ac_ext >&5
27364
27365( exit $ac_status )
27366ac_cv_have_long_long_format=no
27367fi
27368rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27369fi
27370
27371
27372
27373fi
27374
27375 { echo "$as_me:$LINENO: result: $ac_cv_have_long_long_format" >&5
27376echo "${ECHO_T}$ac_cv_have_long_long_format" >&6; }
27377fi
27378
Mark Dickinson5ce84742009-12-31 20:48:04 +000027379if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000027380then
27381
27382cat >>confdefs.h <<\_ACEOF
27383#define PY_FORMAT_LONG_LONG "ll"
27384_ACEOF
27385
27386fi
27387
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000027388if test $ac_sys_system = Darwin
27389then
27390 LIBS="$LIBS -framework CoreFoundation"
27391fi
27392
Mark Dickinson82864d12009-11-15 16:18:58 +000027393
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027394{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
27395echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027396if test "${ac_cv_have_size_t_format+set}" = set; then
27397 echo $ECHO_N "(cached) $ECHO_C" >&6
27398else
27399 if test "$cross_compiling" = yes; then
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000027400 ac_cv_have_size_t_format="cross -- assuming yes"
27401
Brett Cannon09d12362006-05-11 05:11:33 +000027402else
27403 cat >conftest.$ac_ext <<_ACEOF
27404/* confdefs.h. */
27405_ACEOF
27406cat confdefs.h >>conftest.$ac_ext
27407cat >>conftest.$ac_ext <<_ACEOF
27408/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027409
Brett Cannon09d12362006-05-11 05:11:33 +000027410#include <stdio.h>
27411#include <stddef.h>
27412#include <string.h>
27413
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000027414#ifdef HAVE_SYS_TYPES_H
27415#include <sys/types.h>
27416#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000027417
27418#ifdef HAVE_SSIZE_T
27419typedef ssize_t Py_ssize_t;
27420#elif SIZEOF_VOID_P == SIZEOF_LONG
27421typedef long Py_ssize_t;
27422#else
27423typedef int Py_ssize_t;
27424#endif
Brett Cannon09d12362006-05-11 05:11:33 +000027425
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000027426int main()
27427{
27428 char buffer[256];
27429
Brett Cannon09d12362006-05-11 05:11:33 +000027430 if(sprintf(buffer, "%zd", (size_t)123) < 0)
27431 return 1;
27432
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000027433 if (strcmp(buffer, "123"))
27434 return 1;
27435
27436 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
27437 return 1;
27438
27439 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000027440 return 1;
27441
27442 return 0;
27443}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027444
Brett Cannon09d12362006-05-11 05:11:33 +000027445_ACEOF
27446rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027447if { (ac_try="$ac_link"
27448case "(($ac_try" in
27449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27450 *) ac_try_echo=$ac_try;;
27451esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027452eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027453 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000027454 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000027456 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027457 { (case "(($ac_try" in
27458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27459 *) ac_try_echo=$ac_try;;
27460esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027462 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000027463 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000027465 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027466 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027467else
27468 echo "$as_me: program exited with status $ac_status" >&5
27469echo "$as_me: failed program was:" >&5
27470sed 's/^/| /' conftest.$ac_ext >&5
27471
27472( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027473ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027474fi
27475rm -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 +000027476fi
27477
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027478
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027479fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027480{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
27481echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000027482if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027483
27484cat >>confdefs.h <<\_ACEOF
27485#define PY_FORMAT_SIZE_T "z"
27486_ACEOF
27487
27488fi
27489
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027490{ echo "$as_me:$LINENO: checking for socklen_t" >&5
27491echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027492if test "${ac_cv_type_socklen_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027493 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000027494else
Martin v. Löwis11437992002-04-12 09:54:03 +000027495 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027496/* confdefs.h. */
27497_ACEOF
27498cat confdefs.h >>conftest.$ac_ext
27499cat >>conftest.$ac_ext <<_ACEOF
27500/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000027501
27502#ifdef HAVE_SYS_TYPES_H
27503#include <sys/types.h>
27504#endif
27505#ifdef HAVE_SYS_SOCKET_H
27506#include <sys/socket.h>
27507#endif
27508
27509
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027510typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000027511int
27512main ()
27513{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027514if ((ac__type_new_ *) 0)
27515 return 0;
27516if (sizeof (ac__type_new_))
27517 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000027518 ;
27519 return 0;
27520}
27521_ACEOF
27522rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027523if { (ac_try="$ac_compile"
27524case "(($ac_try" in
27525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27526 *) ac_try_echo=$ac_try;;
27527esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027529 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027530 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027531 grep -v '^ *+' conftest.er1 >conftest.err
27532 rm -f conftest.er1
27533 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027535 (exit $ac_status); } && {
27536 test -z "$ac_c_werror_flag" ||
27537 test ! -s conftest.err
27538 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027539 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000027540else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027542sed 's/^/| /' conftest.$ac_ext >&5
27543
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027544 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000027545fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027546
27547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000027548fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027549{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
27550echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
27551if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027552 :
27553else
Guido van Rossum95713eb2000-05-18 20:53:31 +000027554
Martin v. Löwis01c04012002-11-11 14:58:44 +000027555cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027556#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000027557_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027558
27559fi
27560
Michael W. Hudson54241132001-12-07 15:38:26 +000027561
Michael W. Hudson54241132001-12-07 15:38:26 +000027562
27563
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000027564for h in `(cd $srcdir;echo Python/thread_*.h)`
27565do
27566 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
27567done
27568
Michael W. Hudson54241132001-12-07 15:38:26 +000027569
Neal Norwitzd24499d2005-12-18 21:36:39 +000027570SRCDIRS="Parser Grammar Objects Python Modules Mac"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027571{ echo "$as_me:$LINENO: checking for build directories" >&5
27572echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027573for dir in $SRCDIRS; do
27574 if test ! -d $dir; then
27575 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000027576 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027577done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027578{ echo "$as_me:$LINENO: result: done" >&5
27579echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000027580
Guido van Rossum627b2d71993-12-24 10:39:16 +000027581# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000027582ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000027583
Martin v. Löwis11437992002-04-12 09:54:03 +000027584cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027585# This file is a shell script that caches the results of configure
27586# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000027587# scripts and configure runs, see configure's option --config-cache.
27588# It is not useful on other systems. If it contains results you don't
27589# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027590#
Martin v. Löwis11437992002-04-12 09:54:03 +000027591# config.status only pays attention to the cache file if you give it
27592# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027593#
Skip Montanaro6dead952003-09-25 14:50:04 +000027594# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000027595# loading this file, other *unset* `ac_cv_foo' will be assigned the
27596# following values.
27597
27598_ACEOF
27599
Guido van Rossumf78abae1997-01-21 22:02:36 +000027600# The following way of writing the cache mishandles newlines in values,
27601# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027602# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027603# Ultrix sh set writes to stderr and can't be redirected directly,
27604# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027605(
27606 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27607 eval ac_val=\$$ac_var
27608 case $ac_val in #(
27609 *${as_nl}*)
27610 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027611 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
27612echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027613 esac
27614 case $ac_var in #(
27615 _ | IFS | as_nl) ;; #(
27616 *) $as_unset $ac_var ;;
27617 esac ;;
27618 esac
27619 done
27620
Martin v. Löwis11437992002-04-12 09:54:03 +000027621 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027622 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27623 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000027624 # `set' does not quote correctly, so add quotes (double-quote
27625 # substitution turns \\\\ into \\, and sed turns \\ into \).
27626 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027627 "s/'/'\\\\''/g;
27628 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027629 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000027630 *)
27631 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027632 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027633 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027634 esac |
27635 sort
27636) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027637 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000027638 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027639 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000027640 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027641 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27642 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000027643 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27644 :end' >>confcache
27645if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27646 if test -w "$cache_file"; then
27647 test "x$cache_file" != "x/dev/null" &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027648 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
27649echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027650 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027651 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027652 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27653echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027654 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027655fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027656rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027657
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027658test "x$prefix" = xNONE && prefix=$ac_default_prefix
27659# Let make expand exec_prefix.
27660test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027661
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027662DEFS=-DHAVE_CONFIG_H
27663
Skip Montanaro6dead952003-09-25 14:50:04 +000027664ac_libobjs=
27665ac_ltlibobjs=
27666for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27667 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027668 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027669 ac_i=`echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000027670 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27671 # will be set to the directory where LIBOBJS objects are built.
27672 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27673 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027674done
27675LIBOBJS=$ac_libobjs
27676
27677LTLIBOBJS=$ac_ltlibobjs
27678
27679
Martin v. Löwis11437992002-04-12 09:54:03 +000027680
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027681: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000027682ac_clean_files_save=$ac_clean_files
27683ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027684{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27685echo "$as_me: creating $CONFIG_STATUS" >&6;}
27686cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027687#! $SHELL
27688# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027689# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027690# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027691# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027692
Martin v. Löwis11437992002-04-12 09:54:03 +000027693debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027694ac_cs_recheck=false
27695ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027696SHELL=\${CONFIG_SHELL-$SHELL}
27697_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027698
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027699cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027700## --------------------- ##
27701## M4sh Initialization. ##
27702## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027703
Martin v. Löwiseba40652007-08-30 20:10:57 +000027704# Be more Bourne compatible
27705DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027706if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27707 emulate sh
27708 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027709 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027710 # is contrary to our usage. Disable this feature.
27711 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027712 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000027713else
Martin v. Löwiseba40652007-08-30 20:10:57 +000027714 case `(set -o) 2>/dev/null` in
27715 *posix*) set -o posix ;;
27716esac
27717
Martin v. Löwis11437992002-04-12 09:54:03 +000027718fi
Michael W. Hudson54241132001-12-07 15:38:26 +000027719
Skip Montanaro6dead952003-09-25 14:50:04 +000027720
Martin v. Löwis11437992002-04-12 09:54:03 +000027721
27722
Martin v. Löwiseba40652007-08-30 20:10:57 +000027723# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027724# Avoid depending upon Character Ranges.
27725as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27726as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27727as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27728as_cr_digits='0123456789'
27729as_cr_alnum=$as_cr_Letters$as_cr_digits
27730
27731# The user is always right.
27732if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027733 echo "#! /bin/sh" >conf$$.sh
27734 echo "exit 0" >>conf$$.sh
27735 chmod +x conf$$.sh
27736 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27737 PATH_SEPARATOR=';'
27738 else
27739 PATH_SEPARATOR=:
27740 fi
27741 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027742fi
27743
Martin v. Löwiseba40652007-08-30 20:10:57 +000027744# Support unset when possible.
27745if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27746 as_unset=unset
27747else
27748 as_unset=false
27749fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027750
Martin v. Löwiseba40652007-08-30 20:10:57 +000027751
27752# IFS
27753# We need space, tab and new line, in precisely that order. Quoting is
27754# there to prevent editors from complaining about space-tab.
27755# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27756# splitting by setting IFS to empty value.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027757as_nl='
27758'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027759IFS=" "" $as_nl"
27760
27761# Find who we are. Look in the path if we contain no directory separator.
27762case $0 in
27763 *[\\/]* ) as_myself=$0 ;;
27764 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000027765for as_dir in $PATH
27766do
27767 IFS=$as_save_IFS
27768 test -z "$as_dir" && as_dir=.
27769 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27770done
Martin v. Löwiseba40652007-08-30 20:10:57 +000027771IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000027772
Martin v. Löwiseba40652007-08-30 20:10:57 +000027773 ;;
27774esac
27775# We did not find ourselves, most probably we were run as `sh COMMAND'
27776# in which case we are not to be found in the path.
27777if test "x$as_myself" = x; then
27778 as_myself=$0
27779fi
27780if test ! -f "$as_myself"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027781 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +000027782 { (exit 1); exit 1; }
27783fi
27784
27785# Work around bugs in pre-3.0 UWIN ksh.
27786for as_var in ENV MAIL MAILPATH
27787do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27788done
27789PS1='$ '
27790PS2='> '
27791PS4='+ '
27792
27793# NLS nuisances.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027794for as_var in \
27795 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
27796 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
27797 LC_TELEPHONE LC_TIME
27798do
27799 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
27800 eval $as_var=C; export $as_var
27801 else
27802 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27803 fi
27804done
Martin v. Löwiseba40652007-08-30 20:10:57 +000027805
27806# Required to use basename.
27807if expr a : '\(a\)' >/dev/null 2>&1 &&
27808 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27809 as_expr=expr
27810else
27811 as_expr=false
27812fi
27813
27814if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27815 as_basename=basename
27816else
27817 as_basename=false
27818fi
27819
27820
27821# Name of the executable.
27822as_me=`$as_basename -- "$0" ||
27823$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27824 X"$0" : 'X\(//\)$' \| \
27825 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027826echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027827 sed '/^.*\/\([^/][^/]*\)\/*$/{
27828 s//\1/
27829 q
27830 }
27831 /^X\/\(\/\/\)$/{
27832 s//\1/
27833 q
27834 }
27835 /^X\/\(\/\).*/{
27836 s//\1/
27837 q
27838 }
27839 s/.*/./; q'`
27840
27841# CDPATH.
27842$as_unset CDPATH
27843
27844
27845
Martin v. Löwis11437992002-04-12 09:54:03 +000027846 as_lineno_1=$LINENO
27847 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000027848 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000027849 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000027850
Martin v. Löwis11437992002-04-12 09:54:03 +000027851 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
27852 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000027853 # line-number line after each line using $LINENO; the second 'sed'
27854 # does the real work. The second script uses 'N' to pair each
27855 # line-number line with the line containing $LINENO, and appends
27856 # trailing '-' during substitution so that $LINENO is not a special
27857 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000027858 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000027859 # scripts with optimization help from Paolo Bonzini. Blame Lee
27860 # E. McMahon (1931-1989) for sed's syntax. :-)
27861 sed -n '
27862 p
27863 /[$]LINENO/=
27864 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000027865 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000027866 s/[$]LINENO.*/&-/
27867 t lineno
27868 b
27869 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000027870 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000027871 :loop
27872 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000027873 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000027874 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000027875 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000027876 chmod +x "$as_me.lineno" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027877 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027878 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027879
Martin v. Löwis11437992002-04-12 09:54:03 +000027880 # Don't try to exec as it changes $[0], causing all sort of problems
27881 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000027882 # original and so on. Autoconf is especially sensitive to this).
27883 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000027884 # Exit status is that of the last command.
27885 exit
27886}
27887
27888
Martin v. Löwiseba40652007-08-30 20:10:57 +000027889if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27890 as_dirname=dirname
27891else
27892 as_dirname=false
27893fi
27894
27895ECHO_C= ECHO_N= ECHO_T=
27896case `echo -n x` in
27897-n*)
27898 case `echo 'x\c'` in
27899 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27900 *) ECHO_C='\c';;
27901 esac;;
27902*)
27903 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027904esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027905
Martin v. Löwiseba40652007-08-30 20:10:57 +000027906if expr a : '\(a\)' >/dev/null 2>&1 &&
27907 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027908 as_expr=expr
27909else
27910 as_expr=false
27911fi
27912
27913rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000027914if test -d conf$$.dir; then
27915 rm -f conf$$.dir/conf$$.file
27916else
27917 rm -f conf$$.dir
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027918 mkdir conf$$.dir
Martin v. Löwiseba40652007-08-30 20:10:57 +000027919fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027920echo >conf$$.file
27921if ln -s conf$$.file conf$$ 2>/dev/null; then
27922 as_ln_s='ln -s'
27923 # ... but there are two gotchas:
27924 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27925 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27926 # In both cases, we have to default to `cp -p'.
27927 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027928 as_ln_s='cp -p'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027929elif ln conf$$.file conf$$ 2>/dev/null; then
27930 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000027931else
27932 as_ln_s='cp -p'
27933fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027934rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27935rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027936
Skip Montanaro6dead952003-09-25 14:50:04 +000027937if mkdir -p . 2>/dev/null; then
27938 as_mkdir_p=:
27939else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027940 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027941 as_mkdir_p=false
27942fi
27943
Martin v. Löwiseba40652007-08-30 20:10:57 +000027944if test -x / >/dev/null 2>&1; then
27945 as_test_x='test -x'
27946else
27947 if ls -dL / >/dev/null 2>&1; then
27948 as_ls_L_option=L
27949 else
27950 as_ls_L_option=
27951 fi
27952 as_test_x='
27953 eval sh -c '\''
27954 if test -d "$1"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027955 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000027956 else
27957 case $1 in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027958 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027959 esac;
27960 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27961 ???[sx]*):;;*)false;;esac;fi
27962 '\'' sh
27963 '
27964fi
27965as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027966
27967# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027968as_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 +000027969
27970# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027971as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027972
27973
Martin v. Löwis11437992002-04-12 09:54:03 +000027974exec 6>&1
27975
Martin v. Löwiseba40652007-08-30 20:10:57 +000027976# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027977# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000027978# values after options handling.
27979ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000027980This file was extended by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027981generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027982
27983 CONFIG_FILES = $CONFIG_FILES
27984 CONFIG_HEADERS = $CONFIG_HEADERS
27985 CONFIG_LINKS = $CONFIG_LINKS
27986 CONFIG_COMMANDS = $CONFIG_COMMANDS
27987 $ $0 $@
27988
Martin v. Löwiseba40652007-08-30 20:10:57 +000027989on `(hostname || uname -n) 2>/dev/null | sed 1q`
27990"
27991
Martin v. Löwis11437992002-04-12 09:54:03 +000027992_ACEOF
27993
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027994cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027995# Files that config.status was made for.
Ronald Oussoren450d5612009-06-08 21:12:41 +000027996config_files="$ac_config_files"
27997config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027998
Martin v. Löwiseba40652007-08-30 20:10:57 +000027999_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028000
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028001cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028002ac_cs_usage="\
28003\`$as_me' instantiates files from templates according to the
28004current configuration.
28005
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028006Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000028007
28008 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000028009 -V, --version print version number and configuration settings, then exit
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028010 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000028011 -d, --debug don't remove temporary files
28012 --recheck update $as_me by reconfiguring in the same conditions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028013 --file=FILE[:TEMPLATE]
28014 instantiate the configuration file FILE
28015 --header=FILE[:TEMPLATE]
28016 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000028017
28018Configuration files:
28019$config_files
28020
28021Configuration headers:
28022$config_headers
28023
28024Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000028025
Martin v. Löwiseba40652007-08-30 20:10:57 +000028026_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028027cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028028ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000028029python config.status 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028030configured by $0, generated by GNU Autoconf 2.61,
28031 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000028032
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028033Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000028034This config.status script is free software; the Free Software Foundation
28035gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000028036
28037ac_pwd='$ac_pwd'
28038srcdir='$srcdir'
28039INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000028040_ACEOF
28041
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028042cat >>$CONFIG_STATUS <<\_ACEOF
28043# If no file are specified by the user, then we need to provide default
28044# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000028045ac_need_defaults=:
28046while test $# != 0
28047do
28048 case $1 in
28049 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000028050 ac_option=`expr "X$1" : 'X\([^=]*\)='`
28051 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000028052 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000028053 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028054 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000028055 ac_option=$1
28056 ac_optarg=$2
28057 ac_shift=shift
28058 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028059 esac
28060
Skip Montanaro6dead952003-09-25 14:50:04 +000028061 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000028062 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000028063 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28064 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028065 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028066 echo "$ac_cs_version"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028067 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000028068 debug=: ;;
28069 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000028070 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028071 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000028072 ac_need_defaults=false;;
28073 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000028074 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028075 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000028076 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028077 --he | --h)
28078 # Conflict between --help and --header
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028079 { echo "$as_me: error: ambiguous option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000028080Try \`$0 --help' for more information." >&2
28081 { (exit 1); exit 1; }; };;
28082 --help | --hel | -h )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028083 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000028084 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
28085 | -silent | --silent | --silen | --sile | --sil | --si | --s)
28086 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028087
28088 # This is an error.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028089 -*) { echo "$as_me: error: unrecognized option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000028090Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028091 { (exit 1); exit 1; }; } ;;
28092
Martin v. Löwiseba40652007-08-30 20:10:57 +000028093 *) ac_config_targets="$ac_config_targets $1"
28094 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028095
28096 esac
28097 shift
28098done
28099
Skip Montanaro6dead952003-09-25 14:50:04 +000028100ac_configure_extra_args=
28101
28102if $ac_cs_silent; then
28103 exec 6>/dev/null
28104 ac_configure_extra_args="$ac_configure_extra_args --silent"
28105fi
28106
28107_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028108cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000028109if \$ac_cs_recheck; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028110 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
28111 CONFIG_SHELL=$SHELL
Martin v. Löwiseba40652007-08-30 20:10:57 +000028112 export CONFIG_SHELL
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028113 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000028114fi
28115
Martin v. Löwis11437992002-04-12 09:54:03 +000028116_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028117cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028118exec 5>>config.log
28119{
28120 echo
28121 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
28122## Running $as_me. ##
28123_ASBOX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028124 echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028125} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000028126
Martin v. Löwiseba40652007-08-30 20:10:57 +000028127_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028128cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028129_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028130
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028131cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028132
28133# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000028134for ac_config_target in $ac_config_targets
28135do
Martin v. Löwiseba40652007-08-30 20:10:57 +000028136 case $ac_config_target in
28137 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
28138 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
28139 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
28140 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000028141 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
28142 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028143 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
28144 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000028145 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028146
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028147 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
28148echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028149 { (exit 1); exit 1; }; };;
28150 esac
28151done
28152
Martin v. Löwiseba40652007-08-30 20:10:57 +000028153
Martin v. Löwis11437992002-04-12 09:54:03 +000028154# If the user did not use the arguments to specify the items to instantiate,
28155# then the envvar interface is used. Set only those that are not.
28156# We use the long form for the default assignment because of an extremely
28157# bizarre bug on SunOS 4.1.3.
28158if $ac_need_defaults; then
28159 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
28160 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
28161fi
28162
Skip Montanaro6dead952003-09-25 14:50:04 +000028163# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000028164# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000028165# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000028166# Hook for its removal unless debugging.
28167# Note that there is a small window in which the directory will not be cleaned:
28168# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000028169$debug ||
28170{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028171 tmp=
28172 trap 'exit_status=$?
28173 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
28174' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000028175 trap '{ (exit 1); exit 1; }' 1 2 13 15
28176}
Martin v. Löwis11437992002-04-12 09:54:03 +000028177# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000028178
Martin v. Löwis11437992002-04-12 09:54:03 +000028179{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028180 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000028181 test -n "$tmp" && test -d "$tmp"
28182} ||
28183{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028184 tmp=./conf$$-$RANDOM
28185 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000028186} ||
28187{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028188 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028189 { (exit 1); exit 1; }
28190}
28191
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028192#
28193# Set up the sed scripts for CONFIG_FILES section.
28194#
28195
28196# No need to generate the scripts if there are no CONFIG_FILES.
28197# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000028198if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000028199
28200_ACEOF
28201
Martin v. Löwiseba40652007-08-30 20:10:57 +000028202
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028203
Martin v. Löwiseba40652007-08-30 20:10:57 +000028204ac_delim='%!_!# '
28205for ac_last_try in false false false false false :; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028206 cat >conf$$subs.sed <<_ACEOF
28207SHELL!$SHELL$ac_delim
28208PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
28209PACKAGE_NAME!$PACKAGE_NAME$ac_delim
28210PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
28211PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
28212PACKAGE_STRING!$PACKAGE_STRING$ac_delim
28213PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
28214exec_prefix!$exec_prefix$ac_delim
28215prefix!$prefix$ac_delim
28216program_transform_name!$program_transform_name$ac_delim
28217bindir!$bindir$ac_delim
28218sbindir!$sbindir$ac_delim
28219libexecdir!$libexecdir$ac_delim
28220datarootdir!$datarootdir$ac_delim
28221datadir!$datadir$ac_delim
28222sysconfdir!$sysconfdir$ac_delim
28223sharedstatedir!$sharedstatedir$ac_delim
28224localstatedir!$localstatedir$ac_delim
28225includedir!$includedir$ac_delim
28226oldincludedir!$oldincludedir$ac_delim
28227docdir!$docdir$ac_delim
28228infodir!$infodir$ac_delim
28229htmldir!$htmldir$ac_delim
28230dvidir!$dvidir$ac_delim
28231pdfdir!$pdfdir$ac_delim
28232psdir!$psdir$ac_delim
28233libdir!$libdir$ac_delim
28234localedir!$localedir$ac_delim
28235mandir!$mandir$ac_delim
28236DEFS!$DEFS$ac_delim
28237ECHO_C!$ECHO_C$ac_delim
28238ECHO_N!$ECHO_N$ac_delim
28239ECHO_T!$ECHO_T$ac_delim
28240LIBS!$LIBS$ac_delim
28241build_alias!$build_alias$ac_delim
28242host_alias!$host_alias$ac_delim
28243target_alias!$target_alias$ac_delim
28244VERSION!$VERSION$ac_delim
28245SOVERSION!$SOVERSION$ac_delim
28246CONFIG_ARGS!$CONFIG_ARGS$ac_delim
28247UNIVERSALSDK!$UNIVERSALSDK$ac_delim
28248ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Ronald Oussoren92919a62009-12-24 13:30:58 +000028249LIPO_32BIT_FLAGS!$LIPO_32BIT_FLAGS$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028250PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
28251PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
28252PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
28253PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
28254PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
28255FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
28256FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
28257FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
28258FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
28259FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
28260MACHDEP!$MACHDEP$ac_delim
28261SGI_ABI!$SGI_ABI$ac_delim
28262EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
28263EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
28264CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
28265EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
28266CC!$CC$ac_delim
28267CFLAGS!$CFLAGS$ac_delim
28268LDFLAGS!$LDFLAGS$ac_delim
28269CPPFLAGS!$CPPFLAGS$ac_delim
28270ac_ct_CC!$ac_ct_CC$ac_delim
28271EXEEXT!$EXEEXT$ac_delim
28272OBJEXT!$OBJEXT$ac_delim
28273CXX!$CXX$ac_delim
28274MAINCC!$MAINCC$ac_delim
28275CPP!$CPP$ac_delim
28276GREP!$GREP$ac_delim
28277EGREP!$EGREP$ac_delim
28278BUILDEXEEXT!$BUILDEXEEXT$ac_delim
28279LIBRARY!$LIBRARY$ac_delim
28280LDLIBRARY!$LDLIBRARY$ac_delim
28281DLLLIBRARY!$DLLLIBRARY$ac_delim
28282BLDLIBRARY!$BLDLIBRARY$ac_delim
28283LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
28284INSTSONAME!$INSTSONAME$ac_delim
28285RUNSHARED!$RUNSHARED$ac_delim
28286LINKCC!$LINKCC$ac_delim
28287GNULD!$GNULD$ac_delim
28288RANLIB!$RANLIB$ac_delim
28289AR!$AR$ac_delim
28290ARFLAGS!$ARFLAGS$ac_delim
28291SVNVERSION!$SVNVERSION$ac_delim
28292INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
28293INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
28294INSTALL_DATA!$INSTALL_DATA$ac_delim
28295LN!$LN$ac_delim
28296OPT!$OPT$ac_delim
28297BASECFLAGS!$BASECFLAGS$ac_delim
28298UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
28299OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
28300LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
28301SO!$SO$ac_delim
28302LDSHARED!$LDSHARED$ac_delim
28303BLDSHARED!$BLDSHARED$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028304_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028305
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028306 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 +000028307 break
28308 elif $ac_last_try; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028309 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28310echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028311 { (exit 1); exit 1; }; }
28312 else
28313 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000028314 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000028315done
28316
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028317ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28318if test -n "$ac_eof"; then
28319 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28320 ac_eof=`expr $ac_eof + 1`
28321fi
28322
28323cat >>$CONFIG_STATUS <<_ACEOF
28324cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
28325/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000028326_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028327sed '
28328s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28329s/^/s,@/; s/!/@,|#_!!_#|/
28330:n
28331t n
28332s/'"$ac_delim"'$/,g/; t
28333s/$/\\/; p
28334N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28335' >>$CONFIG_STATUS <conf$$subs.sed
28336rm -f conf$$subs.sed
28337cat >>$CONFIG_STATUS <<_ACEOF
28338CEOF$ac_eof
Martin v. Löwiseba40652007-08-30 20:10:57 +000028339_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028340
28341
28342ac_delim='%!_!# '
28343for ac_last_try in false false false false false :; do
28344 cat >conf$$subs.sed <<_ACEOF
Ronald Oussoren92919a62009-12-24 13:30:58 +000028345CCSHARED!$CCSHARED$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028346LINKFORSHARED!$LINKFORSHARED$ac_delim
28347CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
28348SHLIBS!$SHLIBS$ac_delim
28349USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
28350SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
28351USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
28352LDLAST!$LDLAST$ac_delim
28353THREADOBJ!$THREADOBJ$ac_delim
28354DLINCLDIR!$DLINCLDIR$ac_delim
28355DYNLOADFILE!$DYNLOADFILE$ac_delim
28356MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
28357TRUE!$TRUE$ac_delim
28358LIBOBJS!$LIBOBJS$ac_delim
28359HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
28360HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
28361HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
28362HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
28363HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
28364LIBM!$LIBM$ac_delim
28365LIBC!$LIBC$ac_delim
28366UNICODE_OBJS!$UNICODE_OBJS$ac_delim
28367THREADHEADERS!$THREADHEADERS$ac_delim
28368SRCDIRS!$SRCDIRS$ac_delim
28369LTLIBOBJS!$LTLIBOBJS$ac_delim
28370_ACEOF
28371
Ronald Oussoren92919a62009-12-24 13:30:58 +000028372 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 25; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028373 break
28374 elif $ac_last_try; then
28375 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28376echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028377 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028378 else
28379 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28380 fi
28381done
28382
28383ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28384if test -n "$ac_eof"; then
28385 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28386 ac_eof=`expr $ac_eof + 1`
28387fi
28388
28389cat >>$CONFIG_STATUS <<_ACEOF
28390cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
28391/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Martin v. Löwiseba40652007-08-30 20:10:57 +000028392_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028393sed '
28394s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28395s/^/s,@/; s/!/@,|#_!!_#|/
28396:n
28397t n
28398s/'"$ac_delim"'$/,g/; t
28399s/$/\\/; p
28400N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28401' >>$CONFIG_STATUS <conf$$subs.sed
28402rm -f conf$$subs.sed
28403cat >>$CONFIG_STATUS <<_ACEOF
28404:end
28405s/|#_!!_#|//g
28406CEOF$ac_eof
28407_ACEOF
28408
Martin v. Löwiseba40652007-08-30 20:10:57 +000028409
28410# VPATH may cause trouble with some makes, so we remove $(srcdir),
28411# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28412# trailing colons and then remove the whole line if VPATH becomes empty
28413# (actually we leave an empty line to preserve line numbers).
28414if test "x$srcdir" = x.; then
28415 ac_vpsub='/^[ ]*VPATH[ ]*=/{
28416s/:*\$(srcdir):*/:/
28417s/:*\${srcdir}:*/:/
28418s/:*@srcdir@:*/:/
28419s/^\([^=]*=[ ]*\):*/\1/
28420s/:*$//
28421s/^[^=]*=[ ]*$//
28422}'
28423fi
28424
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028425cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028426fi # test -n "$CONFIG_FILES"
28427
Martin v. Löwiseba40652007-08-30 20:10:57 +000028428
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028429for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Martin v. Löwiseba40652007-08-30 20:10:57 +000028430do
28431 case $ac_tag in
28432 :[FHLC]) ac_mode=$ac_tag; continue;;
28433 esac
28434 case $ac_mode$ac_tag in
28435 :[FHL]*:*);;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028436 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
28437echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028438 { (exit 1); exit 1; }; };;
28439 :[FH]-) ac_tag=-:-;;
28440 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28441 esac
28442 ac_save_IFS=$IFS
28443 IFS=:
28444 set x $ac_tag
28445 IFS=$ac_save_IFS
28446 shift
28447 ac_file=$1
28448 shift
28449
28450 case $ac_mode in
28451 :L) ac_source=$1;;
28452 :[FH])
28453 ac_file_inputs=
28454 for ac_f
28455 do
28456 case $ac_f in
28457 -) ac_f="$tmp/stdin";;
28458 *) # Look for the file first in the build tree, then in the source tree
28459 # (if the path is not absolute). The absolute path cannot be DOS-style,
28460 # because $ac_f cannot contain `:'.
28461 test -f "$ac_f" ||
28462 case $ac_f in
28463 [\\/$]*) false;;
28464 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28465 esac ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028466 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
28467echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028468 { (exit 1); exit 1; }; };;
28469 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028470 ac_file_inputs="$ac_file_inputs $ac_f"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028471 done
28472
28473 # Let's still pretend it is `configure' which instantiates (i.e., don't
28474 # use $as_me), people would be surprised to read:
28475 # /* config.h. Generated by config.status. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028476 configure_input="Generated from "`IFS=:
28477 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Martin v. Löwiseba40652007-08-30 20:10:57 +000028478 if test x"$ac_file" != x-; then
28479 configure_input="$ac_file. $configure_input"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028480 { echo "$as_me:$LINENO: creating $ac_file" >&5
28481echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028482 fi
28483
28484 case $ac_tag in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028485 *:-:* | *:-) cat >"$tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028486 esac
28487 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028488 esac
28489
Martin v. Löwiseba40652007-08-30 20:10:57 +000028490 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028491$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028492 X"$ac_file" : 'X\(//\)[^/]' \| \
28493 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000028494 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028495echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028496 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28497 s//\1/
28498 q
28499 }
28500 /^X\(\/\/\)[^/].*/{
28501 s//\1/
28502 q
28503 }
28504 /^X\(\/\/\)$/{
28505 s//\1/
28506 q
28507 }
28508 /^X\(\/\).*/{
28509 s//\1/
28510 q
28511 }
28512 s/.*/./; q'`
28513 { as_dir="$ac_dir"
28514 case $as_dir in #(
28515 -*) as_dir=./$as_dir;;
28516 esac
28517 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000028518 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000028519 while :; do
28520 case $as_dir in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028521 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Martin v. Löwiseba40652007-08-30 20:10:57 +000028522 *) as_qdir=$as_dir;;
28523 esac
28524 as_dirs="'$as_qdir' $as_dirs"
28525 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000028526$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028527 X"$as_dir" : 'X\(//\)[^/]' \| \
28528 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000028529 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028530echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028531 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28532 s//\1/
28533 q
28534 }
28535 /^X\(\/\/\)[^/].*/{
28536 s//\1/
28537 q
28538 }
28539 /^X\(\/\/\)$/{
28540 s//\1/
28541 q
28542 }
28543 /^X\(\/\).*/{
28544 s//\1/
28545 q
28546 }
28547 s/.*/./; q'`
28548 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000028549 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000028550 test -z "$as_dirs" || eval "mkdir $as_dirs"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028551 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
28552echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000028553 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028554 ac_builddir=.
28555
Martin v. Löwiseba40652007-08-30 20:10:57 +000028556case "$ac_dir" in
28557.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28558*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028559 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028560 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028561 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028562 case $ac_top_builddir_sub in
28563 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28564 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28565 esac ;;
28566esac
28567ac_abs_top_builddir=$ac_pwd
28568ac_abs_builddir=$ac_pwd$ac_dir_suffix
28569# for backward compatibility:
28570ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000028571
28572case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028573 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000028574 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000028575 ac_top_srcdir=$ac_top_builddir_sub
28576 ac_abs_top_srcdir=$ac_pwd ;;
28577 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000028578 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028579 ac_top_srcdir=$srcdir
28580 ac_abs_top_srcdir=$srcdir ;;
28581 *) # Relative name.
28582 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28583 ac_top_srcdir=$ac_top_build_prefix$srcdir
28584 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028585esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028586ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000028587
Martin v. Löwis11437992002-04-12 09:54:03 +000028588
Martin v. Löwiseba40652007-08-30 20:10:57 +000028589 case $ac_mode in
28590 :F)
28591 #
28592 # CONFIG_FILE
28593 #
Martin v. Löwis11437992002-04-12 09:54:03 +000028594
28595 case $INSTALL in
28596 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028597 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028598 esac
Brett Cannon19fab762007-06-02 03:02:29 +000028599_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028600
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028601cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028602# If the template does not know about datarootdir, expand it.
28603# FIXME: This hack should be removed a few years after 2.60.
28604ac_datarootdir_hack=; ac_datarootdir_seen=
28605
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028606case `sed -n '/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000028607 p
28608 q
28609}
28610/@datadir@/p
28611/@docdir@/p
28612/@infodir@/p
28613/@localedir@/p
28614/@mandir@/p
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028615' $ac_file_inputs` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028616*datarootdir*) ac_datarootdir_seen=yes;;
28617*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028618 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28619echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028620_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028621cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028622 ac_datarootdir_hack='
28623 s&@datadir@&$datadir&g
28624 s&@docdir@&$docdir&g
28625 s&@infodir@&$infodir&g
28626 s&@localedir@&$localedir&g
28627 s&@mandir@&$mandir&g
28628 s&\\\${datarootdir}&$datarootdir&g' ;;
28629esac
28630_ACEOF
28631
28632# Neutralize VPATH when `$srcdir' = `.'.
28633# Shell code in configure.ac might set extrasub.
28634# FIXME: do we really want to maintain this feature?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028635cat >>$CONFIG_STATUS <<_ACEOF
28636 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028637$extrasub
28638_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028639cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028640:t
28641/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028642s&@configure_input@&$configure_input&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000028643s&@top_builddir@&$ac_top_builddir_sub&;t t
28644s&@srcdir@&$ac_srcdir&;t t
28645s&@abs_srcdir@&$ac_abs_srcdir&;t t
28646s&@top_srcdir@&$ac_top_srcdir&;t t
28647s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28648s&@builddir@&$ac_builddir&;t t
28649s&@abs_builddir@&$ac_abs_builddir&;t t
28650s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28651s&@INSTALL@&$ac_INSTALL&;t t
28652$ac_datarootdir_hack
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028653" $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 +000028654
Martin v. Löwiseba40652007-08-30 20:10:57 +000028655test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28656 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28657 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028658 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028659which seems to be undefined. Please make sure it is defined." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028660echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028661which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028662
Martin v. Löwiseba40652007-08-30 20:10:57 +000028663 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028664 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028665 -) cat "$tmp/out"; rm -f "$tmp/out";;
28666 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
28667 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028668 ;;
28669 :H)
28670 #
28671 # CONFIG_HEADER
28672 #
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028673_ACEOF
28674
28675# Transform confdefs.h into a sed script `conftest.defines', that
28676# substitutes the proper values into config.h.in to produce config.h.
28677rm -f conftest.defines conftest.tail
28678# First, append a space to every undef/define line, to ease matching.
28679echo 's/$/ /' >conftest.defines
28680# Then, protect against being on the right side of a sed subst, or in
28681# an unquoted here document, in config.status. If some macros were
28682# called several times there might be several #defines for the same
28683# symbol, which is useless. But do not sort them, since the last
28684# AC_DEFINE must be honored.
28685ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28686# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
28687# NAME is the cpp macro being defined, VALUE is the value it is being given.
28688# PARAMS is the parameter list in the macro definition--in most cases, it's
28689# just an empty string.
28690ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
28691ac_dB='\\)[ (].*,\\1define\\2'
28692ac_dC=' '
28693ac_dD=' ,'
28694
28695uniq confdefs.h |
28696 sed -n '
28697 t rset
28698 :rset
28699 s/^[ ]*#[ ]*define[ ][ ]*//
28700 t ok
28701 d
28702 :ok
28703 s/[\\&,]/\\&/g
28704 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
28705 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
28706 ' >>conftest.defines
28707
28708# Remove the space that was appended to ease matching.
28709# Then replace #undef with comments. This is necessary, for
28710# example, in the case of _POSIX_SOURCE, which is predefined and required
28711# on some systems where configure will not decide to define it.
28712# (The regexp can be short, since the line contains either #define or #undef.)
28713echo 's/ $//
28714s,^[ #]*u.*,/* & */,' >>conftest.defines
28715
28716# Break up conftest.defines:
28717ac_max_sed_lines=50
28718
28719# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28720# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28721# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28722# et cetera.
28723ac_in='$ac_file_inputs'
28724ac_out='"$tmp/out1"'
28725ac_nxt='"$tmp/out2"'
28726
28727while :
28728do
28729 # Write a here document:
28730 cat >>$CONFIG_STATUS <<_ACEOF
28731 # First, check the format of the line:
28732 cat >"\$tmp/defines.sed" <<\\CEOF
28733/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
28734/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
28735b
28736:def
28737_ACEOF
28738 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
28739 echo 'CEOF
28740 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
28741 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
28742 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
28743 grep . conftest.tail >/dev/null || break
28744 rm -f conftest.defines
28745 mv conftest.tail conftest.defines
28746done
28747rm -f conftest.defines conftest.tail
28748
28749echo "ac_result=$ac_in" >>$CONFIG_STATUS
28750cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028751 if test x"$ac_file" != x-; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028752 echo "/* $configure_input */" >"$tmp/config.h"
28753 cat "$ac_result" >>"$tmp/config.h"
28754 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
28755 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28756echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028757 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028758 rm -f $ac_file
28759 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000028760 fi
28761 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028762 echo "/* $configure_input */"
28763 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000028764 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028765 rm -f "$tmp/out12"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028766 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000028767
Martin v. Löwiseba40652007-08-30 20:10:57 +000028768
28769 esac
28770
28771done # for ac_tag
28772
Guido van Rossum627b2d71993-12-24 10:39:16 +000028773
Martin v. Löwis11437992002-04-12 09:54:03 +000028774{ (exit 0); exit 0; }
28775_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028776chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000028777ac_clean_files=$ac_clean_files_save
28778
28779
28780# configure is writing to config.log, and then calls config.status.
28781# config.status does its own redirection, appending to config.log.
28782# Unfortunately, on DOS this fails, as config.log is still kept open
28783# by configure, so config.status won't be able to write to it; its
28784# output is simply discarded. So we exec the FD to /dev/null,
28785# effectively closing config.log, so it can be properly (re)opened and
28786# appended to by config.status. When coming back to configure, we
28787# need to make the FD available again.
28788if test "$no_create" != yes; then
28789 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000028790 ac_config_status_args=
28791 test "$silent" = yes &&
28792 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000028793 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000028794 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000028795 exec 5>>config.log
28796 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28797 # would make configure fail if this is the last instruction.
28798 $ac_cs_success || { (exit 1); exit 1; }
28799fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000028800
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028801
Martin v. Löwisf7afe952006-04-14 15:16:15 +000028802echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028803if test ! -f Modules/Setup
28804then
28805 cp $srcdir/Modules/Setup.dist Modules/Setup
28806fi
28807
Martin v. Löwisf7afe952006-04-14 15:16:15 +000028808echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028809if test ! -f Modules/Setup.local
28810then
28811 echo "# Edit this file for local setup changes" >Modules/Setup.local
28812fi
28813
28814echo "creating Makefile"
28815$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
28816 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000028817 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000028818
28819case $ac_sys_system in
28820BeOS)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028821 { echo "$as_me:$LINENO: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000028822
28823 Support for BeOS is deprecated as of Python 2.6.
28824 See PEP 11 for the gory details.
28825 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028826echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000028827
28828 Support for BeOS is deprecated as of Python 2.6.
28829 See PEP 11 for the gory details.
28830 " >&2;}
28831 ;;
28832*) ;;
28833esac
28834
Neil Schemenauerc761fc82001-02-19 04:50:49 +000028835mv config.c Modules