blob: 9fd579adc52020e34c40127cc6285c21ca5536bc [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Mark Dickinson5afa6d42009-11-28 10:44:20 +00002# From configure.in Revision: 76550 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004# Generated by GNU Autoconf 2.61 for python 2.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandl464432d2009-05-20 18:24:08 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Martin v. Löwiseba40652007-08-30 20:10:57 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Martin v. Löwiseba40652007-08-30 20:10:57 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000022 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000025else
Martin v. Löwiseba40652007-08-30 20:10:57 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
31
Skip Montanaro6dead952003-09-25 14:50:04 +000032
Martin v. Löwis11437992002-04-12 09:54:03 +000033
34
Martin v. Löwiseba40652007-08-30 20:10:57 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
49 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
53 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Martin v. Löwiseba40652007-08-30 20:10:57 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Martin v. Löwiseba40652007-08-30 20:10:57 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000069as_nl='
70'
Martin v. Löwiseba40652007-08-30 20:10:57 +000071IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Martin v. Löwiseba40652007-08-30 20:10:57 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Martin v. Löwiseba40652007-08-30 20:10:57 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000093 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +000094 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
115 fi
116done
Martin v. Löwiseba40652007-08-30 20:10:57 +0000117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000138echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +0000139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000164 if test $as_have_required = yes && (eval ":
Martin v. Löwiseba40652007-08-30 20:10:57 +0000165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Martin v. Löwiseba40652007-08-30 20:10:57 +0000247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Martin v. Löwiseba40652007-08-30 20:10:57 +0000268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Skip Montanaro89e975f2007-08-22 19:05:21 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaro89e975f2007-08-22 19:05:21 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Martin v. Löwiseba40652007-08-30 20:10:57 +0000351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
Martin v. Löwiseba40652007-08-30 20:10:57 +0000422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000456 chmod +x "$as_me.lineno" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Martin v. Löwiseba40652007-08-30 20:10:57 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000485
Martin v. Löwiseba40652007-08-30 20:10:57 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000498 mkdir conf$$.dir
Martin v. Löwiseba40652007-08-30 20:10:57 +0000499fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +0000511else
512 as_ln_s='cp -p'
513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Martin v. Löwiseba40652007-08-30 20:10:57 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000535 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +0000536 else
537 case $1 in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000538 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Martin v. Löwiseba40652007-08-30 20:10:57 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Martin v. Löwis174440b2008-10-03 08:59:41 +0000578PACKAGE_VERSION='2.7'
579PACKAGE_STRING='python 2.7'
Georg Brandl464432d2009-05-20 18:24:08 +0000580PACKAGE_BUGREPORT='http://bugs.python.org/'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000611#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000619ac_subst_vars='SHELL
Alexandre Vassalottia2db6872009-07-17 07:46:46 +0000620PATH_SEPARATOR
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
660ARCH_RUN_32BIT
661PYTHONFRAMEWORK
662PYTHONFRAMEWORKIDENTIFIER
663PYTHONFRAMEWORKDIR
664PYTHONFRAMEWORKPREFIX
665PYTHONFRAMEWORKINSTALLDIR
666FRAMEWORKINSTALLFIRST
667FRAMEWORKINSTALLLAST
668FRAMEWORKALTINSTALLFIRST
669FRAMEWORKALTINSTALLLAST
670FRAMEWORKUNIXTOOLSPREFIX
671MACHDEP
672SGI_ABI
673EXTRAPLATDIR
674EXTRAMACHDEPPATH
675CONFIGURE_MACOSX_DEPLOYMENT_TARGET
676EXPORT_MACOSX_DEPLOYMENT_TARGET
677CC
678CFLAGS
679LDFLAGS
680CPPFLAGS
681ac_ct_CC
682EXEEXT
683OBJEXT
684CXX
685MAINCC
686CPP
687GREP
688EGREP
689BUILDEXEEXT
690LIBRARY
691LDLIBRARY
692DLLLIBRARY
693BLDLIBRARY
694LDLIBRARYDIR
695INSTSONAME
696RUNSHARED
697LINKCC
698GNULD
699RANLIB
700AR
701ARFLAGS
702SVNVERSION
703INSTALL_PROGRAM
704INSTALL_SCRIPT
705INSTALL_DATA
706LN
707OPT
708BASECFLAGS
709UNIVERSAL_ARCH_FLAGS
710OTHER_LIBTOOL_OPT
711LIBTOOL_CRUFT
712SO
713LDSHARED
714BLDSHARED
715CCSHARED
716LINKFORSHARED
717CFLAGSFORSHARED
718SHLIBS
719USE_SIGNAL_MODULE
720SIGNAL_OBJS
721USE_THREAD_MODULE
722LDLAST
723THREADOBJ
724DLINCLDIR
725DYNLOADFILE
726MACHDEP_OBJS
727TRUE
728LIBOBJS
729HAVE_GETHOSTBYNAME_R_6_ARG
730HAVE_GETHOSTBYNAME_R_5_ARG
731HAVE_GETHOSTBYNAME_R_3_ARG
732HAVE_GETHOSTBYNAME_R
733HAVE_GETHOSTBYNAME
734LIBM
735LIBC
736UNICODE_OBJS
737THREADHEADERS
738SRCDIRS
739LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000740ac_subst_files=''
Martin v. Löwiseba40652007-08-30 20:10:57 +0000741 ac_precious_vars='build_alias
742host_alias
743target_alias
744CC
745CFLAGS
746LDFLAGS
747LIBS
748CPPFLAGS
749CPP'
750
Guido van Rossum627b2d71993-12-24 10:39:16 +0000751
Guido van Rossum7f43da71994-08-01 12:15:30 +0000752# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000753ac_init_help=
754ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000755# The variables have the same names as the options, with
756# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000757cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000758exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000759no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000760no_recursion=
761prefix=NONE
762program_prefix=NONE
763program_suffix=NONE
764program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000766site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000767srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000768verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000769x_includes=NONE
770x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000771
772# Installation directory options.
773# These are left unexpanded so users can "make install exec_prefix=/foo"
774# and all the variables that are supposed to be based on exec_prefix
775# by default will actually change.
776# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000777# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000778bindir='${exec_prefix}/bin'
779sbindir='${exec_prefix}/sbin'
780libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000781datarootdir='${prefix}/share'
782datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000783sysconfdir='${prefix}/etc'
784sharedstatedir='${prefix}/com'
785localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000786includedir='${prefix}/include'
787oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000788docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
789infodir='${datarootdir}/info'
790htmldir='${docdir}'
791dvidir='${docdir}'
792pdfdir='${docdir}'
793psdir='${docdir}'
794libdir='${exec_prefix}/lib'
795localedir='${datarootdir}/locale'
796mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000797
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000799ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000801do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802 # If the previous option needs an argument, assign it.
803 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000804 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805 ac_prev=
806 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000807 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000808
Martin v. Löwiseba40652007-08-30 20:10:57 +0000809 case $ac_option in
810 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
811 *) ac_optarg=yes ;;
812 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000813
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000814 # Accept the important Cygnus configure options, so we can diagnose typos.
815
Martin v. Löwiseba40652007-08-30 20:10:57 +0000816 case $ac_dashdash$ac_option in
817 --)
818 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000819
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000820 -bindir | --bindir | --bindi | --bind | --bin | --bi)
821 ac_prev=bindir ;;
822 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000824
825 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000826 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000827 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000828 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000830 -cache-file | --cache-file | --cache-fil | --cache-fi \
831 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
832 ac_prev=cache_file ;;
833 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
834 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000835 cache_file=$ac_optarg ;;
836
837 --config-cache | -C)
838 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000839
Martin v. Löwiseba40652007-08-30 20:10:57 +0000840 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000842 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000843 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000844
Martin v. Löwiseba40652007-08-30 20:10:57 +0000845 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
846 | --dataroo | --dataro | --datar)
847 ac_prev=datarootdir ;;
848 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
849 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
850 datarootdir=$ac_optarg ;;
851
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852 -disable-* | --disable-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000853 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000854 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000855 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
856 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000857 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000858 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
859 eval enable_$ac_feature=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000860
861 -docdir | --docdir | --docdi | --doc | --do)
862 ac_prev=docdir ;;
863 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
864 docdir=$ac_optarg ;;
865
866 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
867 ac_prev=dvidir ;;
868 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
869 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870
871 -enable-* | --enable-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000872 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000874 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
875 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000876 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000877 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
878 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
881 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
882 | --exec | --exe | --ex)
883 ac_prev=exec_prefix ;;
884 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
885 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
886 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000887 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888
889 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000890 # Obsolete; use --with-gas.
891 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892
Martin v. Löwis11437992002-04-12 09:54:03 +0000893 -help | --help | --hel | --he | -h)
894 ac_init_help=long ;;
895 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
896 ac_init_help=recursive ;;
897 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
898 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
900 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000901 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000903 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904
Martin v. Löwiseba40652007-08-30 20:10:57 +0000905 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
906 ac_prev=htmldir ;;
907 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
908 | --ht=*)
909 htmldir=$ac_optarg ;;
910
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000911 -includedir | --includedir | --includedi | --included | --include \
912 | --includ | --inclu | --incl | --inc)
913 ac_prev=includedir ;;
914 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
915 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000916 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000917
918 -infodir | --infodir | --infodi | --infod | --info | --inf)
919 ac_prev=infodir ;;
920 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000922
923 -libdir | --libdir | --libdi | --libd)
924 ac_prev=libdir ;;
925 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000926 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000927
928 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
929 | --libexe | --libex | --libe)
930 ac_prev=libexecdir ;;
931 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
932 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934
Martin v. Löwiseba40652007-08-30 20:10:57 +0000935 -localedir | --localedir | --localedi | --localed | --locale)
936 ac_prev=localedir ;;
937 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
938 localedir=$ac_optarg ;;
939
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000941 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942 ac_prev=localstatedir ;;
943 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000944 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946
947 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
948 ac_prev=mandir ;;
949 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000953 # Obsolete; use --without-fp.
954 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955
956 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000958 no_create=yes ;;
959
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000960 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
961 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
962 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000963
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000964 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
965 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
966 | --oldin | --oldi | --old | --ol | --o)
967 ac_prev=oldincludedir ;;
968 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
969 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
970 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000971 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000972
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
974 ac_prev=prefix ;;
975 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000976 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000977
978 -program-prefix | --program-prefix | --program-prefi | --program-pref \
979 | --program-pre | --program-pr | --program-p)
980 ac_prev=program_prefix ;;
981 -program-prefix=* | --program-prefix=* | --program-prefi=* \
982 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000983 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000984
985 -program-suffix | --program-suffix | --program-suffi | --program-suff \
986 | --program-suf | --program-su | --program-s)
987 ac_prev=program_suffix ;;
988 -program-suffix=* | --program-suffix=* | --program-suffi=* \
989 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
992 -program-transform-name | --program-transform-name \
993 | --program-transform-nam | --program-transform-na \
994 | --program-transform-n | --program-transform- \
995 | --program-transform | --program-transfor \
996 | --program-transfo | --program-transf \
997 | --program-trans | --program-tran \
998 | --progr-tra | --program-tr | --program-t)
999 ac_prev=program_transform_name ;;
1000 -program-transform-name=* | --program-transform-name=* \
1001 | --program-transform-nam=* | --program-transform-na=* \
1002 | --program-transform-n=* | --program-transform-=* \
1003 | --program-transform=* | --program-transfor=* \
1004 | --program-transfo=* | --program-transf=* \
1005 | --program-trans=* | --program-tran=* \
1006 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
Martin v. Löwiseba40652007-08-30 20:10:57 +00001009 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1010 ac_prev=pdfdir ;;
1011 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1012 pdfdir=$ac_optarg ;;
1013
1014 -psdir | --psdir | --psdi | --psd | --ps)
1015 ac_prev=psdir ;;
1016 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1017 psdir=$ac_optarg ;;
1018
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1020 | -silent | --silent | --silen | --sile | --sil)
1021 silent=yes ;;
1022
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1024 ac_prev=sbindir ;;
1025 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1026 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028
1029 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1030 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1031 | --sharedst | --shareds | --shared | --share | --shar \
1032 | --sha | --sh)
1033 ac_prev=sharedstatedir ;;
1034 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1035 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1036 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1037 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001040 -site | --site | --sit)
1041 ac_prev=site ;;
1042 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001044
Guido van Rossum7f43da71994-08-01 12:15:30 +00001045 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1046 ac_prev=srcdir ;;
1047 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1051 | --syscon | --sysco | --sysc | --sys | --sy)
1052 ac_prev=sysconfdir ;;
1053 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1054 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001061
1062 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1063 verbose=yes ;;
1064
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 -version | --version | --versio | --versi | --vers | -V)
1066 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067
1068 -with-* | --with-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001069 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001070 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001071 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1072 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001074 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1075 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076
1077 -without-* | --without-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001078 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001080 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1081 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001083 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1084 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001086 --x)
1087 # Obsolete; use --with-x.
1088 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
1090 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1091 | --x-incl | --x-inc | --x-in | --x-i)
1092 ac_prev=x_includes ;;
1093 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1094 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
1097 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1098 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1099 ac_prev=x_libraries ;;
1100 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1101 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001104 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001105Try \`$0 --help' for more information." >&2
1106 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107 ;;
1108
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 *=*)
1110 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1111 # Reject names that are not valid shell variable names.
1112 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001113 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001115 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 export $ac_envvar ;;
1117
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001118 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 # FIXME: should be removed in autoconf 3.0.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001120 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001122 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124 ;;
1125
1126 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001127done
1128
Guido van Rossum7f43da71994-08-01 12:15:30 +00001129if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001131 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133fi
1134
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001135# Be sure to have absolute directory names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001136for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1137 datadir sysconfdir sharedstatedir localstatedir includedir \
1138 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1139 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001140do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001141 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001143 [\\/$]* | ?:[\\/]* ) continue;;
1144 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001146 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001147 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001148done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001149
Martin v. Löwis11437992002-04-12 09:54:03 +00001150# There might be people who depend on the old broken behavior: `$host'
1151# used to hold the argument of --host etc.
1152# FIXME: To remove some day.
1153build=$build_alias
1154host=$host_alias
1155target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001156
Martin v. Löwis11437992002-04-12 09:54:03 +00001157# FIXME: To remove some day.
1158if test "x$host_alias" != x; then
1159 if test "x$build_alias" = x; then
1160 cross_compiling=maybe
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001161 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 If a cross compiler is detected then cross compile mode will be used." >&2
1163 elif test "x$build_alias" != "x$host_alias"; then
1164 cross_compiling=yes
1165 fi
1166fi
1167
1168ac_tool_prefix=
1169test -n "$host_alias" && ac_tool_prefix=$host_alias-
1170
1171test "$silent" = yes && exec 6>/dev/null
1172
Guido van Rossum627b2d71993-12-24 10:39:16 +00001173
Martin v. Löwiseba40652007-08-30 20:10:57 +00001174ac_pwd=`pwd` && test -n "$ac_pwd" &&
1175ac_ls_di=`ls -di .` &&
1176ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001177 { echo "$as_me: error: Working directory cannot be determined" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001178 { (exit 1); exit 1; }; }
1179test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001180 { echo "$as_me: error: pwd does not report name of working directory" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001181 { (exit 1); exit 1; }; }
1182
1183
Guido van Rossum627b2d71993-12-24 10:39:16 +00001184# Find the source files, if location was not specified.
1185if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001187 # Try the directory containing this script, then the parent directory.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001188 ac_confdir=`$as_dirname -- "$0" ||
1189$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1190 X"$0" : 'X\(//\)[^/]' \| \
1191 X"$0" : 'X\(//\)$' \| \
1192 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1193echo X"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001194 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1195 s//\1/
1196 q
1197 }
1198 /^X\(\/\/\)[^/].*/{
1199 s//\1/
1200 q
1201 }
1202 /^X\(\/\/\)$/{
1203 s//\1/
1204 q
1205 }
1206 /^X\(\/\).*/{
1207 s//\1/
1208 q
1209 }
1210 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001212 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001213 srcdir=..
1214 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001215else
1216 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001217fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001218if test ! -r "$srcdir/$ac_unique_file"; then
1219 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001220 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001221 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001223ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1224ac_abs_confdir=`(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001225 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001226 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001227 pwd)`
1228# When building in place, set srcdir=.
1229if test "$ac_abs_confdir" = "$ac_pwd"; then
1230 srcdir=.
1231fi
1232# Remove unnecessary trailing slashes from srcdir.
1233# Double slashes in file names in object file debugging info
1234# mess up M-x gdb in Emacs.
1235case $srcdir in
1236*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1237esac
1238for ac_var in $ac_precious_vars; do
1239 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1240 eval ac_env_${ac_var}_value=\$${ac_var}
1241 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1242 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1243done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001244
Martin v. Löwis11437992002-04-12 09:54:03 +00001245#
1246# Report the --help message.
1247#
1248if test "$ac_init_help" = "long"; then
1249 # Omit some internal or obsolete options to make the list less imposing.
1250 # This message is too long to be a string in the A/UX 3.1 sh.
1251 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001252\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001253
1254Usage: $0 [OPTION]... [VAR=VALUE]...
1255
1256To assign environment variables (e.g., CC, CFLAGS...), specify them as
1257VAR=VALUE. See below for descriptions of some of the useful variables.
1258
1259Defaults for the options are specified in brackets.
1260
1261Configuration:
1262 -h, --help display this help and exit
1263 --help=short display options specific to this package
1264 --help=recursive display the short help of all the included packages
1265 -V, --version display version information and exit
1266 -q, --quiet, --silent do not print \`checking...' messages
1267 --cache-file=FILE cache test results in FILE [disabled]
1268 -C, --config-cache alias for \`--cache-file=config.cache'
1269 -n, --no-create do not create output files
1270 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1271
Martin v. Löwis11437992002-04-12 09:54:03 +00001272Installation directories:
1273 --prefix=PREFIX install architecture-independent files in PREFIX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001274 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001275 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001276 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001277
1278By default, \`make install' will install all the files in
1279\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1280an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1281for instance \`--prefix=\$HOME'.
1282
1283For better control, use the options below.
1284
1285Fine tuning of the installation directories:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001286 --bindir=DIR user executables [EPREFIX/bin]
1287 --sbindir=DIR system admin executables [EPREFIX/sbin]
1288 --libexecdir=DIR program executables [EPREFIX/libexec]
1289 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1290 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1291 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1292 --libdir=DIR object code libraries [EPREFIX/lib]
1293 --includedir=DIR C header files [PREFIX/include]
1294 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1295 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1296 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1297 --infodir=DIR info documentation [DATAROOTDIR/info]
1298 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1299 --mandir=DIR man documentation [DATAROOTDIR/man]
1300 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1301 --htmldir=DIR html documentation [DOCDIR]
1302 --dvidir=DIR dvi documentation [DOCDIR]
1303 --pdfdir=DIR pdf documentation [DOCDIR]
1304 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001305_ACEOF
1306
1307 cat <<\_ACEOF
1308_ACEOF
1309fi
1310
1311if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001312 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001313 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001314 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001315 cat <<\_ACEOF
1316
1317Optional Features:
1318 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1319 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001320 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001321 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001322 --enable-framework[=INSTALLDIR]
1323 Build (MacOSX|Darwin) framework
1324 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001325 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001326 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1327 --enable-ipv6 Enable ipv6 (with ipv4) support
1328 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001329 --enable-big-digits[=BITS]
1330 use big digits for Python longs [BITS=30]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001331 --enable-unicode[=ucs[24]]
1332 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001333
1334Optional Packages:
1335 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1336 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001337 --with-universal-archs=ARCH
1338 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001339 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001340 --with-framework-name=FRAMEWORK
1341 specify an alternate name of the framework built
1342 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001343 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001344 --with-cxx-main=<compiler>
1345 compile main() and link python executable with C++
1346 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001347 --with-suffix=.exe set executable suffix
1348 --with-pydebug build with Py_DEBUG defined
1349 --with-libs='lib1 ...' link against additional libs
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001350 --with-system-ffi build _ctypes module using an installed ffi library
Benjamin Peterson867475c2009-04-29 20:36:25 +00001351 --with-dbmliborder=db1:db2:...
1352 order to check db backends for dbm. Valid value is a
1353 colon separated string with the backend names
1354 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001355 --with-signal-module disable/enable signal module
1356 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1357 --with(out)-threads[=DIRECTORY]
1358 disable/enable thread support
1359 --with(out)-thread[=DIRECTORY]
1360 deprecated; use --with(out)-threads
1361 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001362 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001363 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001364 --with(out)-pymalloc disable/enable specialized mallocs
1365 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001366 --with-fpectl enable SIGFPE catching
1367 --with-libm=STRING math library
1368 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001369
1370Some influential environment variables:
1371 CC C compiler command
1372 CFLAGS C compiler flags
1373 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1374 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001375 LIBS libraries to pass to the linker, e.g. -l<library>
1376 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1377 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001378 CPP C preprocessor
1379
1380Use these variables to override the choices made by `configure' or to help
1381it to find libraries and programs with nonstandard names/locations.
1382
Georg Brandl464432d2009-05-20 18:24:08 +00001383Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001384_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001385ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001386fi
1387
1388if test "$ac_init_help" = "recursive"; then
1389 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001390 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001391 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001392 ac_builddir=.
1393
Martin v. Löwiseba40652007-08-30 20:10:57 +00001394case "$ac_dir" in
1395.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1396*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001397 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001398 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001399 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001400 case $ac_top_builddir_sub in
1401 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1402 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1403 esac ;;
1404esac
1405ac_abs_top_builddir=$ac_pwd
1406ac_abs_builddir=$ac_pwd$ac_dir_suffix
1407# for backward compatibility:
1408ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001409
1410case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001411 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001412 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001413 ac_top_srcdir=$ac_top_builddir_sub
1414 ac_abs_top_srcdir=$ac_pwd ;;
1415 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001416 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001417 ac_top_srcdir=$srcdir
1418 ac_abs_top_srcdir=$srcdir ;;
1419 *) # Relative name.
1420 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1421 ac_top_srcdir=$ac_top_build_prefix$srcdir
1422 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001423esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001424ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001425
Martin v. Löwiseba40652007-08-30 20:10:57 +00001426 cd "$ac_dir" || { ac_status=$?; continue; }
1427 # Check for guested configure.
1428 if test -f "$ac_srcdir/configure.gnu"; then
1429 echo &&
1430 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1431 elif test -f "$ac_srcdir/configure"; then
1432 echo &&
1433 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001434 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001435 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001436 fi || ac_status=$?
1437 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001438 done
1439fi
1440
Martin v. Löwiseba40652007-08-30 20:10:57 +00001441test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001442if $ac_init_version; then
1443 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001444python configure 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001445generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001446
Martin v. Löwiseba40652007-08-30 20:10:57 +00001447Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014482002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001449This configure script is free software; the Free Software Foundation
1450gives unlimited permission to copy, distribute and modify it.
1451_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001452 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001453fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001454cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001455This file contains any messages produced by compilers while
1456running configure, to aid debugging if configure makes a mistake.
1457
Martin v. Löwis174440b2008-10-03 08:59:41 +00001458It was created by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001459generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001460
1461 $ $0 $@
1462
1463_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001464exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001465{
1466cat <<_ASUNAME
1467## --------- ##
1468## Platform. ##
1469## --------- ##
1470
1471hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1472uname -m = `(uname -m) 2>/dev/null || echo unknown`
1473uname -r = `(uname -r) 2>/dev/null || echo unknown`
1474uname -s = `(uname -s) 2>/dev/null || echo unknown`
1475uname -v = `(uname -v) 2>/dev/null || echo unknown`
1476
1477/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1478/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1479
1480/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1481/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1482/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001483/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001484/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1485/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1486/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1487
1488_ASUNAME
1489
1490as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1491for as_dir in $PATH
1492do
1493 IFS=$as_save_IFS
1494 test -z "$as_dir" && as_dir=.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001495 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001496done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001497IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001498
1499} >&5
1500
1501cat >&5 <<_ACEOF
1502
1503
1504## ----------- ##
1505## Core tests. ##
1506## ----------- ##
1507
1508_ACEOF
1509
1510
1511# Keep a trace of the command line.
1512# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001513# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001514# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001515# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001516ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001517ac_configure_args0=
1518ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001519ac_must_keep_next=false
1520for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001521do
Skip Montanaro6dead952003-09-25 14:50:04 +00001522 for ac_arg
1523 do
1524 case $ac_arg in
1525 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1526 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1527 | -silent | --silent | --silen | --sile | --sil)
1528 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001529 *\'*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001530 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001531 esac
1532 case $ac_pass in
1533 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1534 2)
1535 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1536 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001537 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001538 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001539 case $ac_arg in
1540 *=* | --config-cache | -C | -disable-* | --disable-* \
1541 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1542 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1543 | -with-* | --with-* | -without-* | --without-* | --x)
1544 case "$ac_configure_args0 " in
1545 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1546 esac
1547 ;;
1548 -* ) ac_must_keep_next=true ;;
1549 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001550 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001551 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001552 ;;
1553 esac
1554 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001555done
Skip Montanaro6dead952003-09-25 14:50:04 +00001556$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1557$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001558
1559# When interrupted or exit'd, cleanup temporary files, and complete
1560# config.log. We remove comments because anyway the quotes in there
1561# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001562# WARNING: Use '\'' to represent an apostrophe within the trap.
1563# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00001564trap 'exit_status=$?
1565 # Save into config.log some information that might help in debugging.
1566 {
1567 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001568
Martin v. Löwis11437992002-04-12 09:54:03 +00001569 cat <<\_ASBOX
1570## ---------------- ##
1571## Cache variables. ##
1572## ---------------- ##
1573_ASBOX
1574 echo
1575 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001576(
1577 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1578 eval ac_val=\$$ac_var
1579 case $ac_val in #(
1580 *${as_nl}*)
1581 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001582 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1583echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001584 esac
1585 case $ac_var in #(
1586 _ | IFS | as_nl) ;; #(
1587 *) $as_unset $ac_var ;;
1588 esac ;;
1589 esac
1590 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001591 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001592 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1593 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001594 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001595 "s/'\''/'\''\\\\'\'''\''/g;
1596 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1597 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001598 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001599 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001600 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001601 esac |
1602 sort
1603)
Martin v. Löwis11437992002-04-12 09:54:03 +00001604 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001605
1606 cat <<\_ASBOX
1607## ----------------- ##
1608## Output variables. ##
1609## ----------------- ##
1610_ASBOX
1611 echo
1612 for ac_var in $ac_subst_vars
1613 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001614 eval ac_val=\$$ac_var
1615 case $ac_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001616 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001617 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001618 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001619 done | sort
1620 echo
1621
1622 if test -n "$ac_subst_files"; then
1623 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001624## ------------------- ##
1625## File substitutions. ##
1626## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001627_ASBOX
1628 echo
1629 for ac_var in $ac_subst_files
1630 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001631 eval ac_val=\$$ac_var
1632 case $ac_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001633 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001634 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001635 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001636 done | sort
1637 echo
1638 fi
1639
Martin v. Löwis11437992002-04-12 09:54:03 +00001640 if test -s confdefs.h; then
1641 cat <<\_ASBOX
1642## ----------- ##
1643## confdefs.h. ##
1644## ----------- ##
1645_ASBOX
1646 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001647 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001648 echo
1649 fi
1650 test "$ac_signal" != 0 &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001651 echo "$as_me: caught signal $ac_signal"
1652 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001653 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001654 rm -f core *.core core.conftest.* &&
1655 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001656 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001657' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001658for ac_signal in 1 2 13 15; do
1659 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1660done
1661ac_signal=0
1662
1663# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001664rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001665
1666# Predefined preprocessor variables.
1667
1668cat >>confdefs.h <<_ACEOF
1669#define PACKAGE_NAME "$PACKAGE_NAME"
1670_ACEOF
1671
1672
1673cat >>confdefs.h <<_ACEOF
1674#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1675_ACEOF
1676
1677
1678cat >>confdefs.h <<_ACEOF
1679#define PACKAGE_VERSION "$PACKAGE_VERSION"
1680_ACEOF
1681
1682
1683cat >>confdefs.h <<_ACEOF
1684#define PACKAGE_STRING "$PACKAGE_STRING"
1685_ACEOF
1686
1687
1688cat >>confdefs.h <<_ACEOF
1689#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1690_ACEOF
1691
1692
1693# Let the site file select an alternate cache file if it wants to.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001694# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001695if test -n "$CONFIG_SITE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001696 set x "$CONFIG_SITE"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001697elif test "x$prefix" != xNONE; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001698 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001699else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001700 set x "$ac_default_prefix/share/config.site" \
1701 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001702fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001703shift
1704for ac_site_file
Martin v. Löwiseba40652007-08-30 20:10:57 +00001705do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001706 if test -r "$ac_site_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001707 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1708echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001709 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001710 . "$ac_site_file"
1711 fi
1712done
1713
1714if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001715 # Some versions of bash will fail to source /dev/null (special
1716 # files actually), so we avoid doing that.
1717 if test -f "$cache_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001718 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1719echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001720 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001721 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1722 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001723 esac
1724 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001725else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001726 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1727echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001728 >$cache_file
1729fi
1730
1731# Check that the precious variables saved in the cache have kept the same
1732# value.
1733ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001734for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001735 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1736 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001737 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1738 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001739 case $ac_old_set,$ac_new_set in
1740 set,)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001741 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1742echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001743 ac_cache_corrupted=: ;;
1744 ,set)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001745 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1746echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001747 ac_cache_corrupted=: ;;
1748 ,);;
1749 *)
1750 if test "x$ac_old_val" != "x$ac_new_val"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001751 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1752echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1753 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1754echo "$as_me: former value: $ac_old_val" >&2;}
1755 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1756echo "$as_me: current value: $ac_new_val" >&2;}
1757 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001758 fi;;
1759 esac
1760 # Pass precious variables to config.status.
1761 if test "$ac_new_set" = set; then
1762 case $ac_new_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001763 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001764 *) ac_arg=$ac_var=$ac_new_val ;;
1765 esac
1766 case " $ac_configure_args " in
1767 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1768 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1769 esac
1770 fi
1771done
1772if $ac_cache_corrupted; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001773 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1774echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1775 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1776echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001777 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001778fi
1779
Martin v. Löwiseba40652007-08-30 20:10:57 +00001780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
Guido van Rossum7f43da71994-08-01 12:15:30 +00001804ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001805ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001806ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1807ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1808ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001809
Guido van Rossum627b2d71993-12-24 10:39:16 +00001810
Michael W. Hudson54241132001-12-07 15:38:26 +00001811
Martin v. Löwiseba40652007-08-30 20:10:57 +00001812ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001813
1814
Martin v. Löwis11437992002-04-12 09:54:03 +00001815
Georg Brandlbcd64a32009-03-31 21:45:18 +00001816if test "$prefix" != "/"; then
1817 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1818fi
1819
1820
Martin v. Löwis11437992002-04-12 09:54:03 +00001821
1822
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001823
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001824
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001825# We don't use PACKAGE_ variables, and they cause conflicts
1826# with other autoconf-based packages that include Python.h
1827grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1828rm confdefs.h
1829mv confdefs.h.new confdefs.h
1830
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001831
Martin v. Löwis174440b2008-10-03 08:59:41 +00001832VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001833
Martin v. Löwis1142de32002-03-29 16:28:31 +00001834
1835SOVERSION=1.0
1836
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001837# The later defininition of _XOPEN_SOURCE disables certain features
1838# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1839
1840cat >>confdefs.h <<\_ACEOF
1841#define _GNU_SOURCE 1
1842_ACEOF
1843
1844
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001845# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1846# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1847# them.
1848
1849cat >>confdefs.h <<\_ACEOF
1850#define _NETBSD_SOURCE 1
1851_ACEOF
1852
1853
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001854# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1855# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1856# them.
1857
1858cat >>confdefs.h <<\_ACEOF
1859#define __BSD_VISIBLE 1
1860_ACEOF
1861
1862
Martin v. Löwisd6320502004-08-12 13:45:08 +00001863# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1864# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1865
1866cat >>confdefs.h <<\_ACEOF
1867#define _BSD_TYPES 1
1868_ACEOF
1869
1870
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001871# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1872# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1873# them.
1874
1875cat >>confdefs.h <<\_ACEOF
1876#define _DARWIN_C_SOURCE 1
1877_ACEOF
1878
1879
1880
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001881define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001882
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001883# Arguments passed to configure.
1884
1885CONFIG_ARGS="$ac_configure_args"
1886
Martin v. Löwiseba40652007-08-30 20:10:57 +00001887# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001888if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001889 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001890 case $enableval in
1891 yes)
1892 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1893 ;;
1894 esac
1895 case $enableval in
1896 no)
1897 UNIVERSALSDK=
1898 enable_universalsdk=
1899 ;;
1900 *)
1901 UNIVERSALSDK=$enableval
1902 ;;
1903 esac
1904
1905else
1906
1907 UNIVERSALSDK=
1908 enable_universalsdk=
1909
Martin v. Löwiseba40652007-08-30 20:10:57 +00001910fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001911
1912
Martin v. Löwiseba40652007-08-30 20:10:57 +00001913
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00001914
1915
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001916UNIVERSAL_ARCHS="32-bit"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001917{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1918echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001919
1920# Check whether --with-universal-archs was given.
1921if test "${with_universal_archs+set}" = set; then
1922 withval=$with_universal_archs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001923 { echo "$as_me:$LINENO: result: $withval" >&5
1924echo "${ECHO_T}$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001925 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00001926 if test "${enable_universalsdk}" ; then
1927 :
1928 else
1929 { { echo "$as_me:$LINENO: error: --with-universal-archs without --enable-universalsdk. See Mac/README" >&5
1930echo "$as_me: error: --with-universal-archs without --enable-universalsdk. See Mac/README" >&2;}
1931 { (exit 1); exit 1; }; }
1932 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001933
1934else
1935
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001936 { echo "$as_me:$LINENO: result: 32-bit" >&5
1937echo "${ECHO_T}32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001938
1939fi
1940
1941
1942
1943
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001944
1945# Check whether --with-framework-name was given.
1946if test "${with_framework_name+set}" = set; then
1947 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00001948 if test "${enable_framework}"; then
1949 :
1950 else
1951 { { echo "$as_me:$LINENO: error: --with-framework-name without --enable-framework. See Mac/README" >&5
1952echo "$as_me: error: --with-framework-name without --enable-framework. See Mac/README" >&2;}
1953 { (exit 1); exit 1; }; }
1954 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001955 PYTHONFRAMEWORK=${withval}
1956 PYTHONFRAMEWORKDIR=${withval}.framework
1957 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1958
1959else
1960
1961 PYTHONFRAMEWORK=Python
1962 PYTHONFRAMEWORKDIR=Python.framework
1963 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1964
1965fi
1966
Martin v. Löwiseba40652007-08-30 20:10:57 +00001967# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001968if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001969 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001970 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001971 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001972 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001973 esac
1974 case $enableval in
1975 no)
1976 PYTHONFRAMEWORK=
1977 PYTHONFRAMEWORKDIR=no-framework
1978 PYTHONFRAMEWORKPREFIX=
1979 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001980 FRAMEWORKINSTALLFIRST=
1981 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001982 FRAMEWORKALTINSTALLFIRST=
1983 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001984 if test "x${prefix}" = "xNONE"; then
1985 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1986 else
1987 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1988 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001989 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001990 ;;
1991 *)
1992 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001993 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001994 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001995 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
1996 if test "$UNIVERSAL_ARCHS" = "all"
1997 then
1998 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorenbb8cb0e2009-03-30 17:53:39 +00001999 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002000 else
Ronald Oussorenbb8cb0e2009-03-30 17:53:39 +00002001 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002002 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
2003 fi
2004
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002005 if test "x${prefix}" = "xNONE" ; then
2006 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2007 else
2008 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2009 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002010 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00002011
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002012 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00002013 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00002014 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002015
Martin v. Löwiseba40652007-08-30 20:10:57 +00002016 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002017
Martin v. Löwiseba40652007-08-30 20:10:57 +00002018 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002019
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002020 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2021
2022 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2023
Jack Jansene578a632001-08-15 01:27:14 +00002024 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002025
Guido van Rossum563e7081996-09-10 18:20:48 +00002026else
Martin v. Löwis11437992002-04-12 09:54:03 +00002027
Jack Jansene578a632001-08-15 01:27:14 +00002028 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002029 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002030 PYTHONFRAMEWORKPREFIX=
2031 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002032 FRAMEWORKINSTALLFIRST=
2033 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002034 FRAMEWORKALTINSTALLFIRST=
2035 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002036 if test "x${prefix}" = "xNONE" ; then
2037 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2038 else
2039 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2040 fi
Jack Jansene578a632001-08-15 01:27:14 +00002041 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002042
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002043 if test "$UNIVERSAL_ARCHS" = "all"
2044 then
2045 FRAMEWORKINSTALLLAST=update4wayuniversal
2046 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2047 fi
2048
Martin v. Löwiseba40652007-08-30 20:10:57 +00002049fi
2050
Michael W. Hudson54241132001-12-07 15:38:26 +00002051
2052
2053
2054
Jack Jansene578a632001-08-15 01:27:14 +00002055
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002056
2057
Ronald Oussoren5b787322006-06-06 19:50:24 +00002058
2059
2060
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002061
Jack Jansene578a632001-08-15 01:27:14 +00002062##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002063## AC_HELP_STRING(--with-dyld,
2064## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002065##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002066# Set name for machine-dependent library files
2067
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002068{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2069echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002070if test -z "$MACHDEP"
2071then
Guido van Rossum563e7081996-09-10 18:20:48 +00002072 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00002073 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002074 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002075 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002076 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002077 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002078 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002079 ac_md_system=`echo $ac_sys_system |
2080 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2081 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002082 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002083 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002084
Guido van Rossum07397971997-04-29 21:49:50 +00002085 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002086 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002087 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002088 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002089 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002090 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002091 esac
2092fi
Guido van Rossum91922671997-10-09 20:24:13 +00002093
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002094# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2095# disable features if it is defined, without any means to access these
2096# features as extensions. For these systems, we skip the definition of
2097# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2098# some feature, make sure there is no alternative way to access this
2099# feature. Also, when using wildcards, make sure you have verified the
2100# need for not defining _XOPEN_SOURCE on all systems matching the
2101# wildcard, and that the wildcard does not include future systems
2102# (which may remove their limitations).
2103case $ac_sys_system/$ac_sys_release in
2104 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2105 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002106 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Gregory P. Smithcc023f12008-09-07 05:15:58 +00002107 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002108 define_xopen_source=no
2109 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2110 # also defined. This can be overridden by defining _BSD_SOURCE
2111 # As this has a different meaning on Linux, only define it on OpenBSD
2112
2113cat >>confdefs.h <<\_ACEOF
2114#define _BSD_SOURCE 1
2115_ACEOF
2116
2117 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002118 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2119 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2120 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00002121 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002122 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002123 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2124 # of union __?sigval. Reported by Stuart Bishop.
2125 SunOS/5.6)
2126 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002127 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2128 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002129 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002130 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002131 define_xopen_source=no;;
2132 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002133 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002134 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002135 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00002136 # On FreeBSD 4, the math functions C89 does not cover are never defined
2137 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2138 FreeBSD/4.*)
2139 define_xopen_source=no;;
2140 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2141 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2142 # identifies itself as Darwin/7.*
2143 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2144 # disables platform specific features beyond repair.
2145 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2146 # has no effect, don't bother defining them
2147 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002148 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002149 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2150 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2151 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002152 AIX/4)
2153 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002154 AIX/5)
2155 if test `uname -r` -eq 1; then
2156 define_xopen_source=no
2157 fi
2158 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002159 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2160 # defining NI_NUMERICHOST.
2161 QNX/6.3.2)
2162 define_xopen_source=no
2163 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002164
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002165esac
2166
2167if test $define_xopen_source = yes
2168then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002169 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2170 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002171 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2172 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002173 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002174 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002175
2176cat >>confdefs.h <<\_ACEOF
2177#define _XOPEN_SOURCE 500
2178_ACEOF
2179
2180 ;;
2181 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002182
2183cat >>confdefs.h <<\_ACEOF
2184#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002185_ACEOF
2186
Skip Montanarof0d5f792004-08-15 14:08:23 +00002187 ;;
2188 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002189
2190 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2191 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2192 # several APIs are not declared. Since this is also needed in some
2193 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002194 # except for Solaris 10, where it must not be defined,
2195 # as it implies XPG4.2
2196 case $ac_sys_system/$ac_sys_release in
2197 SunOS/5.10)
2198 ;;
2199 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002200
2201cat >>confdefs.h <<\_ACEOF
2202#define _XOPEN_SOURCE_EXTENDED 1
2203_ACEOF
2204
Martin v. Löwis7dece662005-11-26 11:38:24 +00002205 ;;
2206 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002207
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002208
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002209cat >>confdefs.h <<\_ACEOF
2210#define _POSIX_C_SOURCE 200112L
2211_ACEOF
2212
2213
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002214fi
2215
Guido van Rossum91922671997-10-09 20:24:13 +00002216#
2217# SGI compilers allow the specification of the both the ABI and the
2218# ISA on the command line. Depending on the values of these switches,
2219# different and often incompatable code will be generated.
2220#
2221# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2222# thus supply support for various ABI/ISA combinations. The MACHDEP
2223# variable is also adjusted.
2224#
2225
2226if test ! -z "$SGI_ABI"
2227then
2228 CC="cc $SGI_ABI"
2229 LDFLAGS="$SGI_ABI $LDFLAGS"
2230 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2231fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002232{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2233echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002234
Jack Jansen83f898c2002-12-30 22:23:40 +00002235# And add extra plat-mac for darwin
2236
Jack Jansen7b59b422003-03-17 15:44:10 +00002237
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002238{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2239echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002240if test -z "$EXTRAPLATDIR"
2241then
2242 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002243 darwin)
2244 EXTRAPLATDIR="\$(PLATMACDIRS)"
2245 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2246 ;;
2247 *)
2248 EXTRAPLATDIR=""
2249 EXTRAMACHDEPPATH=""
2250 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002251 esac
2252fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002253{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2254echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002255
Jack Jansen6b08a402004-06-03 12:41:45 +00002256# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2257# it may influence the way we can build extensions, so distutils
2258# needs to check it
2259
Ronald Oussoren988117f2006-04-29 11:31:35 +00002260
Jack Jansen6b08a402004-06-03 12:41:45 +00002261CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002262EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002263
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002264{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2265echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002266ac_sys_machine=`uname -m`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002267{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2268echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002269
Guido van Rossum627b2d71993-12-24 10:39:16 +00002270# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002271
2272# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2273# for debug/optimization stuff. BASECFLAGS is for flags that are required
2274# just to get things to compile and link. Users are free to override OPT
2275# when running configure or make. The build should not break if they do.
2276# BASECFLAGS should generally not be messed with, however.
2277
2278# XXX shouldn't some/most/all of this code be merged with the stuff later
2279# on that fiddles with OPT and BASECFLAGS?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002280{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2281echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002282
Martin v. Löwiseba40652007-08-30 20:10:57 +00002283# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002284if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002285 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002286 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00002287 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002288 without_gcc=yes;;
2289 yes) CC=gcc
2290 without_gcc=no;;
2291 *) CC=$withval
2292 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002293 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002294else
Martin v. Löwis11437992002-04-12 09:54:03 +00002295
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002296 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002297 AIX*) CC=cc_r
2298 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002299 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002300 case $BE_HOST_CPU in
2301 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002302 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002303 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002304 BASECFLAGS="$BASECFLAGS -export pragma"
2305 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002306 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002307 ;;
2308 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002309 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002310 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002311 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002312 ;;
2313 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002314 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2315echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002316 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002317 ;;
2318 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002319 AR="\$(srcdir)/Modules/ar_beos"
2320 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002321 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002322 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002323 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002324fi
2325
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002326{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2327echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002328
Guido van Rossum8b131c51995-03-09 14:10:13 +00002329# If the user switches compilers, we can't believe the cache
2330if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2331then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002332 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002333(it is also a good idea to do 'make clean' before compiling)" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002334echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002335(it is also a good idea to do 'make clean' before compiling)" >&2;}
2336 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002337fi
2338
Martin v. Löwis11437992002-04-12 09:54:03 +00002339ac_ext=c
2340ac_cpp='$CPP $CPPFLAGS'
2341ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2342ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2343ac_compiler_gnu=$ac_cv_c_compiler_gnu
2344if test -n "$ac_tool_prefix"; then
2345 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2346set dummy ${ac_tool_prefix}gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002347{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2348echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002349if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002350 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002351else
2352 if test -n "$CC"; then
2353 ac_cv_prog_CC="$CC" # Let the user override the test.
2354else
Martin v. Löwis11437992002-04-12 09:54:03 +00002355as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2356for as_dir in $PATH
2357do
2358 IFS=$as_save_IFS
2359 test -z "$as_dir" && as_dir=.
2360 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002361 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002362 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002363 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002364 break 2
2365 fi
2366done
2367done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002368IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002369
Jack Jansendd19cf82001-12-06 22:36:17 +00002370fi
2371fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002372CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002373if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002374 { echo "$as_me:$LINENO: result: $CC" >&5
2375echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002376else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002377 { echo "$as_me:$LINENO: result: no" >&5
2378echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002379fi
2380
Martin v. Löwiseba40652007-08-30 20:10:57 +00002381
Martin v. Löwis11437992002-04-12 09:54:03 +00002382fi
2383if test -z "$ac_cv_prog_CC"; then
2384 ac_ct_CC=$CC
2385 # Extract the first word of "gcc", so it can be a program name with args.
2386set dummy gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002387{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2388echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002389if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002390 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002391else
2392 if test -n "$ac_ct_CC"; then
2393 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2394else
2395as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2396for as_dir in $PATH
2397do
2398 IFS=$as_save_IFS
2399 test -z "$as_dir" && as_dir=.
2400 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002401 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002402 ac_cv_prog_ac_ct_CC="gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002403 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002404 break 2
2405 fi
2406done
2407done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002408IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002409
2410fi
2411fi
2412ac_ct_CC=$ac_cv_prog_ac_ct_CC
2413if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002414 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2415echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002416else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002417 { echo "$as_me:$LINENO: result: no" >&5
2418echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002419fi
2420
Martin v. Löwiseba40652007-08-30 20:10:57 +00002421 if test "x$ac_ct_CC" = x; then
2422 CC=""
2423 else
2424 case $cross_compiling:$ac_tool_warned in
2425yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002426{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2427whose name does not start with the host triplet. If you think this
2428configuration is useful to you, please write to autoconf@gnu.org." >&5
2429echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2430whose name does not start with the host triplet. If you think this
2431configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002432ac_tool_warned=yes ;;
2433esac
2434 CC=$ac_ct_CC
2435 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002436else
2437 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002438fi
2439
Jack Jansendd19cf82001-12-06 22:36:17 +00002440if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002441 if test -n "$ac_tool_prefix"; then
2442 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00002443set dummy ${ac_tool_prefix}cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002444{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2445echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002446if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002447 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002448else
2449 if test -n "$CC"; then
2450 ac_cv_prog_CC="$CC" # Let the user override the test.
2451else
Martin v. Löwis11437992002-04-12 09:54:03 +00002452as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2453for as_dir in $PATH
2454do
2455 IFS=$as_save_IFS
2456 test -z "$as_dir" && as_dir=.
2457 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002458 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002459 ac_cv_prog_CC="${ac_tool_prefix}cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002460 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002461 break 2
2462 fi
2463done
2464done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002465IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002466
2467fi
2468fi
2469CC=$ac_cv_prog_CC
2470if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002471 { echo "$as_me:$LINENO: result: $CC" >&5
2472echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002473else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002474 { echo "$as_me:$LINENO: result: no" >&5
2475echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002476fi
2477
Martin v. Löwiseba40652007-08-30 20:10:57 +00002478
Martin v. Löwis11437992002-04-12 09:54:03 +00002479 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002480fi
2481if test -z "$CC"; then
2482 # Extract the first word of "cc", so it can be a program name with args.
2483set dummy cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002484{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2485echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002486if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002487 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002488else
2489 if test -n "$CC"; then
2490 ac_cv_prog_CC="$CC" # Let the user override the test.
2491else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002492 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002493as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2494for as_dir in $PATH
2495do
2496 IFS=$as_save_IFS
2497 test -z "$as_dir" && as_dir=.
2498 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002499 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002500 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2501 ac_prog_rejected=yes
2502 continue
2503 fi
2504 ac_cv_prog_CC="cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002505 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002506 break 2
2507 fi
2508done
2509done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002510IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002511
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002512if test $ac_prog_rejected = yes; then
2513 # We found a bogon in the path, so make sure we never use it.
2514 set dummy $ac_cv_prog_CC
2515 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002516 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002517 # We chose a different compiler from the bogus one.
2518 # However, it has the same basename, so the bogon will be chosen
2519 # first if we set CC to just the basename; use the full file name.
2520 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002521 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002522 fi
2523fi
2524fi
2525fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002526CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002527if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002528 { echo "$as_me:$LINENO: result: $CC" >&5
2529echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002530else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002531 { echo "$as_me:$LINENO: result: no" >&5
2532echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002533fi
2534
Martin v. Löwiseba40652007-08-30 20:10:57 +00002535
Martin v. Löwis11437992002-04-12 09:54:03 +00002536fi
2537if test -z "$CC"; then
2538 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002539 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002540 do
2541 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2542set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002543{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2544echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002545if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002546 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002547else
2548 if test -n "$CC"; then
2549 ac_cv_prog_CC="$CC" # Let the user override the test.
2550else
Martin v. Löwis11437992002-04-12 09:54:03 +00002551as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2552for as_dir in $PATH
2553do
2554 IFS=$as_save_IFS
2555 test -z "$as_dir" && as_dir=.
2556 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002557 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002558 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002559 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002560 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002561 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002562done
2563done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002564IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002565
2566fi
2567fi
2568CC=$ac_cv_prog_CC
2569if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002570 { echo "$as_me:$LINENO: result: $CC" >&5
2571echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002572else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002573 { echo "$as_me:$LINENO: result: no" >&5
2574echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002575fi
2576
Martin v. Löwiseba40652007-08-30 20:10:57 +00002577
Martin v. Löwis11437992002-04-12 09:54:03 +00002578 test -n "$CC" && break
2579 done
2580fi
2581if test -z "$CC"; then
2582 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002583 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002584do
2585 # Extract the first word of "$ac_prog", so it can be a program name with args.
2586set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002587{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2588echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002589if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002590 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002591else
2592 if test -n "$ac_ct_CC"; then
2593 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2594else
2595as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2596for as_dir in $PATH
2597do
2598 IFS=$as_save_IFS
2599 test -z "$as_dir" && as_dir=.
2600 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002601 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 ac_cv_prog_ac_ct_CC="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002603 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002604 break 2
2605 fi
2606done
2607done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002608IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002609
Martin v. Löwis11437992002-04-12 09:54:03 +00002610fi
2611fi
2612ac_ct_CC=$ac_cv_prog_ac_ct_CC
2613if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002614 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2615echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002616else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002617 { echo "$as_me:$LINENO: result: no" >&5
2618echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002619fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002620
Martin v. Löwiseba40652007-08-30 20:10:57 +00002621
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 test -n "$ac_ct_CC" && break
2623done
Michael W. Hudson54241132001-12-07 15:38:26 +00002624
Martin v. Löwiseba40652007-08-30 20:10:57 +00002625 if test "x$ac_ct_CC" = x; then
2626 CC=""
2627 else
2628 case $cross_compiling:$ac_tool_warned in
2629yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002630{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2631whose name does not start with the host triplet. If you think this
2632configuration is useful to you, please write to autoconf@gnu.org." >&5
2633echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2634whose name does not start with the host triplet. If you think this
2635configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002636ac_tool_warned=yes ;;
2637esac
2638 CC=$ac_ct_CC
2639 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002640fi
2641
2642fi
2643
2644
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002645test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002646See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002647echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002648See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002649 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002650
2651# Provide some information about the compiler.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002652echo "$as_me:$LINENO: checking for C compiler version" >&5
2653ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002654{ (ac_try="$ac_compiler --version >&5"
2655case "(($ac_try" in
2656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2657 *) ac_try_echo=$ac_try;;
2658esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002660 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002661 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002663 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002664{ (ac_try="$ac_compiler -v >&5"
2665case "(($ac_try" in
2666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2667 *) ac_try_echo=$ac_try;;
2668esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002670 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002671 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002673 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002674{ (ac_try="$ac_compiler -V >&5"
2675case "(($ac_try" in
2676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2677 *) ac_try_echo=$ac_try;;
2678esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002680 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002681 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002683 (exit $ac_status); }
2684
2685cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002686/* confdefs.h. */
2687_ACEOF
2688cat confdefs.h >>conftest.$ac_ext
2689cat >>conftest.$ac_ext <<_ACEOF
2690/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002691
Martin v. Löwis11437992002-04-12 09:54:03 +00002692int
2693main ()
2694{
2695
2696 ;
2697 return 0;
2698}
2699_ACEOF
2700ac_clean_files_save=$ac_clean_files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002701ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002702# Try to create an executable without -o first, disregard a.out.
2703# It will help us diagnose broken compilers, and finding out an intuition
2704# of exeext.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002705{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2706echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2707ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2708#
2709# List of possible output files, starting from the most likely.
2710# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2711# only as a last resort. b.out is created by i960 compilers.
2712ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2713#
2714# The IRIX 6 linker writes into existing files which may not be
2715# executable, retaining their permissions. Remove them first so a
2716# subsequent execution test works.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002717ac_rmfiles=
2718for ac_file in $ac_files
2719do
2720 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002721 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002722 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2723 esac
2724done
2725rm -f $ac_rmfiles
2726
2727if { (ac_try="$ac_link_default"
2728case "(($ac_try" in
2729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2730 *) ac_try_echo=$ac_try;;
2731esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002733 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002734 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002736 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002737 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2738# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2739# in a Makefile. We should not override ac_cv_exeext if it was cached,
2740# so that the user can short-circuit this test for compilers unknown to
2741# Autoconf.
2742for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002743do
2744 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002745 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002746 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002747 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002748 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002749 # We found the default executable, but exeext='' is most
2750 # certainly right.
2751 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002752 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002753 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2754 then :; else
2755 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2756 fi
2757 # We set ac_cv_exeext here because the later test for it is not
2758 # safe: cross compilers may not add the suffix if given an `-o'
2759 # argument, so we may need to know it at that point already.
2760 # Even if this section looks crufty: it has the advantage of
2761 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002762 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002763 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002764 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002765 esac
2766done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002767test "$ac_cv_exeext" = no && ac_cv_exeext=
2768
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002769else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002770 ac_file=''
2771fi
2772
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002773{ echo "$as_me:$LINENO: result: $ac_file" >&5
2774echo "${ECHO_T}$ac_file" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002775if test -z "$ac_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002776 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002777sed 's/^/| /' conftest.$ac_ext >&5
2778
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002779{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002780See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002781echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002782See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002783 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002784fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002785
Martin v. Löwis11437992002-04-12 09:54:03 +00002786ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002787
Martin v. Löwiseba40652007-08-30 20:10:57 +00002788# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002789# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002790{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2791echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002792# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2793# If not cross compiling, check that we can run a simple program.
2794if test "$cross_compiling" != yes; then
2795 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002796 { (case "(($ac_try" in
2797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2798 *) ac_try_echo=$ac_try;;
2799esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002801 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002802 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002804 (exit $ac_status); }; }; then
2805 cross_compiling=no
2806 else
2807 if test "$cross_compiling" = maybe; then
2808 cross_compiling=yes
2809 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002810 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002811If you meant to cross compile, use \`--host'.
2812See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002813echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002814If you meant to cross compile, use \`--host'.
2815See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002816 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002817 fi
2818 fi
2819fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002820{ echo "$as_me:$LINENO: result: yes" >&5
2821echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002822
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002823rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002824ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002825# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002826# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002827{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2828echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2829{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2830echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002831
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002832{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2833echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002834if { (ac_try="$ac_link"
2835case "(($ac_try" in
2836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2837 *) ac_try_echo=$ac_try;;
2838esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002840 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002841 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002843 (exit $ac_status); }; then
2844 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2845# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2846# work properly (i.e., refer to `conftest.exe'), while it won't with
2847# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002848for ac_file in conftest.exe conftest conftest.*; do
2849 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002850 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002851 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002852 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002853 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002854 * ) break;;
2855 esac
2856done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002857else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002858 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002859See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002860echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002861See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002862 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002863fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002864
Martin v. Löwis11437992002-04-12 09:54:03 +00002865rm -f conftest$ac_cv_exeext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002866{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2867echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002868
2869rm -f conftest.$ac_ext
2870EXEEXT=$ac_cv_exeext
2871ac_exeext=$EXEEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002872{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2873echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002874if test "${ac_cv_objext+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002875 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002876else
Martin v. Löwis11437992002-04-12 09:54:03 +00002877 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002878/* confdefs.h. */
2879_ACEOF
2880cat confdefs.h >>conftest.$ac_ext
2881cat >>conftest.$ac_ext <<_ACEOF
2882/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002883
Martin v. Löwis11437992002-04-12 09:54:03 +00002884int
2885main ()
2886{
2887
2888 ;
2889 return 0;
2890}
2891_ACEOF
2892rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002893if { (ac_try="$ac_compile"
2894case "(($ac_try" in
2895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2896 *) ac_try_echo=$ac_try;;
2897esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002899 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002900 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002902 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002903 for ac_file in conftest.o conftest.obj conftest.*; do
2904 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002905 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002906 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002907 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2908 break;;
2909 esac
2910done
2911else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002912 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002913sed 's/^/| /' conftest.$ac_ext >&5
2914
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002915{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002916See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002917echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002918See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002919 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002920fi
2921
2922rm -f conftest.$ac_cv_objext conftest.$ac_ext
2923fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002924{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2925echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002926OBJEXT=$ac_cv_objext
2927ac_objext=$OBJEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002928{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2929echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002930if test "${ac_cv_c_compiler_gnu+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002931 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002932else
2933 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002934/* confdefs.h. */
2935_ACEOF
2936cat confdefs.h >>conftest.$ac_ext
2937cat >>conftest.$ac_ext <<_ACEOF
2938/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002939
Martin v. Löwis11437992002-04-12 09:54:03 +00002940int
2941main ()
2942{
2943#ifndef __GNUC__
2944 choke me
2945#endif
2946
2947 ;
2948 return 0;
2949}
2950_ACEOF
2951rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002952if { (ac_try="$ac_compile"
2953case "(($ac_try" in
2954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2955 *) ac_try_echo=$ac_try;;
2956esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002958 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002959 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002960 grep -v '^ *+' conftest.er1 >conftest.err
2961 rm -f conftest.er1
2962 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002964 (exit $ac_status); } && {
2965 test -z "$ac_c_werror_flag" ||
2966 test ! -s conftest.err
2967 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002968 ac_compiler_gnu=yes
2969else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002970 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002971sed 's/^/| /' conftest.$ac_ext >&5
2972
Martin v. Löwiseba40652007-08-30 20:10:57 +00002973 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002974fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002975
2976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002977ac_cv_c_compiler_gnu=$ac_compiler_gnu
2978
2979fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002980{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2981echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2982GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002983ac_test_CFLAGS=${CFLAGS+set}
2984ac_save_CFLAGS=$CFLAGS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002985{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2986echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002987if test "${ac_cv_prog_cc_g+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002988 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002989else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002990 ac_save_c_werror_flag=$ac_c_werror_flag
2991 ac_c_werror_flag=yes
2992 ac_cv_prog_cc_g=no
2993 CFLAGS="-g"
2994 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002995/* confdefs.h. */
2996_ACEOF
2997cat confdefs.h >>conftest.$ac_ext
2998cat >>conftest.$ac_ext <<_ACEOF
2999/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003000
Martin v. Löwis11437992002-04-12 09:54:03 +00003001int
3002main ()
3003{
3004
3005 ;
3006 return 0;
3007}
3008_ACEOF
3009rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003010if { (ac_try="$ac_compile"
3011case "(($ac_try" in
3012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3013 *) ac_try_echo=$ac_try;;
3014esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003016 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003017 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003018 grep -v '^ *+' conftest.er1 >conftest.err
3019 rm -f conftest.er1
3020 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003022 (exit $ac_status); } && {
3023 test -z "$ac_c_werror_flag" ||
3024 test ! -s conftest.err
3025 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003026 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003027else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003028 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003029sed 's/^/| /' conftest.$ac_ext >&5
3030
Martin v. Löwiseba40652007-08-30 20:10:57 +00003031 CFLAGS=""
3032 cat >conftest.$ac_ext <<_ACEOF
3033/* confdefs.h. */
3034_ACEOF
3035cat confdefs.h >>conftest.$ac_ext
3036cat >>conftest.$ac_ext <<_ACEOF
3037/* end confdefs.h. */
3038
3039int
3040main ()
3041{
3042
3043 ;
3044 return 0;
3045}
3046_ACEOF
3047rm -f conftest.$ac_objext
3048if { (ac_try="$ac_compile"
3049case "(($ac_try" in
3050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3051 *) ac_try_echo=$ac_try;;
3052esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003054 (eval "$ac_compile") 2>conftest.er1
3055 ac_status=$?
3056 grep -v '^ *+' conftest.er1 >conftest.err
3057 rm -f conftest.er1
3058 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003060 (exit $ac_status); } && {
3061 test -z "$ac_c_werror_flag" ||
3062 test ! -s conftest.err
3063 } && test -s conftest.$ac_objext; then
3064 :
3065else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003066 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003067sed 's/^/| /' conftest.$ac_ext >&5
3068
3069 ac_c_werror_flag=$ac_save_c_werror_flag
3070 CFLAGS="-g"
3071 cat >conftest.$ac_ext <<_ACEOF
3072/* confdefs.h. */
3073_ACEOF
3074cat confdefs.h >>conftest.$ac_ext
3075cat >>conftest.$ac_ext <<_ACEOF
3076/* end confdefs.h. */
3077
3078int
3079main ()
3080{
3081
3082 ;
3083 return 0;
3084}
3085_ACEOF
3086rm -f conftest.$ac_objext
3087if { (ac_try="$ac_compile"
3088case "(($ac_try" in
3089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3090 *) ac_try_echo=$ac_try;;
3091esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003093 (eval "$ac_compile") 2>conftest.er1
3094 ac_status=$?
3095 grep -v '^ *+' conftest.er1 >conftest.err
3096 rm -f conftest.er1
3097 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003099 (exit $ac_status); } && {
3100 test -z "$ac_c_werror_flag" ||
3101 test ! -s conftest.err
3102 } && test -s conftest.$ac_objext; then
3103 ac_cv_prog_cc_g=yes
3104else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003105 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003106sed 's/^/| /' conftest.$ac_ext >&5
3107
3108
Guido van Rossum627b2d71993-12-24 10:39:16 +00003109fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003110
3111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003112fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003113
3114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3115fi
3116
3117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3118 ac_c_werror_flag=$ac_save_c_werror_flag
3119fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003120{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3121echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003122if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003123 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003124elif test $ac_cv_prog_cc_g = yes; then
3125 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003126 CFLAGS="-g -O2"
3127 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003128 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003129 fi
3130else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003131 if test "$GCC" = yes; then
3132 CFLAGS="-O2"
3133 else
3134 CFLAGS=
3135 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003136fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003137{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3138echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003139if test "${ac_cv_prog_cc_c89+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003140 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003141else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003142 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003143ac_save_CC=$CC
3144cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003145/* confdefs.h. */
3146_ACEOF
3147cat confdefs.h >>conftest.$ac_ext
3148cat >>conftest.$ac_ext <<_ACEOF
3149/* end confdefs.h. */
3150#include <stdarg.h>
3151#include <stdio.h>
3152#include <sys/types.h>
3153#include <sys/stat.h>
3154/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3155struct buf { int x; };
3156FILE * (*rcsopen) (struct buf *, struct stat *, int);
3157static char *e (p, i)
3158 char **p;
3159 int i;
3160{
3161 return p[i];
3162}
3163static char *f (char * (*g) (char **, int), char **p, ...)
3164{
3165 char *s;
3166 va_list v;
3167 va_start (v,p);
3168 s = g (p, va_arg (v,int));
3169 va_end (v);
3170 return s;
3171}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003172
3173/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3174 function prototypes and stuff, but not '\xHH' hex character constants.
3175 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003176 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003177 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3178 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003179 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003180int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3181
Martin v. Löwiseba40652007-08-30 20:10:57 +00003182/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3183 inside strings and character constants. */
3184#define FOO(x) 'x'
3185int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3186
Skip Montanaro6dead952003-09-25 14:50:04 +00003187int test (int i, double x);
3188struct s1 {int (*f) (int a);};
3189struct s2 {int (*f) (double a);};
3190int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3191int argc;
3192char **argv;
3193int
3194main ()
3195{
3196return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3197 ;
3198 return 0;
3199}
3200_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003201for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3202 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003203do
3204 CC="$ac_save_CC $ac_arg"
3205 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003206if { (ac_try="$ac_compile"
3207case "(($ac_try" in
3208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3209 *) ac_try_echo=$ac_try;;
3210esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003212 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003213 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003214 grep -v '^ *+' conftest.er1 >conftest.err
3215 rm -f conftest.er1
3216 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003218 (exit $ac_status); } && {
3219 test -z "$ac_c_werror_flag" ||
3220 test ! -s conftest.err
3221 } && test -s conftest.$ac_objext; then
3222 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003223else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003224 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003225sed 's/^/| /' conftest.$ac_ext >&5
3226
Martin v. Löwiseba40652007-08-30 20:10:57 +00003227
Skip Montanaro6dead952003-09-25 14:50:04 +00003228fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003229
3230rm -f core conftest.err conftest.$ac_objext
3231 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003232done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003233rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003234CC=$ac_save_CC
3235
3236fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003237# AC_CACHE_VAL
3238case "x$ac_cv_prog_cc_c89" in
3239 x)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003240 { echo "$as_me:$LINENO: result: none needed" >&5
3241echo "${ECHO_T}none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003242 xno)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003243 { echo "$as_me:$LINENO: result: unsupported" >&5
3244echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003245 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003246 CC="$CC $ac_cv_prog_cc_c89"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003247 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3248echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003249esac
3250
Skip Montanaro6dead952003-09-25 14:50:04 +00003251
Martin v. Löwis11437992002-04-12 09:54:03 +00003252ac_ext=c
3253ac_cpp='$CPP $CPPFLAGS'
3254ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3255ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3256ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003257
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003258
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003259
3260
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003261{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3262echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003263
Martin v. Löwiseba40652007-08-30 20:10:57 +00003264# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003265if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003266 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003267
3268 case $withval in
3269 no) with_cxx_main=no
3270 MAINCC='$(CC)';;
3271 yes) with_cxx_main=yes
3272 MAINCC='$(CXX)';;
3273 *) with_cxx_main=yes
3274 MAINCC=$withval
3275 if test -z "$CXX"
3276 then
3277 CXX=$withval
3278 fi;;
3279 esac
3280else
3281
3282 with_cxx_main=no
3283 MAINCC='$(CC)'
3284
Martin v. Löwiseba40652007-08-30 20:10:57 +00003285fi
3286
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003287{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3288echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003289
3290preset_cxx="$CXX"
3291if test -z "$CXX"
3292then
3293 case "$CC" in
3294 gcc) # Extract the first word of "g++", so it can be a program name with args.
3295set dummy g++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003296{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3297echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003298if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003299 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003300else
3301 case $CXX in
3302 [\\/]* | ?:[\\/]*)
3303 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3304 ;;
3305 *)
3306 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3307for as_dir in notfound
3308do
3309 IFS=$as_save_IFS
3310 test -z "$as_dir" && as_dir=.
3311 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003312 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003313 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003314 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003315 break 2
3316 fi
3317done
3318done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003319IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003320
3321 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3322 ;;
3323esac
3324fi
3325CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003326if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003327 { echo "$as_me:$LINENO: result: $CXX" >&5
3328echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003329else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003330 { echo "$as_me:$LINENO: result: no" >&5
3331echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003332fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003333
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003334 ;;
3335 cc) # Extract the first word of "c++", so it can be a program name with args.
3336set dummy c++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003337{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3338echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003339if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003340 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003341else
3342 case $CXX in
3343 [\\/]* | ?:[\\/]*)
3344 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3345 ;;
3346 *)
3347 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3348for as_dir in notfound
3349do
3350 IFS=$as_save_IFS
3351 test -z "$as_dir" && as_dir=.
3352 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003353 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003354 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003355 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003356 break 2
3357 fi
3358done
3359done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003360IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003361
3362 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3363 ;;
3364esac
3365fi
3366CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003367if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003368 { echo "$as_me:$LINENO: result: $CXX" >&5
3369echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003370else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003371 { echo "$as_me:$LINENO: result: no" >&5
3372echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003373fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003374
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003375 ;;
3376 esac
3377 if test "$CXX" = "notfound"
3378 then
3379 CXX=""
3380 fi
3381fi
3382if test -z "$CXX"
3383then
3384 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3385do
3386 # Extract the first word of "$ac_prog", so it can be a program name with args.
3387set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003388{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3389echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003390if test "${ac_cv_prog_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003391 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003392else
3393 if test -n "$CXX"; then
3394 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3395else
3396as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3397for as_dir in $PATH
3398do
3399 IFS=$as_save_IFS
3400 test -z "$as_dir" && as_dir=.
3401 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003402 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003403 ac_cv_prog_CXX="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003404 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003405 break 2
3406 fi
3407done
3408done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003409IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003410
3411fi
3412fi
3413CXX=$ac_cv_prog_CXX
3414if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003415 { echo "$as_me:$LINENO: result: $CXX" >&5
3416echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003417else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003418 { echo "$as_me:$LINENO: result: no" >&5
3419echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003420fi
3421
Martin v. Löwiseba40652007-08-30 20:10:57 +00003422
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003423 test -n "$CXX" && break
3424done
3425test -n "$CXX" || CXX="notfound"
3426
3427 if test "$CXX" = "notfound"
3428 then
3429 CXX=""
3430 fi
3431fi
3432if test "$preset_cxx" != "$CXX"
3433then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003434 { echo "$as_me:$LINENO: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003435
3436 By default, distutils will build C++ extension modules with \"$CXX\".
3437 If this is not intended, then set CXX on the configure command line.
3438 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003439echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003440
3441 By default, distutils will build C++ extension modules with \"$CXX\".
3442 If this is not intended, then set CXX on the configure command line.
3443 " >&2;}
3444fi
3445
3446
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003447# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003448
3449ac_ext=c
3450ac_cpp='$CPP $CPPFLAGS'
3451ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3452ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3453ac_compiler_gnu=$ac_cv_c_compiler_gnu
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003454{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3455echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003456# On Suns, sometimes $CPP names a directory.
3457if test -n "$CPP" && test -d "$CPP"; then
3458 CPP=
3459fi
3460if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003461 if test "${ac_cv_prog_CPP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003462 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003463else
Martin v. Löwis11437992002-04-12 09:54:03 +00003464 # Double quotes because CPP needs to be expanded
3465 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3466 do
3467 ac_preproc_ok=false
3468for ac_c_preproc_warn_flag in '' yes
3469do
3470 # Use a header file that comes with gcc, so configuring glibc
3471 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003472 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3473 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003474 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003475 # not just through cpp. "Syntax error" is here to catch this case.
3476 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003477/* confdefs.h. */
3478_ACEOF
3479cat confdefs.h >>conftest.$ac_ext
3480cat >>conftest.$ac_ext <<_ACEOF
3481/* end confdefs.h. */
3482#ifdef __STDC__
3483# include <limits.h>
3484#else
3485# include <assert.h>
3486#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003487 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003488_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003489if { (ac_try="$ac_cpp conftest.$ac_ext"
3490case "(($ac_try" in
3491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3492 *) ac_try_echo=$ac_try;;
3493esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003495 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003496 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003497 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003498 rm -f conftest.er1
3499 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003501 (exit $ac_status); } >/dev/null && {
3502 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3503 test ! -s conftest.err
3504 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003505 :
3506else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003507 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003508sed 's/^/| /' conftest.$ac_ext >&5
3509
Martin v. Löwis11437992002-04-12 09:54:03 +00003510 # Broken: fails on valid input.
3511continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003512fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003513
Martin v. Löwis11437992002-04-12 09:54:03 +00003514rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003515
Martin v. Löwiseba40652007-08-30 20:10:57 +00003516 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003517 # can be detected and how.
3518 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003519/* confdefs.h. */
3520_ACEOF
3521cat confdefs.h >>conftest.$ac_ext
3522cat >>conftest.$ac_ext <<_ACEOF
3523/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003524#include <ac_nonexistent.h>
3525_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003526if { (ac_try="$ac_cpp conftest.$ac_ext"
3527case "(($ac_try" in
3528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3529 *) ac_try_echo=$ac_try;;
3530esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003532 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003533 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003534 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003535 rm -f conftest.er1
3536 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003538 (exit $ac_status); } >/dev/null && {
3539 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3540 test ! -s conftest.err
3541 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003542 # Broken: success on invalid input.
3543continue
3544else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003545 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003546sed 's/^/| /' conftest.$ac_ext >&5
3547
Martin v. Löwis11437992002-04-12 09:54:03 +00003548 # Passes both tests.
3549ac_preproc_ok=:
3550break
3551fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003552
Martin v. Löwis11437992002-04-12 09:54:03 +00003553rm -f conftest.err conftest.$ac_ext
3554
3555done
3556# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3557rm -f conftest.err conftest.$ac_ext
3558if $ac_preproc_ok; then
3559 break
3560fi
3561
3562 done
3563 ac_cv_prog_CPP=$CPP
3564
3565fi
3566 CPP=$ac_cv_prog_CPP
3567else
3568 ac_cv_prog_CPP=$CPP
3569fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003570{ echo "$as_me:$LINENO: result: $CPP" >&5
3571echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003572ac_preproc_ok=false
3573for ac_c_preproc_warn_flag in '' yes
3574do
3575 # Use a header file that comes with gcc, so configuring glibc
3576 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003577 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3578 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003579 # On the NeXT, cc -E runs the code through the compiler's parser,
3580 # not just through cpp. "Syntax error" is here to catch this case.
3581 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003582/* confdefs.h. */
3583_ACEOF
3584cat confdefs.h >>conftest.$ac_ext
3585cat >>conftest.$ac_ext <<_ACEOF
3586/* end confdefs.h. */
3587#ifdef __STDC__
3588# include <limits.h>
3589#else
3590# include <assert.h>
3591#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003592 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003593_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003594if { (ac_try="$ac_cpp conftest.$ac_ext"
3595case "(($ac_try" in
3596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3597 *) ac_try_echo=$ac_try;;
3598esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003600 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003601 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003602 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003603 rm -f conftest.er1
3604 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003606 (exit $ac_status); } >/dev/null && {
3607 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3608 test ! -s conftest.err
3609 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003610 :
3611else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003612 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003613sed 's/^/| /' conftest.$ac_ext >&5
3614
Martin v. Löwis11437992002-04-12 09:54:03 +00003615 # Broken: fails on valid input.
3616continue
3617fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003618
Martin v. Löwis11437992002-04-12 09:54:03 +00003619rm -f conftest.err conftest.$ac_ext
3620
Martin v. Löwiseba40652007-08-30 20:10:57 +00003621 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003622 # can be detected and how.
3623 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003624/* confdefs.h. */
3625_ACEOF
3626cat confdefs.h >>conftest.$ac_ext
3627cat >>conftest.$ac_ext <<_ACEOF
3628/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003629#include <ac_nonexistent.h>
3630_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003631if { (ac_try="$ac_cpp conftest.$ac_ext"
3632case "(($ac_try" in
3633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3634 *) ac_try_echo=$ac_try;;
3635esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003637 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003638 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003639 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003640 rm -f conftest.er1
3641 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003643 (exit $ac_status); } >/dev/null && {
3644 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3645 test ! -s conftest.err
3646 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003647 # Broken: success on invalid input.
3648continue
3649else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003650 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003651sed 's/^/| /' conftest.$ac_ext >&5
3652
Martin v. Löwis11437992002-04-12 09:54:03 +00003653 # Passes both tests.
3654ac_preproc_ok=:
3655break
3656fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003657
Martin v. Löwis11437992002-04-12 09:54:03 +00003658rm -f conftest.err conftest.$ac_ext
3659
3660done
3661# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3662rm -f conftest.err conftest.$ac_ext
3663if $ac_preproc_ok; then
3664 :
3665else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003666 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003667See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003668echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003669See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003670 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003671fi
3672
3673ac_ext=c
3674ac_cpp='$CPP $CPPFLAGS'
3675ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3676ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3677ac_compiler_gnu=$ac_cv_c_compiler_gnu
3678
3679
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003680{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3681echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003682if test "${ac_cv_path_GREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003683 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003684else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003685 # Extract the first word of "grep ggrep" to use in msg output
3686if test -z "$GREP"; then
3687set dummy grep ggrep; ac_prog_name=$2
3688if test "${ac_cv_path_GREP+set}" = set; then
3689 echo $ECHO_N "(cached) $ECHO_C" >&6
3690else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003691 ac_path_GREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003692# Loop through the user's path and test for each of PROGNAME-LIST
3693as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003694for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3695do
3696 IFS=$as_save_IFS
3697 test -z "$as_dir" && as_dir=.
3698 for ac_prog in grep ggrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003699 for ac_exec_ext in '' $ac_executable_extensions; do
3700 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3701 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3702 # Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003703 # Check for GNU $ac_path_GREP
3704case `"$ac_path_GREP" --version 2>&1` in
3705*GNU*)
3706 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3707*)
3708 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003709 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003710 while :
3711 do
3712 cat "conftest.in" "conftest.in" >"conftest.tmp"
3713 mv "conftest.tmp" "conftest.in"
3714 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003715 echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003716 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3717 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3718 ac_count=`expr $ac_count + 1`
3719 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3720 # Best one so far, save it but keep looking for a better one
3721 ac_cv_path_GREP="$ac_path_GREP"
3722 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003723 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003724 # 10*(2^10) chars as input seems more than enough
3725 test $ac_count -gt 10 && break
3726 done
3727 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3728esac
3729
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003730
3731 $ac_path_GREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003732 done
3733done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003734
3735done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003736IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003737
3738
3739fi
3740
3741GREP="$ac_cv_path_GREP"
3742if test -z "$GREP"; then
3743 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3744echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003745 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003746fi
3747
Martin v. Löwiseba40652007-08-30 20:10:57 +00003748else
3749 ac_cv_path_GREP=$GREP
3750fi
3751
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003752
Martin v. Löwiseba40652007-08-30 20:10:57 +00003753fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003754{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3755echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003756 GREP="$ac_cv_path_GREP"
3757
3758
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003759{ echo "$as_me:$LINENO: checking for egrep" >&5
3760echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003761if test "${ac_cv_path_EGREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003762 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00003763else
3764 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3765 then ac_cv_path_EGREP="$GREP -E"
3766 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003767 # Extract the first word of "egrep" to use in msg output
3768if test -z "$EGREP"; then
3769set dummy egrep; ac_prog_name=$2
3770if test "${ac_cv_path_EGREP+set}" = set; then
3771 echo $ECHO_N "(cached) $ECHO_C" >&6
3772else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003773 ac_path_EGREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003774# Loop through the user's path and test for each of PROGNAME-LIST
3775as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003776for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3777do
3778 IFS=$as_save_IFS
3779 test -z "$as_dir" && as_dir=.
3780 for ac_prog in egrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003781 for ac_exec_ext in '' $ac_executable_extensions; do
3782 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3783 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3784 # Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003785 # Check for GNU $ac_path_EGREP
3786case `"$ac_path_EGREP" --version 2>&1` in
3787*GNU*)
3788 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3789*)
3790 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003791 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003792 while :
3793 do
3794 cat "conftest.in" "conftest.in" >"conftest.tmp"
3795 mv "conftest.tmp" "conftest.in"
3796 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003797 echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003798 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3799 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3800 ac_count=`expr $ac_count + 1`
3801 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3802 # Best one so far, save it but keep looking for a better one
3803 ac_cv_path_EGREP="$ac_path_EGREP"
3804 ac_path_EGREP_max=$ac_count
3805 fi
3806 # 10*(2^10) chars as input seems more than enough
3807 test $ac_count -gt 10 && break
3808 done
3809 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3810esac
3811
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003812
3813 $ac_path_EGREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003814 done
3815done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003816
3817done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003818IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003819
3820
3821fi
3822
3823EGREP="$ac_cv_path_EGREP"
3824if test -z "$EGREP"; then
3825 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3826echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003827 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003828fi
3829
Martin v. Löwiseba40652007-08-30 20:10:57 +00003830else
3831 ac_cv_path_EGREP=$EGREP
3832fi
3833
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003834
Martin v. Löwiseba40652007-08-30 20:10:57 +00003835 fi
3836fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003837{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3838echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003839 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003840
3841
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003842
3843{ echo "$as_me:$LINENO: checking for AIX" >&5
3844echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3845cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003846/* confdefs.h. */
3847_ACEOF
3848cat confdefs.h >>conftest.$ac_ext
3849cat >>conftest.$ac_ext <<_ACEOF
3850/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003851#ifdef _AIX
3852 yes
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003853#endif
3854
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003855_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003856if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3857 $EGREP "yes" >/dev/null 2>&1; then
3858 { echo "$as_me:$LINENO: result: yes" >&5
3859echo "${ECHO_T}yes" >&6; }
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003860cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003861#define _ALL_SOURCE 1
3862_ACEOF
3863
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003864else
3865 { echo "$as_me:$LINENO: result: no" >&5
3866echo "${ECHO_T}no" >&6; }
3867fi
Mark Dickinsonab442262009-11-20 19:27:43 +00003868rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003869
3870
3871
3872# Check for unsupported systems
3873case $ac_sys_system/$ac_sys_release in
3874atheos*|Linux*/1*)
3875 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3876 echo See README for details.
3877 exit 1;;
3878esac
3879
3880
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003881{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3882echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003883
3884# Check whether --with-suffix was given.
3885if test "${with_suffix+set}" = set; then
3886 withval=$with_suffix;
3887 case $withval in
3888 no) EXEEXT=;;
3889 yes) EXEEXT=.exe;;
3890 *) EXEEXT=$withval;;
3891 esac
3892fi
3893
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003894{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3895echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003896
3897# Test whether we're running on a non-case-sensitive system, in which
3898# case we give a warning if no ext is given
3899
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003900{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3901echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003902if test ! -d CaseSensitiveTestDir; then
3903mkdir CaseSensitiveTestDir
3904fi
3905
3906if test -d casesensitivetestdir
3907then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003908 { echo "$as_me:$LINENO: result: yes" >&5
3909echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003910 BUILDEXEEXT=.exe
3911else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003912 { echo "$as_me:$LINENO: result: no" >&5
3913echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003914 BUILDEXEEXT=$EXEEXT
3915fi
3916rmdir CaseSensitiveTestDir
3917
3918case $MACHDEP in
3919bsdos*)
3920 case $CC in
3921 gcc) CC="$CC -D_HAVE_BSDI";;
3922 esac;;
3923esac
3924
3925case $ac_sys_system in
3926hp*|HP*)
3927 case $CC in
3928 cc|*/cc) CC="$CC -Ae";;
3929 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003930SunOS*)
3931 # Some functions have a prototype only with that define, e.g. confstr
3932
3933cat >>confdefs.h <<\_ACEOF
3934#define __EXTENSIONS__ 1
3935_ACEOF
3936
3937 ;;
3938esac
3939
3940
3941
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003942{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3943echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003944if test -z "$LIBRARY"
3945then
3946 LIBRARY='libpython$(VERSION).a'
3947fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003948{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3949echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003950
3951# LDLIBRARY is the name of the library to link against (as opposed to the
3952# name of the library into which to insert object files). BLDLIBRARY is also
3953# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3954# is blank as the main program is not linked directly against LDLIBRARY.
3955# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3956# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3957# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3958# DLLLIBRARY is the shared (i.e., DLL) library.
3959#
3960# RUNSHARED is used to run shared python without installed libraries
3961#
3962# INSTSONAME is the name of the shared library that will be use to install
3963# on the system - some systems like version suffix, others don't
3964
3965
3966
3967
3968
3969
3970LDLIBRARY="$LIBRARY"
3971BLDLIBRARY='$(LDLIBRARY)'
3972INSTSONAME='$(LDLIBRARY)'
3973DLLLIBRARY=''
3974LDLIBRARYDIR=''
3975RUNSHARED=''
3976
3977# LINKCC is the command that links the python executable -- default is $(CC).
3978# If CXX is set, and if it is needed to link a main function that was
3979# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3980# python might then depend on the C++ runtime
3981# This is altered for AIX in order to build the export list before
3982# linking.
3983
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003984{ echo "$as_me:$LINENO: checking LINKCC" >&5
3985echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003986if test -z "$LINKCC"
3987then
3988 LINKCC='$(PURIFY) $(MAINCC)'
3989 case $ac_sys_system in
3990 AIX*)
3991 exp_extra="\"\""
3992 if test $ac_sys_release -ge 5 -o \
3993 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3994 exp_extra="."
3995 fi
3996 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003997 QNX*)
3998 # qcc must be used because the other compilers do not
3999 # support -N.
4000 LINKCC=qcc;;
4001 esac
4002fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004003{ echo "$as_me:$LINENO: result: $LINKCC" >&5
4004echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004005
4006# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4007# make sure we default having it set to "no": this is used by
4008# distutils.unixccompiler to know if it should add --enable-new-dtags
4009# to linker command lines, and failing to detect GNU ld simply results
4010# in the same bahaviour as before.
4011
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004012{ echo "$as_me:$LINENO: checking for GNU ld" >&5
4013echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004014ac_prog=ld
4015if test "$GCC" = yes; then
4016 ac_prog=`$CC -print-prog-name=ld`
4017fi
4018case `"$ac_prog" -V 2>&1 < /dev/null` in
4019 *GNU*)
4020 GNULD=yes;;
4021 *)
4022 GNULD=no;;
4023esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004024{ echo "$as_me:$LINENO: result: $GNULD" >&5
4025echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004026
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004027{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
4028echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004029# Check whether --enable-shared was given.
4030if test "${enable_shared+set}" = set; then
4031 enableval=$enable_shared;
4032fi
4033
4034
4035if test -z "$enable_shared"
4036then
4037 case $ac_sys_system in
4038 CYGWIN* | atheos*)
4039 enable_shared="yes";;
4040 *)
4041 enable_shared="no";;
4042 esac
4043fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004044{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4045echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004046
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004047{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4048echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004049# Check whether --enable-profiling was given.
4050if test "${enable_profiling+set}" = set; then
4051 enableval=$enable_profiling; ac_save_cc="$CC"
4052 CC="$CC -pg"
4053 if test "$cross_compiling" = yes; then
4054 ac_enable_profiling="no"
4055else
4056 cat >conftest.$ac_ext <<_ACEOF
4057/* confdefs.h. */
4058_ACEOF
4059cat confdefs.h >>conftest.$ac_ext
4060cat >>conftest.$ac_ext <<_ACEOF
4061/* end confdefs.h. */
4062int main() { return 0; }
4063_ACEOF
4064rm -f conftest$ac_exeext
4065if { (ac_try="$ac_link"
4066case "(($ac_try" in
4067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4068 *) ac_try_echo=$ac_try;;
4069esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004071 (eval "$ac_link") 2>&5
4072 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004074 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4075 { (case "(($ac_try" in
4076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4077 *) ac_try_echo=$ac_try;;
4078esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004080 (eval "$ac_try") 2>&5
4081 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004083 (exit $ac_status); }; }; then
4084 ac_enable_profiling="yes"
4085else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004086 echo "$as_me: program exited with status $ac_status" >&5
4087echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004088sed 's/^/| /' conftest.$ac_ext >&5
4089
4090( exit $ac_status )
4091ac_enable_profiling="no"
4092fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004093rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4094fi
4095
4096
4097 CC="$ac_save_cc"
4098fi
4099
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004100{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4101echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004102
4103case "$ac_enable_profiling" in
4104 "yes")
4105 BASECFLAGS="-pg $BASECFLAGS"
4106 LDFLAGS="-pg $LDFLAGS"
4107 ;;
4108esac
4109
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004110{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4111echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004112
4113# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4114# library that we build, but we do not want to link against it (we
4115# will find it with a -framework option). For this reason there is an
4116# extra variable BLDLIBRARY against which Python and the extension
4117# modules are linked, BLDLIBRARY. This is normally the same as
4118# LDLIBRARY, but empty for MacOSX framework builds.
4119if test "$enable_framework"
4120then
4121 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4122 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4123 BLDLIBRARY=''
4124else
4125 BLDLIBRARY='$(LDLIBRARY)'
4126fi
4127
4128# Other platforms follow
4129if test $enable_shared = "yes"; then
4130
4131cat >>confdefs.h <<\_ACEOF
4132#define Py_ENABLE_SHARED 1
4133_ACEOF
4134
4135 case $ac_sys_system in
4136 BeOS*)
4137 LDLIBRARY='libpython$(VERSION).so'
4138 ;;
4139 CYGWIN*)
4140 LDLIBRARY='libpython$(VERSION).dll.a'
4141 DLLLIBRARY='libpython$(VERSION).dll'
4142 ;;
4143 SunOS*)
4144 LDLIBRARY='libpython$(VERSION).so'
4145 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4146 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4147 INSTSONAME="$LDLIBRARY".$SOVERSION
4148 ;;
4149 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4150 LDLIBRARY='libpython$(VERSION).so'
4151 BLDLIBRARY='-L. -lpython$(VERSION)'
4152 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4153 case $ac_sys_system in
4154 FreeBSD*)
4155 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4156 ;;
4157 esac
4158 INSTSONAME="$LDLIBRARY".$SOVERSION
4159 ;;
4160 hp*|HP*)
4161 case `uname -m` in
4162 ia64)
4163 LDLIBRARY='libpython$(VERSION).so'
4164 ;;
4165 *)
4166 LDLIBRARY='libpython$(VERSION).sl'
4167 ;;
4168 esac
4169 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4170 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4171 ;;
4172 OSF*)
4173 LDLIBRARY='libpython$(VERSION).so'
4174 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4175 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4176 ;;
4177 atheos*)
4178 LDLIBRARY='libpython$(VERSION).so'
4179 BLDLIBRARY='-L. -lpython$(VERSION)'
4180 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4181 ;;
4182 Darwin*)
4183 LDLIBRARY='libpython$(VERSION).dylib'
4184 BLDLIBRARY='-L. -lpython$(VERSION)'
4185 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4186 ;;
4187
4188 esac
4189else # shared is disabled
4190 case $ac_sys_system in
4191 CYGWIN*)
4192 BLDLIBRARY='$(LIBRARY)'
4193 LDLIBRARY='libpython$(VERSION).dll.a'
4194 ;;
4195 esac
4196fi
4197
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004198{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4199echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004200
4201if test -n "$ac_tool_prefix"; then
4202 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4203set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004204{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4205echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004206if test "${ac_cv_prog_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004207 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004208else
4209 if test -n "$RANLIB"; then
4210 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4211else
4212as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4213for as_dir in $PATH
4214do
4215 IFS=$as_save_IFS
4216 test -z "$as_dir" && as_dir=.
4217 for ac_exec_ext in '' $ac_executable_extensions; do
4218 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4219 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004220 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004221 break 2
4222 fi
4223done
4224done
4225IFS=$as_save_IFS
4226
4227fi
4228fi
4229RANLIB=$ac_cv_prog_RANLIB
4230if test -n "$RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004231 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4232echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004233else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004234 { echo "$as_me:$LINENO: result: no" >&5
4235echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004236fi
4237
4238
4239fi
4240if test -z "$ac_cv_prog_RANLIB"; then
4241 ac_ct_RANLIB=$RANLIB
4242 # Extract the first word of "ranlib", so it can be a program name with args.
4243set dummy ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004244{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4245echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004246if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004247 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004248else
4249 if test -n "$ac_ct_RANLIB"; then
4250 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4251else
4252as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4253for as_dir in $PATH
4254do
4255 IFS=$as_save_IFS
4256 test -z "$as_dir" && as_dir=.
4257 for ac_exec_ext in '' $ac_executable_extensions; do
4258 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4259 ac_cv_prog_ac_ct_RANLIB="ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004260 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004261 break 2
4262 fi
4263done
4264done
4265IFS=$as_save_IFS
4266
4267fi
4268fi
4269ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4270if test -n "$ac_ct_RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004271 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4272echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004273else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004274 { echo "$as_me:$LINENO: result: no" >&5
4275echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004276fi
4277
4278 if test "x$ac_ct_RANLIB" = x; then
4279 RANLIB=":"
4280 else
4281 case $cross_compiling:$ac_tool_warned in
4282yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004283{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4284whose name does not start with the host triplet. If you think this
4285configuration is useful to you, please write to autoconf@gnu.org." >&5
4286echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4287whose name does not start with the host triplet. If you think this
4288configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004289ac_tool_warned=yes ;;
4290esac
4291 RANLIB=$ac_ct_RANLIB
4292 fi
4293else
4294 RANLIB="$ac_cv_prog_RANLIB"
4295fi
4296
4297
4298for ac_prog in ar aal
4299do
4300 # Extract the first word of "$ac_prog", so it can be a program name with args.
4301set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004302{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4303echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004304if test "${ac_cv_prog_AR+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004305 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004306else
4307 if test -n "$AR"; then
4308 ac_cv_prog_AR="$AR" # Let the user override the test.
4309else
4310as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4311for as_dir in $PATH
4312do
4313 IFS=$as_save_IFS
4314 test -z "$as_dir" && as_dir=.
4315 for ac_exec_ext in '' $ac_executable_extensions; do
4316 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4317 ac_cv_prog_AR="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004318 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004319 break 2
4320 fi
4321done
4322done
4323IFS=$as_save_IFS
4324
4325fi
4326fi
4327AR=$ac_cv_prog_AR
4328if test -n "$AR"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004329 { echo "$as_me:$LINENO: result: $AR" >&5
4330echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004331else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004332 { echo "$as_me:$LINENO: result: no" >&5
4333echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004334fi
4335
4336
4337 test -n "$AR" && break
4338done
4339test -n "$AR" || AR="ar"
4340
4341
4342# tweak ARFLAGS only if the user didn't set it on the command line
4343
4344if test -z "$ARFLAGS"
4345then
4346 ARFLAGS="rc"
4347fi
4348
4349
4350# Extract the first word of "svnversion", so it can be a program name with args.
4351set dummy svnversion; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004352{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4353echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004354if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004355 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004356else
4357 if test -n "$SVNVERSION"; then
4358 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4359else
4360as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4361for as_dir in $PATH
4362do
4363 IFS=$as_save_IFS
4364 test -z "$as_dir" && as_dir=.
4365 for ac_exec_ext in '' $ac_executable_extensions; do
4366 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4367 ac_cv_prog_SVNVERSION="found"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004368 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004369 break 2
4370 fi
4371done
4372done
4373IFS=$as_save_IFS
4374
4375 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4376fi
4377fi
4378SVNVERSION=$ac_cv_prog_SVNVERSION
4379if test -n "$SVNVERSION"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004380 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4381echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004382else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004383 { echo "$as_me:$LINENO: result: no" >&5
4384echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004385fi
4386
4387
4388if test $SVNVERSION = found
4389then
4390 SVNVERSION="svnversion \$(srcdir)"
4391else
4392 SVNVERSION="echo Unversioned directory"
4393fi
4394
4395case $MACHDEP in
4396bsdos*|hp*|HP*)
4397 # install -d does not work on BSDI or HP-UX
4398 if test -z "$INSTALL"
4399 then
4400 INSTALL="${srcdir}/install-sh -c"
4401 fi
4402esac
4403ac_aux_dir=
4404for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4405 if test -f "$ac_dir/install-sh"; then
4406 ac_aux_dir=$ac_dir
4407 ac_install_sh="$ac_aux_dir/install-sh -c"
4408 break
4409 elif test -f "$ac_dir/install.sh"; then
4410 ac_aux_dir=$ac_dir
4411 ac_install_sh="$ac_aux_dir/install.sh -c"
4412 break
4413 elif test -f "$ac_dir/shtool"; then
4414 ac_aux_dir=$ac_dir
4415 ac_install_sh="$ac_aux_dir/shtool install -c"
4416 break
4417 fi
4418done
4419if test -z "$ac_aux_dir"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004420 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4421echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004422 { (exit 1); exit 1; }; }
4423fi
4424
4425# These three variables are undocumented and unsupported,
4426# and are intended to be withdrawn in a future Autoconf release.
4427# They can cause serious problems if a builder's source tree is in a directory
4428# whose full name contains unusual characters.
4429ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4430ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4431ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4432
4433
4434# Find a good install program. We prefer a C program (faster),
4435# so one script is as good as another. But avoid the broken or
4436# incompatible versions:
4437# SysV /etc/install, /usr/sbin/install
4438# SunOS /usr/etc/install
4439# IRIX /sbin/install
4440# AIX /bin/install
4441# AmigaOS /C/install, which installs bootblocks on floppy discs
4442# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4443# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4444# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4445# OS/2's system install, which has a completely different semantic
4446# ./install, which can be erroneously created by make from ./install.sh.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004447{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4448echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004449if test -z "$INSTALL"; then
4450if test "${ac_cv_path_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004451 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004452else
4453 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4454for as_dir in $PATH
4455do
4456 IFS=$as_save_IFS
4457 test -z "$as_dir" && as_dir=.
4458 # Account for people who put trailing slashes in PATH elements.
4459case $as_dir/ in
4460 ./ | .// | /cC/* | \
4461 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4462 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4463 /usr/ucb/* ) ;;
4464 *)
4465 # OSF1 and SCO ODT 3.0 have their own names for install.
4466 # Don't use installbsd from OSF since it installs stuff as root
4467 # by default.
4468 for ac_prog in ginstall scoinst install; do
4469 for ac_exec_ext in '' $ac_executable_extensions; do
4470 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4471 if test $ac_prog = install &&
4472 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4473 # AIX install. It has an incompatible calling convention.
4474 :
4475 elif test $ac_prog = install &&
4476 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4477 # program-specific install script used by HP pwplus--don't use.
4478 :
4479 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004480 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4481 break 3
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004482 fi
4483 fi
4484 done
4485 done
4486 ;;
4487esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004488done
4489IFS=$as_save_IFS
4490
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004491
4492fi
4493 if test "${ac_cv_path_install+set}" = set; then
4494 INSTALL=$ac_cv_path_install
4495 else
4496 # As a last resort, use the slow shell script. Don't cache a
4497 # value for INSTALL within a source directory, because that will
4498 # break other packages using the cache if that directory is
4499 # removed, or if the value is a relative name.
4500 INSTALL=$ac_install_sh
4501 fi
4502fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004503{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4504echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004505
4506# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4507# It thinks the first close brace ends the variable substitution.
4508test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4509
4510test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4511
4512test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4513
4514
4515# Not every filesystem supports hard links
4516
4517if test -z "$LN" ; then
4518 case $ac_sys_system in
4519 BeOS*) LN="ln -s";;
4520 CYGWIN*) LN="ln -s";;
4521 atheos*) LN="ln -s";;
4522 *) LN=ln;;
4523 esac
4524fi
4525
4526# Check for --with-pydebug
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004527{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4528echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004529
4530# Check whether --with-pydebug was given.
4531if test "${with_pydebug+set}" = set; then
4532 withval=$with_pydebug;
4533if test "$withval" != no
4534then
4535
4536cat >>confdefs.h <<\_ACEOF
4537#define Py_DEBUG 1
4538_ACEOF
4539
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004540 { echo "$as_me:$LINENO: result: yes" >&5
4541echo "${ECHO_T}yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004542 Py_DEBUG='true'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004543else { echo "$as_me:$LINENO: result: no" >&5
4544echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004545fi
4546else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004547 { echo "$as_me:$LINENO: result: no" >&5
4548echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004549fi
4550
4551
4552# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4553# merged with this chunk of code?
4554
4555# Optimizer/debugger flags
4556# ------------------------
4557# (The following bit of code is complicated enough - please keep things
4558# indented properly. Just pretend you're editing Python code. ;-)
4559
4560# There are two parallel sets of case statements below, one that checks to
4561# see if OPT was set and one that does BASECFLAGS setting based upon
4562# compiler and platform. BASECFLAGS tweaks need to be made even if the
4563# user set OPT.
4564
4565# tweak OPT based on compiler and platform, only if the user didn't set
4566# it on the command line
4567
4568if test -z "$OPT"
4569then
4570 case $GCC in
4571 yes)
4572 if test "$CC" != 'g++' ; then
4573 STRICT_PROTO="-Wstrict-prototypes"
4574 fi
4575 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4576 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4577 WRAP="-fwrapv"
4578 fi
4579 case $ac_cv_prog_cc_g in
4580 yes)
4581 if test "$Py_DEBUG" = 'true' ; then
4582 # Optimization messes up debuggers, so turn it off for
4583 # debug builds.
4584 OPT="-g -Wall $STRICT_PROTO"
4585 else
4586 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4587 fi
4588 ;;
4589 *)
4590 OPT="-O3 -Wall $STRICT_PROTO"
4591 ;;
4592 esac
4593 case $ac_sys_system in
4594 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4595 ;;
4596 esac
4597 ;;
4598
4599 *)
4600 OPT="-O"
4601 ;;
4602 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004603fi
4604
4605
4606
4607# The -arch flags for universal builds on OSX
4608UNIVERSAL_ARCH_FLAGS=
4609
4610
4611# tweak BASECFLAGS based on compiler and platform
4612case $GCC in
4613yes)
4614 # Python violates C99 rules, by casting between incompatible
4615 # pointer types. GCC may generate bad code as a result of that,
4616 # so use -fno-strict-aliasing if supported.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004617 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4618echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004619 ac_save_cc="$CC"
4620 CC="$CC -fno-strict-aliasing"
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004621 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
4622 echo $ECHO_N "(cached) $ECHO_C" >&6
4623else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004624 cat >conftest.$ac_ext <<_ACEOF
4625/* confdefs.h. */
4626_ACEOF
4627cat confdefs.h >>conftest.$ac_ext
4628cat >>conftest.$ac_ext <<_ACEOF
4629/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004630
4631int
4632main ()
4633{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004634int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004635 ;
4636 return 0;
4637}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004638_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004639rm -f conftest.$ac_objext
4640if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004641case "(($ac_try" in
4642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4643 *) ac_try_echo=$ac_try;;
4644esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004646 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004647 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004648 grep -v '^ *+' conftest.er1 >conftest.err
4649 rm -f conftest.er1
4650 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004652 (exit $ac_status); } && {
4653 test -z "$ac_c_werror_flag" ||
4654 test ! -s conftest.err
4655 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004656 ac_cv_no_strict_aliasing_ok=yes
4657else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004658 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004659sed 's/^/| /' conftest.$ac_ext >&5
4660
Gregory P. Smith373469a2009-11-01 21:03:38 +00004661 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004662fi
4663
Gregory P. Smith373469a2009-11-01 21:03:38 +00004664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004665fi
4666
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004667 CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004668 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4669echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004670 if test $ac_cv_no_strict_aliasing_ok = yes
4671 then
4672 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4673 fi
4674
4675 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4676 # support. Without this, treatment of subnormals doesn't follow
4677 # the standard.
4678 case $ac_sys_machine in
4679 alpha*)
4680 BASECFLAGS="$BASECFLAGS -mieee"
4681 ;;
4682 esac
4683
4684 case $ac_sys_system in
4685 SCO_SV*)
4686 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4687 ;;
4688 # is there any other compiler on Darwin besides gcc?
4689 Darwin*)
4690 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4691 # used to be here, but non-Apple gcc doesn't accept them.
4692
4693
4694 if test "${enable_universalsdk}"; then
4695 UNIVERSAL_ARCH_FLAGS=""
4696 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4697 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4698 ARCH_RUN_32BIT=""
4699
4700 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4701 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren25967582009-09-06 10:00:26 +00004702 ARCH_RUN_32BIT="true"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004703
4704 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4705 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4706 ARCH_RUN_32BIT="arch -i386 -ppc"
4707
Ronald Oussoren23d92532009-09-07 06:12:00 +00004708 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4709 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
4710 ARCH_RUN_32BIT="arch -i386"
4711
4712 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4713 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
4714 ARCH_RUN_32BIT="arch -i386 -ppc"
4715
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004716 else
Ronald Oussorena9cfbde2009-09-20 20:05:44 +00004717 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4718echo "$as_me: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004719 { (exit 1); exit 1; }; }
4720
4721 fi
4722
4723
4724 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4725 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4726 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4727 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4728 fi
4729 fi
4730
4731 # Calculate the right deployment target for this build.
4732 #
4733 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4734 if test ${cur_target} '>' 10.2; then
4735 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00004736 if test ${enable_universalsdk}; then
4737 if test "${UNIVERSAL_ARCHS}" = "all"; then
4738 # Ensure that the default platform for a
4739 # 4-way universal build is OSX 10.5,
4740 # that's the first OS release where
4741 # 4-way builds make sense.
4742 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00004743
4744 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4745 cur_target='10.5'
4746
4747 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4748 cur_target='10.5'
4749
4750 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4751 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00004752 fi
4753 else
4754 if test `arch` = "i386"; then
4755 # On Intel macs default to a deployment
4756 # target of 10.4, that's the first OSX
4757 # release with Intel support.
4758 cur_target="10.4"
4759 fi
4760 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004761 fi
4762 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4763
4764 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4765 # environment with a value that is the same as what we'll use
4766 # in the Makefile to ensure that we'll get the same compiler
4767 # environment during configure and build time.
4768 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4769 export MACOSX_DEPLOYMENT_TARGET
4770 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4771
4772 ;;
4773 OSF*)
4774 BASECFLAGS="$BASECFLAGS -mieee"
4775 ;;
4776 esac
4777 ;;
4778
4779*)
4780 case $ac_sys_system in
4781 OpenUNIX*|UnixWare*)
4782 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4783 ;;
4784 OSF*)
4785 BASECFLAGS="$BASECFLAGS -ieee -std"
4786 ;;
4787 SCO_SV*)
4788 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4789 ;;
4790 esac
4791 ;;
4792esac
4793
4794if test "$Py_DEBUG" = 'true'; then
4795 :
4796else
4797 OPT="-DNDEBUG $OPT"
4798fi
4799
4800if test "$ac_arch_flags"
4801then
4802 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4803fi
4804
4805# disable check for icc since it seems to pass, but generates a warning
4806if test "$CC" = icc
4807then
4808 ac_cv_opt_olimit_ok=no
4809fi
4810
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004811{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4812echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004813if test "${ac_cv_opt_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004814 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004815else
4816 ac_save_cc="$CC"
4817CC="$CC -OPT:Olimit=0"
Gregory P. Smith373469a2009-11-01 21:03:38 +00004818cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004819/* confdefs.h. */
4820_ACEOF
4821cat confdefs.h >>conftest.$ac_ext
4822cat >>conftest.$ac_ext <<_ACEOF
4823/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004824
4825int
4826main ()
4827{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004828int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004829 ;
4830 return 0;
4831}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004832_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004833rm -f conftest.$ac_objext
4834if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004835case "(($ac_try" in
4836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4837 *) ac_try_echo=$ac_try;;
4838esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004840 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004841 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004842 grep -v '^ *+' conftest.er1 >conftest.err
4843 rm -f conftest.er1
4844 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004846 (exit $ac_status); } && {
4847 test -z "$ac_c_werror_flag" ||
4848 test ! -s conftest.err
4849 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004850 ac_cv_opt_olimit_ok=yes
4851else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004852 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004853sed 's/^/| /' conftest.$ac_ext >&5
4854
Gregory P. Smith373469a2009-11-01 21:03:38 +00004855 ac_cv_opt_olimit_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004856fi
4857
Gregory P. Smith373469a2009-11-01 21:03:38 +00004858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004859CC="$ac_save_cc"
4860fi
4861
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004862{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4863echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004864if test $ac_cv_opt_olimit_ok = yes; then
4865 case $ac_sys_system in
4866 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4867 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4868 # environment?
4869 Darwin*)
4870 ;;
4871 *)
4872 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4873 ;;
4874 esac
4875else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004876 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4877echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004878 if test "${ac_cv_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004879 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004880else
4881 ac_save_cc="$CC"
4882 CC="$CC -Olimit 1500"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004883 cat >conftest.$ac_ext <<_ACEOF
4884/* confdefs.h. */
4885_ACEOF
4886cat confdefs.h >>conftest.$ac_ext
4887cat >>conftest.$ac_ext <<_ACEOF
4888/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004889
4890int
4891main ()
4892{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004893int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004894 ;
4895 return 0;
4896}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004897_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004898rm -f conftest.$ac_objext
4899if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004900case "(($ac_try" in
4901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4902 *) ac_try_echo=$ac_try;;
4903esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004905 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004906 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004907 grep -v '^ *+' conftest.er1 >conftest.err
4908 rm -f conftest.er1
4909 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004911 (exit $ac_status); } && {
4912 test -z "$ac_c_werror_flag" ||
4913 test ! -s conftest.err
4914 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004915 ac_cv_olimit_ok=yes
4916else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004917 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004918sed 's/^/| /' conftest.$ac_ext >&5
4919
Gregory P. Smith373469a2009-11-01 21:03:38 +00004920 ac_cv_olimit_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004921fi
4922
Gregory P. Smith373469a2009-11-01 21:03:38 +00004923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004924 CC="$ac_save_cc"
4925fi
4926
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004927 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4928echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004929 if test $ac_cv_olimit_ok = yes; then
4930 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4931 fi
4932fi
4933
4934# Check whether GCC supports PyArg_ParseTuple format
4935if test "$GCC" = "yes"
4936then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004937 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4938echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004939 save_CFLAGS=$CFLAGS
4940 CFLAGS="$CFLAGS -Werror"
4941 cat >conftest.$ac_ext <<_ACEOF
4942/* confdefs.h. */
4943_ACEOF
4944cat confdefs.h >>conftest.$ac_ext
4945cat >>conftest.$ac_ext <<_ACEOF
4946/* end confdefs.h. */
4947
4948 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4949
4950int
4951main ()
4952{
4953
4954 ;
4955 return 0;
4956}
4957_ACEOF
4958rm -f conftest.$ac_objext
4959if { (ac_try="$ac_compile"
4960case "(($ac_try" in
4961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4962 *) ac_try_echo=$ac_try;;
4963esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004965 (eval "$ac_compile") 2>conftest.er1
4966 ac_status=$?
4967 grep -v '^ *+' conftest.er1 >conftest.err
4968 rm -f conftest.er1
4969 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004971 (exit $ac_status); } && {
4972 test -z "$ac_c_werror_flag" ||
4973 test ! -s conftest.err
4974 } && test -s conftest.$ac_objext; then
4975
4976cat >>confdefs.h <<\_ACEOF
4977#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4978_ACEOF
4979
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004980 { echo "$as_me:$LINENO: result: yes" >&5
4981echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004982else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004983 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004984sed 's/^/| /' conftest.$ac_ext >&5
4985
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004986 { echo "$as_me:$LINENO: result: no" >&5
4987echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004988
4989fi
4990
4991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4992 CFLAGS=$save_CFLAGS
4993fi
4994
4995# On some compilers, pthreads are available without further options
4996# (e.g. MacOS X). On some of these systems, the compiler will not
4997# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4998# So we have to see first whether pthreads are available without
4999# options before we can check whether -Kpthread improves anything.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005000{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
5001echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005002if test "${ac_cv_pthread_is_default+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005003 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005004else
5005 if test "$cross_compiling" = yes; then
5006 ac_cv_pthread_is_default=no
5007else
5008 cat >conftest.$ac_ext <<_ACEOF
5009/* confdefs.h. */
5010_ACEOF
5011cat confdefs.h >>conftest.$ac_ext
5012cat >>conftest.$ac_ext <<_ACEOF
5013/* end confdefs.h. */
5014
5015#include <pthread.h>
5016
5017void* routine(void* p){return NULL;}
5018
5019int main(){
5020 pthread_t p;
5021 if(pthread_create(&p,NULL,routine,NULL)!=0)
5022 return 1;
5023 (void)pthread_detach(p);
5024 return 0;
5025}
5026
5027_ACEOF
5028rm -f conftest$ac_exeext
5029if { (ac_try="$ac_link"
5030case "(($ac_try" in
5031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5032 *) ac_try_echo=$ac_try;;
5033esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005035 (eval "$ac_link") 2>&5
5036 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005038 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5039 { (case "(($ac_try" in
5040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5041 *) ac_try_echo=$ac_try;;
5042esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005044 (eval "$ac_try") 2>&5
5045 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005047 (exit $ac_status); }; }; then
5048
5049 ac_cv_pthread_is_default=yes
5050 ac_cv_kthread=no
5051 ac_cv_pthread=no
5052
5053else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005054 echo "$as_me: program exited with status $ac_status" >&5
5055echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005056sed 's/^/| /' conftest.$ac_ext >&5
5057
5058( exit $ac_status )
5059ac_cv_pthread_is_default=no
5060fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005061rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5062fi
5063
5064
5065
5066fi
5067
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005068{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5069echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005070
5071
5072if test $ac_cv_pthread_is_default = yes
5073then
5074 ac_cv_kpthread=no
5075else
5076# -Kpthread, if available, provides the right #defines
5077# and linker options to make pthread_create available
5078# Some compilers won't report that they do not support -Kpthread,
5079# so we need to run a program to see whether it really made the
5080# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005081{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5082echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005083if test "${ac_cv_kpthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005084 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005085else
5086 ac_save_cc="$CC"
5087CC="$CC -Kpthread"
5088if test "$cross_compiling" = yes; then
5089 ac_cv_kpthread=no
5090else
5091 cat >conftest.$ac_ext <<_ACEOF
5092/* confdefs.h. */
5093_ACEOF
5094cat confdefs.h >>conftest.$ac_ext
5095cat >>conftest.$ac_ext <<_ACEOF
5096/* end confdefs.h. */
5097
5098#include <pthread.h>
5099
5100void* routine(void* p){return NULL;}
5101
5102int main(){
5103 pthread_t p;
5104 if(pthread_create(&p,NULL,routine,NULL)!=0)
5105 return 1;
5106 (void)pthread_detach(p);
5107 return 0;
5108}
5109
5110_ACEOF
5111rm -f conftest$ac_exeext
5112if { (ac_try="$ac_link"
5113case "(($ac_try" in
5114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5115 *) ac_try_echo=$ac_try;;
5116esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005118 (eval "$ac_link") 2>&5
5119 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005121 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5122 { (case "(($ac_try" in
5123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5124 *) ac_try_echo=$ac_try;;
5125esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005127 (eval "$ac_try") 2>&5
5128 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005130 (exit $ac_status); }; }; then
5131 ac_cv_kpthread=yes
5132else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005133 echo "$as_me: program exited with status $ac_status" >&5
5134echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005135sed 's/^/| /' conftest.$ac_ext >&5
5136
5137( exit $ac_status )
5138ac_cv_kpthread=no
5139fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005140rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5141fi
5142
5143
5144CC="$ac_save_cc"
5145fi
5146
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005147{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5148echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005149fi
5150
5151if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5152then
5153# -Kthread, if available, provides the right #defines
5154# and linker options to make pthread_create available
5155# Some compilers won't report that they do not support -Kthread,
5156# so we need to run a program to see whether it really made the
5157# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005158{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5159echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005160if test "${ac_cv_kthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005161 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005162else
5163 ac_save_cc="$CC"
5164CC="$CC -Kthread"
5165if test "$cross_compiling" = yes; then
5166 ac_cv_kthread=no
5167else
5168 cat >conftest.$ac_ext <<_ACEOF
5169/* confdefs.h. */
5170_ACEOF
5171cat confdefs.h >>conftest.$ac_ext
5172cat >>conftest.$ac_ext <<_ACEOF
5173/* end confdefs.h. */
5174
5175#include <pthread.h>
5176
5177void* routine(void* p){return NULL;}
5178
5179int main(){
5180 pthread_t p;
5181 if(pthread_create(&p,NULL,routine,NULL)!=0)
5182 return 1;
5183 (void)pthread_detach(p);
5184 return 0;
5185}
5186
5187_ACEOF
5188rm -f conftest$ac_exeext
5189if { (ac_try="$ac_link"
5190case "(($ac_try" in
5191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5192 *) ac_try_echo=$ac_try;;
5193esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005195 (eval "$ac_link") 2>&5
5196 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005198 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5199 { (case "(($ac_try" in
5200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5201 *) ac_try_echo=$ac_try;;
5202esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005204 (eval "$ac_try") 2>&5
5205 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005207 (exit $ac_status); }; }; then
5208 ac_cv_kthread=yes
5209else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005210 echo "$as_me: program exited with status $ac_status" >&5
5211echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005212sed 's/^/| /' conftest.$ac_ext >&5
5213
5214( exit $ac_status )
5215ac_cv_kthread=no
5216fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005217rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5218fi
5219
5220
5221CC="$ac_save_cc"
5222fi
5223
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005224{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5225echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005226fi
5227
5228if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5229then
5230# -pthread, if available, provides the right #defines
5231# and linker options to make pthread_create available
5232# Some compilers won't report that they do not support -pthread,
5233# so we need to run a program to see whether it really made the
5234# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005235{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5236echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005237if test "${ac_cv_thread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005238 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005239else
5240 ac_save_cc="$CC"
5241CC="$CC -pthread"
5242if test "$cross_compiling" = yes; then
5243 ac_cv_pthread=no
5244else
5245 cat >conftest.$ac_ext <<_ACEOF
5246/* confdefs.h. */
5247_ACEOF
5248cat confdefs.h >>conftest.$ac_ext
5249cat >>conftest.$ac_ext <<_ACEOF
5250/* end confdefs.h. */
5251
5252#include <pthread.h>
5253
5254void* routine(void* p){return NULL;}
5255
5256int main(){
5257 pthread_t p;
5258 if(pthread_create(&p,NULL,routine,NULL)!=0)
5259 return 1;
5260 (void)pthread_detach(p);
5261 return 0;
5262}
5263
5264_ACEOF
5265rm -f conftest$ac_exeext
5266if { (ac_try="$ac_link"
5267case "(($ac_try" in
5268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5269 *) ac_try_echo=$ac_try;;
5270esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005271eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005272 (eval "$ac_link") 2>&5
5273 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005275 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5276 { (case "(($ac_try" in
5277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5278 *) ac_try_echo=$ac_try;;
5279esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005281 (eval "$ac_try") 2>&5
5282 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005284 (exit $ac_status); }; }; then
5285 ac_cv_pthread=yes
5286else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005287 echo "$as_me: program exited with status $ac_status" >&5
5288echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005289sed 's/^/| /' conftest.$ac_ext >&5
5290
5291( exit $ac_status )
5292ac_cv_pthread=no
5293fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005294rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5295fi
5296
5297
5298CC="$ac_save_cc"
5299fi
5300
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005301{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5302echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005303fi
5304
5305# If we have set a CC compiler flag for thread support then
5306# check if it works for CXX, too.
5307ac_cv_cxx_thread=no
5308if test ! -z "$CXX"
5309then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005310{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5311echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005312ac_save_cxx="$CXX"
5313
5314if test "$ac_cv_kpthread" = "yes"
5315then
5316 CXX="$CXX -Kpthread"
5317 ac_cv_cxx_thread=yes
5318elif test "$ac_cv_kthread" = "yes"
5319then
5320 CXX="$CXX -Kthread"
5321 ac_cv_cxx_thread=yes
5322elif test "$ac_cv_pthread" = "yes"
5323then
5324 CXX="$CXX -pthread"
5325 ac_cv_cxx_thread=yes
5326fi
5327
5328if test $ac_cv_cxx_thread = yes
5329then
5330 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5331 $CXX -c conftest.$ac_ext 2>&5
5332 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5333 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5334 then
5335 ac_cv_cxx_thread=yes
5336 else
5337 ac_cv_cxx_thread=no
5338 fi
5339 rm -fr conftest*
5340fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005341{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5342echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005343fi
5344CXX="$ac_save_cxx"
5345
5346
5347# checks for header files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005348{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5349echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005350if test "${ac_cv_header_stdc+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005351 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005352else
5353 cat >conftest.$ac_ext <<_ACEOF
5354/* confdefs.h. */
5355_ACEOF
5356cat confdefs.h >>conftest.$ac_ext
5357cat >>conftest.$ac_ext <<_ACEOF
5358/* end confdefs.h. */
5359#include <stdlib.h>
5360#include <stdarg.h>
5361#include <string.h>
5362#include <float.h>
5363
5364int
5365main ()
5366{
5367
5368 ;
5369 return 0;
5370}
5371_ACEOF
5372rm -f conftest.$ac_objext
5373if { (ac_try="$ac_compile"
5374case "(($ac_try" in
5375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5376 *) ac_try_echo=$ac_try;;
5377esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005379 (eval "$ac_compile") 2>conftest.er1
5380 ac_status=$?
5381 grep -v '^ *+' conftest.er1 >conftest.err
5382 rm -f conftest.er1
5383 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005385 (exit $ac_status); } && {
5386 test -z "$ac_c_werror_flag" ||
5387 test ! -s conftest.err
5388 } && test -s conftest.$ac_objext; then
5389 ac_cv_header_stdc=yes
5390else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005391 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005392sed 's/^/| /' conftest.$ac_ext >&5
5393
5394 ac_cv_header_stdc=no
5395fi
5396
5397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5398
5399if test $ac_cv_header_stdc = yes; then
5400 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5401 cat >conftest.$ac_ext <<_ACEOF
5402/* confdefs.h. */
5403_ACEOF
5404cat confdefs.h >>conftest.$ac_ext
5405cat >>conftest.$ac_ext <<_ACEOF
5406/* end confdefs.h. */
5407#include <string.h>
5408
5409_ACEOF
5410if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5411 $EGREP "memchr" >/dev/null 2>&1; then
5412 :
5413else
5414 ac_cv_header_stdc=no
5415fi
Mark Dickinsonab442262009-11-20 19:27:43 +00005416rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005417
5418fi
5419
5420if test $ac_cv_header_stdc = yes; then
5421 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5422 cat >conftest.$ac_ext <<_ACEOF
5423/* confdefs.h. */
5424_ACEOF
5425cat confdefs.h >>conftest.$ac_ext
5426cat >>conftest.$ac_ext <<_ACEOF
5427/* end confdefs.h. */
5428#include <stdlib.h>
5429
5430_ACEOF
5431if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5432 $EGREP "free" >/dev/null 2>&1; then
5433 :
5434else
5435 ac_cv_header_stdc=no
5436fi
Mark Dickinsonab442262009-11-20 19:27:43 +00005437rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005438
5439fi
5440
5441if test $ac_cv_header_stdc = yes; then
5442 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5443 if test "$cross_compiling" = yes; then
5444 :
5445else
5446 cat >conftest.$ac_ext <<_ACEOF
5447/* confdefs.h. */
5448_ACEOF
5449cat confdefs.h >>conftest.$ac_ext
5450cat >>conftest.$ac_ext <<_ACEOF
5451/* end confdefs.h. */
5452#include <ctype.h>
5453#include <stdlib.h>
5454#if ((' ' & 0x0FF) == 0x020)
5455# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5456# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5457#else
5458# define ISLOWER(c) \
5459 (('a' <= (c) && (c) <= 'i') \
5460 || ('j' <= (c) && (c) <= 'r') \
5461 || ('s' <= (c) && (c) <= 'z'))
5462# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5463#endif
5464
5465#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5466int
5467main ()
5468{
5469 int i;
5470 for (i = 0; i < 256; i++)
5471 if (XOR (islower (i), ISLOWER (i))
5472 || toupper (i) != TOUPPER (i))
5473 return 2;
5474 return 0;
5475}
5476_ACEOF
5477rm -f conftest$ac_exeext
5478if { (ac_try="$ac_link"
5479case "(($ac_try" in
5480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5481 *) ac_try_echo=$ac_try;;
5482esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005484 (eval "$ac_link") 2>&5
5485 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005487 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5488 { (case "(($ac_try" in
5489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5490 *) ac_try_echo=$ac_try;;
5491esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005493 (eval "$ac_try") 2>&5
5494 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005496 (exit $ac_status); }; }; then
5497 :
5498else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005499 echo "$as_me: program exited with status $ac_status" >&5
5500echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005501sed 's/^/| /' conftest.$ac_ext >&5
5502
5503( exit $ac_status )
5504ac_cv_header_stdc=no
5505fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005506rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5507fi
5508
5509
5510fi
5511fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005512{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5513echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005514if test $ac_cv_header_stdc = yes; then
5515
5516cat >>confdefs.h <<\_ACEOF
5517#define STDC_HEADERS 1
5518_ACEOF
5519
5520fi
5521
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005522# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5533 inttypes.h stdint.h unistd.h
5534do
5535as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5536{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5537echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5538if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5539 echo $ECHO_N "(cached) $ECHO_C" >&6
5540else
5541 cat >conftest.$ac_ext <<_ACEOF
5542/* confdefs.h. */
5543_ACEOF
5544cat confdefs.h >>conftest.$ac_ext
5545cat >>conftest.$ac_ext <<_ACEOF
5546/* end confdefs.h. */
5547$ac_includes_default
5548
5549#include <$ac_header>
5550_ACEOF
5551rm -f conftest.$ac_objext
5552if { (ac_try="$ac_compile"
5553case "(($ac_try" in
5554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5555 *) ac_try_echo=$ac_try;;
5556esac
5557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5558 (eval "$ac_compile") 2>conftest.er1
5559 ac_status=$?
5560 grep -v '^ *+' conftest.er1 >conftest.err
5561 rm -f conftest.er1
5562 cat conftest.err >&5
5563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5564 (exit $ac_status); } && {
5565 test -z "$ac_c_werror_flag" ||
5566 test ! -s conftest.err
5567 } && test -s conftest.$ac_objext; then
5568 eval "$as_ac_Header=yes"
5569else
5570 echo "$as_me: failed program was:" >&5
5571sed 's/^/| /' conftest.$ac_ext >&5
5572
5573 eval "$as_ac_Header=no"
5574fi
5575
5576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5577fi
5578ac_res=`eval echo '${'$as_ac_Header'}'`
5579 { echo "$as_me:$LINENO: result: $ac_res" >&5
5580echo "${ECHO_T}$ac_res" >&6; }
5581if test `eval echo '${'$as_ac_Header'}'` = yes; then
5582 cat >>confdefs.h <<_ACEOF
5583#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5584_ACEOF
5585
5586fi
5587
5588done
5589
5590
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005591
Martin v. Löwis11437992002-04-12 09:54:03 +00005592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
Anthony Baxter8a560de2004-10-13 15:30:56 +00005627
Martin v. Löwisc3001752005-01-23 09:27:24 +00005628
Martin v. Löwis11017b12006-01-14 18:12:57 +00005629
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005630
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005631
5632
5633
5634
5635
5636
5637
5638
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005639
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005640
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005641
5642
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005643
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005644
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005645for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5646fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005647ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005648shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005649unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005650sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5651sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005652sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005653sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005654sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Martin v. Löwis0347a9a2006-10-27 07:06:52 +00005655sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005656bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005657do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005658as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005659if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005660 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5661echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005662if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005663 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005664fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005665ac_res=`eval echo '${'$as_ac_Header'}'`
5666 { echo "$as_me:$LINENO: result: $ac_res" >&5
5667echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005668else
Martin v. Löwis11437992002-04-12 09:54:03 +00005669 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005670{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5671echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005672cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005673/* confdefs.h. */
5674_ACEOF
5675cat confdefs.h >>conftest.$ac_ext
5676cat >>conftest.$ac_ext <<_ACEOF
5677/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005678$ac_includes_default
5679#include <$ac_header>
5680_ACEOF
5681rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005682if { (ac_try="$ac_compile"
5683case "(($ac_try" in
5684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5685 *) ac_try_echo=$ac_try;;
5686esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005688 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005689 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005690 grep -v '^ *+' conftest.er1 >conftest.err
5691 rm -f conftest.er1
5692 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005694 (exit $ac_status); } && {
5695 test -z "$ac_c_werror_flag" ||
5696 test ! -s conftest.err
5697 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005698 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005699else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005701sed 's/^/| /' conftest.$ac_ext >&5
5702
Martin v. Löwiseba40652007-08-30 20:10:57 +00005703 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005704fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005705
5706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005707{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5708echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005709
5710# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005711{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5712echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005713cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005714/* confdefs.h. */
5715_ACEOF
5716cat confdefs.h >>conftest.$ac_ext
5717cat >>conftest.$ac_ext <<_ACEOF
5718/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005719#include <$ac_header>
5720_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005721if { (ac_try="$ac_cpp conftest.$ac_ext"
5722case "(($ac_try" in
5723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5724 *) ac_try_echo=$ac_try;;
5725esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005727 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005728 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005729 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005730 rm -f conftest.er1
5731 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005733 (exit $ac_status); } >/dev/null && {
5734 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5735 test ! -s conftest.err
5736 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005737 ac_header_preproc=yes
5738else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005739 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005740sed 's/^/| /' conftest.$ac_ext >&5
5741
Martin v. Löwis11437992002-04-12 09:54:03 +00005742 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005743fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005744
Martin v. Löwis11437992002-04-12 09:54:03 +00005745rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005746{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5747echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005748
5749# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005750case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5751 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005752 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5753echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5754 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5755echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005756 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005757 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005758 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005759 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5760echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5761 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5762echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5763 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5764echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5765 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5766echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5767 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5768echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5769 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5770echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005771 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00005772## -------------------------------------- ##
5773## Report this to http://bugs.python.org/ ##
5774## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005775_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005776 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005777 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005778esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005779{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5780echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005781if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005782 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005783else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005784 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005785fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005786ac_res=`eval echo '${'$as_ac_Header'}'`
5787 { echo "$as_me:$LINENO: result: $ac_res" >&5
5788echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005789
5790fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005791if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005792 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005793#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005794_ACEOF
5795
5796fi
5797
Guido van Rossum627b2d71993-12-24 10:39:16 +00005798done
5799
Martin v. Löwis11437992002-04-12 09:54:03 +00005800
5801
5802
5803
5804
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005805ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005806for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005807 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5808{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5809echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005810if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005811 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005812else
Martin v. Löwis11437992002-04-12 09:54:03 +00005813 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005814/* confdefs.h. */
5815_ACEOF
5816cat confdefs.h >>conftest.$ac_ext
5817cat >>conftest.$ac_ext <<_ACEOF
5818/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005819#include <sys/types.h>
5820#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005821
Martin v. Löwis11437992002-04-12 09:54:03 +00005822int
5823main ()
5824{
5825if ((DIR *) 0)
5826return 0;
5827 ;
5828 return 0;
5829}
5830_ACEOF
5831rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005832if { (ac_try="$ac_compile"
5833case "(($ac_try" in
5834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5835 *) ac_try_echo=$ac_try;;
5836esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005838 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005839 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005840 grep -v '^ *+' conftest.er1 >conftest.err
5841 rm -f conftest.er1
5842 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005844 (exit $ac_status); } && {
5845 test -z "$ac_c_werror_flag" ||
5846 test ! -s conftest.err
5847 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005848 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005849else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005850 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005851sed 's/^/| /' conftest.$ac_ext >&5
5852
Martin v. Löwiseba40652007-08-30 20:10:57 +00005853 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005854fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005855
5856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005857fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005858ac_res=`eval echo '${'$as_ac_Header'}'`
5859 { echo "$as_me:$LINENO: result: $ac_res" >&5
5860echo "${ECHO_T}$ac_res" >&6; }
5861if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005862 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005863#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005864_ACEOF
5865
5866ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005867fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005868
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005869done
5870# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5871if test $ac_header_dirent = dirent.h; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005872 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5873echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005874if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005875 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005876else
Martin v. Löwis11437992002-04-12 09:54:03 +00005877 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005878cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005879/* confdefs.h. */
5880_ACEOF
5881cat confdefs.h >>conftest.$ac_ext
5882cat >>conftest.$ac_ext <<_ACEOF
5883/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005884
Martin v. Löwiseba40652007-08-30 20:10:57 +00005885/* Override any GCC internal prototype to avoid an error.
5886 Use char because int might match the return type of a GCC
5887 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005888#ifdef __cplusplus
5889extern "C"
5890#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005891char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005892int
5893main ()
5894{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005895return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005896 ;
5897 return 0;
5898}
5899_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005900for ac_lib in '' dir; do
5901 if test -z "$ac_lib"; then
5902 ac_res="none required"
5903 else
5904 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005905 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005906 fi
5907 rm -f conftest.$ac_objext conftest$ac_exeext
5908if { (ac_try="$ac_link"
5909case "(($ac_try" in
5910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5911 *) ac_try_echo=$ac_try;;
5912esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005914 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005915 ac_status=$?
5916 grep -v '^ *+' conftest.er1 >conftest.err
5917 rm -f conftest.er1
5918 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005920 (exit $ac_status); } && {
5921 test -z "$ac_c_werror_flag" ||
5922 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005923 } && test -s conftest$ac_exeext &&
5924 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005925 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005926else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005927 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00005928sed 's/^/| /' conftest.$ac_ext >&5
5929
Martin v. Löwiseba40652007-08-30 20:10:57 +00005930
Brett Cannon19fab762007-06-02 03:02:29 +00005931fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005932
5933rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5934 conftest$ac_exeext
5935 if test "${ac_cv_search_opendir+set}" = set; then
5936 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005937fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005938done
5939if test "${ac_cv_search_opendir+set}" = set; then
5940 :
5941else
5942 ac_cv_search_opendir=no
5943fi
5944rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005945LIBS=$ac_func_search_save_LIBS
5946fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005947{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5948echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005949ac_res=$ac_cv_search_opendir
5950if test "$ac_res" != no; then
5951 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005952
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005953fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005954
Michael W. Hudson54241132001-12-07 15:38:26 +00005955else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005956 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5957echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005958if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005959 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005960else
5961 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005962cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005963/* confdefs.h. */
5964_ACEOF
5965cat confdefs.h >>conftest.$ac_ext
5966cat >>conftest.$ac_ext <<_ACEOF
5967/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005968
Martin v. Löwiseba40652007-08-30 20:10:57 +00005969/* Override any GCC internal prototype to avoid an error.
5970 Use char because int might match the return type of a GCC
5971 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005972#ifdef __cplusplus
5973extern "C"
5974#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005975char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005976int
5977main ()
5978{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005979return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005980 ;
5981 return 0;
5982}
5983_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005984for ac_lib in '' x; do
5985 if test -z "$ac_lib"; then
5986 ac_res="none required"
5987 else
5988 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005989 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005990 fi
5991 rm -f conftest.$ac_objext conftest$ac_exeext
5992if { (ac_try="$ac_link"
5993case "(($ac_try" in
5994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5995 *) ac_try_echo=$ac_try;;
5996esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005998 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005999 ac_status=$?
6000 grep -v '^ *+' conftest.er1 >conftest.err
6001 rm -f conftest.er1
6002 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006004 (exit $ac_status); } && {
6005 test -z "$ac_c_werror_flag" ||
6006 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006007 } && test -s conftest$ac_exeext &&
6008 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006009 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006010else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006011 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006012sed 's/^/| /' conftest.$ac_ext >&5
6013
Martin v. Löwiseba40652007-08-30 20:10:57 +00006014
Brett Cannon19fab762007-06-02 03:02:29 +00006015fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006016
6017rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6018 conftest$ac_exeext
6019 if test "${ac_cv_search_opendir+set}" = set; then
6020 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006021fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006022done
6023if test "${ac_cv_search_opendir+set}" = set; then
6024 :
6025else
6026 ac_cv_search_opendir=no
6027fi
6028rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006029LIBS=$ac_func_search_save_LIBS
6030fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006031{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6032echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006033ac_res=$ac_cv_search_opendir
6034if test "$ac_res" != no; then
6035 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006036
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006037fi
6038
6039fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006040
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006041{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6042echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006043if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006044 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006045else
6046 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006047/* confdefs.h. */
6048_ACEOF
6049cat confdefs.h >>conftest.$ac_ext
6050cat >>conftest.$ac_ext <<_ACEOF
6051/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006052#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006053int
6054main ()
6055{
6056return makedev(0, 0);
6057 ;
6058 return 0;
6059}
6060_ACEOF
6061rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006062if { (ac_try="$ac_link"
6063case "(($ac_try" in
6064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6065 *) ac_try_echo=$ac_try;;
6066esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006068 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006069 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006070 grep -v '^ *+' conftest.er1 >conftest.err
6071 rm -f conftest.er1
6072 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006074 (exit $ac_status); } && {
6075 test -z "$ac_c_werror_flag" ||
6076 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006077 } && test -s conftest$ac_exeext &&
6078 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006079 ac_cv_header_sys_types_h_makedev=yes
6080else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006081 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006082sed 's/^/| /' conftest.$ac_ext >&5
6083
Martin v. Löwiseba40652007-08-30 20:10:57 +00006084 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006085fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006086
6087rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006088 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006089
6090fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006091{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6092echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006093
6094if test $ac_cv_header_sys_types_h_makedev = no; then
6095if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006096 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6097echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006098if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006099 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006100fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006101{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6102echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006103else
6104 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006105{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6106echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006107cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006108/* confdefs.h. */
6109_ACEOF
6110cat confdefs.h >>conftest.$ac_ext
6111cat >>conftest.$ac_ext <<_ACEOF
6112/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006113$ac_includes_default
6114#include <sys/mkdev.h>
6115_ACEOF
6116rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006117if { (ac_try="$ac_compile"
6118case "(($ac_try" in
6119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6120 *) ac_try_echo=$ac_try;;
6121esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006123 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006124 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006125 grep -v '^ *+' conftest.er1 >conftest.err
6126 rm -f conftest.er1
6127 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006129 (exit $ac_status); } && {
6130 test -z "$ac_c_werror_flag" ||
6131 test ! -s conftest.err
6132 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006133 ac_header_compiler=yes
6134else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006135 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006136sed 's/^/| /' conftest.$ac_ext >&5
6137
Martin v. Löwiseba40652007-08-30 20:10:57 +00006138 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006139fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006140
6141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006142{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6143echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006144
6145# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006146{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6147echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006148cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006149/* confdefs.h. */
6150_ACEOF
6151cat confdefs.h >>conftest.$ac_ext
6152cat >>conftest.$ac_ext <<_ACEOF
6153/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006154#include <sys/mkdev.h>
6155_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006156if { (ac_try="$ac_cpp conftest.$ac_ext"
6157case "(($ac_try" in
6158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6159 *) ac_try_echo=$ac_try;;
6160esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006162 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006163 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006164 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006165 rm -f conftest.er1
6166 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006168 (exit $ac_status); } >/dev/null && {
6169 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6170 test ! -s conftest.err
6171 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006172 ac_header_preproc=yes
6173else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006174 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006175sed 's/^/| /' conftest.$ac_ext >&5
6176
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006177 ac_header_preproc=no
6178fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006179
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006180rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006181{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6182echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006183
6184# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006185case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6186 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006187 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6188echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6189 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6190echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006191 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006192 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006193 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006194 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6195echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6196 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6197echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6198 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6199echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6200 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6201echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6202 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6203echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6204 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6205echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006206 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006207## -------------------------------------- ##
6208## Report this to http://bugs.python.org/ ##
6209## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006210_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006211 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006212 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006213esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006214{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6215echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006216if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006217 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006218else
6219 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6220fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006221{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6222echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006223
6224fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006225if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006226
6227cat >>confdefs.h <<\_ACEOF
6228#define MAJOR_IN_MKDEV 1
6229_ACEOF
6230
6231fi
6232
6233
6234
6235 if test $ac_cv_header_sys_mkdev_h = no; then
6236 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006237 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6238echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006239if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006240 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006241fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006242{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6243echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006244else
6245 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006246{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6247echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006248cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006249/* confdefs.h. */
6250_ACEOF
6251cat confdefs.h >>conftest.$ac_ext
6252cat >>conftest.$ac_ext <<_ACEOF
6253/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006254$ac_includes_default
6255#include <sys/sysmacros.h>
6256_ACEOF
6257rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006258if { (ac_try="$ac_compile"
6259case "(($ac_try" in
6260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6261 *) ac_try_echo=$ac_try;;
6262esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006264 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006265 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006266 grep -v '^ *+' conftest.er1 >conftest.err
6267 rm -f conftest.er1
6268 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006270 (exit $ac_status); } && {
6271 test -z "$ac_c_werror_flag" ||
6272 test ! -s conftest.err
6273 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006274 ac_header_compiler=yes
6275else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006276 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006277sed 's/^/| /' conftest.$ac_ext >&5
6278
Martin v. Löwiseba40652007-08-30 20:10:57 +00006279 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006280fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006281
6282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006283{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6284echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006285
6286# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006287{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6288echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006289cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006290/* confdefs.h. */
6291_ACEOF
6292cat confdefs.h >>conftest.$ac_ext
6293cat >>conftest.$ac_ext <<_ACEOF
6294/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006295#include <sys/sysmacros.h>
6296_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006297if { (ac_try="$ac_cpp conftest.$ac_ext"
6298case "(($ac_try" in
6299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6300 *) ac_try_echo=$ac_try;;
6301esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006303 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006304 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006305 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006306 rm -f conftest.er1
6307 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006309 (exit $ac_status); } >/dev/null && {
6310 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6311 test ! -s conftest.err
6312 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006313 ac_header_preproc=yes
6314else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006315 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006316sed 's/^/| /' conftest.$ac_ext >&5
6317
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006318 ac_header_preproc=no
6319fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006320
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006321rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006322{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6323echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006324
6325# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006326case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6327 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006328 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6329echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6330 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6331echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006332 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006333 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006334 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006335 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6336echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6337 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6338echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6339 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6340echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6341 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6342echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6343 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6344echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6345 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6346echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006347 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006348## -------------------------------------- ##
6349## Report this to http://bugs.python.org/ ##
6350## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006351_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006352 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006353 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006354esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006355{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6356echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006357if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006358 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006359else
6360 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6361fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006362{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6363echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006364
6365fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006366if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006367
6368cat >>confdefs.h <<\_ACEOF
6369#define MAJOR_IN_SYSMACROS 1
6370_ACEOF
6371
6372fi
6373
6374
6375 fi
6376fi
6377
Michael W. Hudson54241132001-12-07 15:38:26 +00006378
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006379# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006380
6381for ac_header in term.h
6382do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006383as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6384{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6385echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006386if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006387 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006388else
6389 cat >conftest.$ac_ext <<_ACEOF
6390/* confdefs.h. */
6391_ACEOF
6392cat confdefs.h >>conftest.$ac_ext
6393cat >>conftest.$ac_ext <<_ACEOF
6394/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006395
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006396#ifdef HAVE_CURSES_H
6397#include <curses.h>
6398#endif
6399
6400
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006401#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006402_ACEOF
6403rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006404if { (ac_try="$ac_compile"
6405case "(($ac_try" in
6406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6407 *) ac_try_echo=$ac_try;;
6408esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006410 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006411 ac_status=$?
6412 grep -v '^ *+' conftest.er1 >conftest.err
6413 rm -f conftest.er1
6414 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006416 (exit $ac_status); } && {
6417 test -z "$ac_c_werror_flag" ||
6418 test ! -s conftest.err
6419 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006420 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006421else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006422 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006423sed 's/^/| /' conftest.$ac_ext >&5
6424
Martin v. Löwiseba40652007-08-30 20:10:57 +00006425 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006426fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006427
6428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006429fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006430ac_res=`eval echo '${'$as_ac_Header'}'`
6431 { echo "$as_me:$LINENO: result: $ac_res" >&5
6432echo "${ECHO_T}$ac_res" >&6; }
6433if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006434 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006435#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006436_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006437
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006438fi
6439
6440done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006441
6442
Martin v. Löwis11017b12006-01-14 18:12:57 +00006443# On Linux, netlink.h requires asm/types.h
6444
6445for ac_header in linux/netlink.h
6446do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006447as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6448{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6449echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006450if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006451 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006452else
6453 cat >conftest.$ac_ext <<_ACEOF
6454/* confdefs.h. */
6455_ACEOF
6456cat confdefs.h >>conftest.$ac_ext
6457cat >>conftest.$ac_ext <<_ACEOF
6458/* end confdefs.h. */
6459
6460#ifdef HAVE_ASM_TYPES_H
6461#include <asm/types.h>
6462#endif
6463#ifdef HAVE_SYS_SOCKET_H
6464#include <sys/socket.h>
6465#endif
6466
6467
6468#include <$ac_header>
6469_ACEOF
6470rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006471if { (ac_try="$ac_compile"
6472case "(($ac_try" in
6473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6474 *) ac_try_echo=$ac_try;;
6475esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006477 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006478 ac_status=$?
6479 grep -v '^ *+' conftest.er1 >conftest.err
6480 rm -f conftest.er1
6481 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006483 (exit $ac_status); } && {
6484 test -z "$ac_c_werror_flag" ||
6485 test ! -s conftest.err
6486 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006487 eval "$as_ac_Header=yes"
6488else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006489 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006490sed 's/^/| /' conftest.$ac_ext >&5
6491
Martin v. Löwiseba40652007-08-30 20:10:57 +00006492 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006493fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006494
6495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006496fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006497ac_res=`eval echo '${'$as_ac_Header'}'`
6498 { echo "$as_me:$LINENO: result: $ac_res" >&5
6499echo "${ECHO_T}$ac_res" >&6; }
6500if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006501 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006502#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006503_ACEOF
6504
6505fi
6506
6507done
6508
6509
Guido van Rossum627b2d71993-12-24 10:39:16 +00006510# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006511was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006512{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6513echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006514cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006515/* confdefs.h. */
6516_ACEOF
6517cat confdefs.h >>conftest.$ac_ext
6518cat >>conftest.$ac_ext <<_ACEOF
6519/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006520#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006521
6522_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006523if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006524 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006525 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006526else
Martin v. Löwis11437992002-04-12 09:54:03 +00006527
6528
6529cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006530#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006531_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006532
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006533
Guido van Rossum627b2d71993-12-24 10:39:16 +00006534fi
Mark Dickinsonab442262009-11-20 19:27:43 +00006535rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006536
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006537{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6538echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006539
Neal Norwitz11690112002-07-30 01:08:28 +00006540# Check whether using makedev requires defining _OSF_SOURCE
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006541{ echo "$as_me:$LINENO: checking for makedev" >&5
6542echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006543cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006544/* confdefs.h. */
6545_ACEOF
6546cat confdefs.h >>conftest.$ac_ext
6547cat >>conftest.$ac_ext <<_ACEOF
6548/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006549#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006550int
6551main ()
6552{
6553 makedev(0, 0)
6554 ;
6555 return 0;
6556}
6557_ACEOF
6558rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006559if { (ac_try="$ac_link"
6560case "(($ac_try" in
6561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6562 *) ac_try_echo=$ac_try;;
6563esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006565 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006566 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006567 grep -v '^ *+' conftest.er1 >conftest.err
6568 rm -f conftest.er1
6569 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006571 (exit $ac_status); } && {
6572 test -z "$ac_c_werror_flag" ||
6573 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006574 } && test -s conftest$ac_exeext &&
6575 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006576 ac_cv_has_makedev=yes
6577else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006579sed 's/^/| /' conftest.$ac_ext >&5
6580
Martin v. Löwiseba40652007-08-30 20:10:57 +00006581 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006582fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006583
6584rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006585 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006586if test "$ac_cv_has_makedev" = "no"; then
6587 # we didn't link, try if _OSF_SOURCE will allow us to link
6588 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006589/* confdefs.h. */
6590_ACEOF
6591cat confdefs.h >>conftest.$ac_ext
6592cat >>conftest.$ac_ext <<_ACEOF
6593/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006594
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006595#define _OSF_SOURCE 1
6596#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006597
Neal Norwitz11690112002-07-30 01:08:28 +00006598int
6599main ()
6600{
6601 makedev(0, 0)
6602 ;
6603 return 0;
6604}
6605_ACEOF
6606rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006607if { (ac_try="$ac_link"
6608case "(($ac_try" in
6609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6610 *) ac_try_echo=$ac_try;;
6611esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006613 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006614 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006615 grep -v '^ *+' conftest.er1 >conftest.err
6616 rm -f conftest.er1
6617 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006619 (exit $ac_status); } && {
6620 test -z "$ac_c_werror_flag" ||
6621 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006622 } && test -s conftest$ac_exeext &&
6623 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006624 ac_cv_has_makedev=yes
6625else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006626 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006627sed 's/^/| /' conftest.$ac_ext >&5
6628
Martin v. Löwiseba40652007-08-30 20:10:57 +00006629 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006630fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006631
6632rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006633 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006634 if test "$ac_cv_has_makedev" = "yes"; then
6635
6636cat >>confdefs.h <<\_ACEOF
6637#define _OSF_SOURCE 1
6638_ACEOF
6639
6640 fi
6641fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006642{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6643echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006644if test "$ac_cv_has_makedev" = "yes"; then
6645
6646cat >>confdefs.h <<\_ACEOF
6647#define HAVE_MAKEDEV 1
6648_ACEOF
6649
6650fi
6651
Martin v. Löwis399a6892002-10-04 10:22:02 +00006652# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6653# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6654# defined, but the compiler does not support pragma redefine_extname,
6655# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6656# structures (such as rlimit64) without declaring them. As a
6657# work-around, disable LFS on such configurations
6658
6659use_lfs=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006660{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6661echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006662cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006663/* confdefs.h. */
6664_ACEOF
6665cat confdefs.h >>conftest.$ac_ext
6666cat >>conftest.$ac_ext <<_ACEOF
6667/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006668
6669#define _LARGEFILE_SOURCE 1
6670#define _FILE_OFFSET_BITS 64
6671#include <sys/resource.h>
6672
Martin v. Löwis399a6892002-10-04 10:22:02 +00006673int
6674main ()
6675{
6676struct rlimit foo;
6677 ;
6678 return 0;
6679}
6680_ACEOF
6681rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006682if { (ac_try="$ac_compile"
6683case "(($ac_try" in
6684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6685 *) ac_try_echo=$ac_try;;
6686esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006688 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006689 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006690 grep -v '^ *+' conftest.er1 >conftest.err
6691 rm -f conftest.er1
6692 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006694 (exit $ac_status); } && {
6695 test -z "$ac_c_werror_flag" ||
6696 test ! -s conftest.err
6697 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006698 sol_lfs_bug=no
6699else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006701sed 's/^/| /' conftest.$ac_ext >&5
6702
Martin v. Löwiseba40652007-08-30 20:10:57 +00006703 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006704fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006705
6706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006707{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6708echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006709if test "$sol_lfs_bug" = "yes"; then
6710 use_lfs=no
6711fi
6712
6713if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006714# Two defines needed to enable largefile support on various platforms
6715# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006716
Martin v. Löwis11437992002-04-12 09:54:03 +00006717cat >>confdefs.h <<\_ACEOF
6718#define _LARGEFILE_SOURCE 1
6719_ACEOF
6720
6721
6722cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006723#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006724_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006725
Martin v. Löwis399a6892002-10-04 10:22:02 +00006726fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006727
Guido van Rossum84e7b241996-08-19 21:59:00 +00006728# Add some code to confdefs.h so that the test for off_t works on SCO
6729cat >> confdefs.h <<\EOF
6730#if defined(SCO_DS)
6731#undef _OFF_T
6732#endif
6733EOF
6734
Guido van Rossumef2255b2000-03-10 22:30:29 +00006735# Type availability checks
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006736{ echo "$as_me:$LINENO: checking for mode_t" >&5
6737echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006738if test "${ac_cv_type_mode_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006739 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006740else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006741 cat >conftest.$ac_ext <<_ACEOF
6742/* confdefs.h. */
6743_ACEOF
6744cat confdefs.h >>conftest.$ac_ext
6745cat >>conftest.$ac_ext <<_ACEOF
6746/* end confdefs.h. */
6747$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006748typedef mode_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006749int
6750main ()
6751{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006752if ((ac__type_new_ *) 0)
6753 return 0;
6754if (sizeof (ac__type_new_))
6755 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006756 ;
6757 return 0;
6758}
6759_ACEOF
6760rm -f conftest.$ac_objext
6761if { (ac_try="$ac_compile"
6762case "(($ac_try" in
6763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6764 *) ac_try_echo=$ac_try;;
6765esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006767 (eval "$ac_compile") 2>conftest.er1
6768 ac_status=$?
6769 grep -v '^ *+' conftest.er1 >conftest.err
6770 rm -f conftest.er1
6771 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006773 (exit $ac_status); } && {
6774 test -z "$ac_c_werror_flag" ||
6775 test ! -s conftest.err
6776 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006777 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006778else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006779 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006780sed 's/^/| /' conftest.$ac_ext >&5
6781
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006782 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006783fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006784
6785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006786fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006787{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6788echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6789if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006790 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006791else
Martin v. Löwis11437992002-04-12 09:54:03 +00006792
6793cat >>confdefs.h <<_ACEOF
6794#define mode_t int
6795_ACEOF
6796
6797fi
6798
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006799{ echo "$as_me:$LINENO: checking for off_t" >&5
6800echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006801if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006802 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006803else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006804 cat >conftest.$ac_ext <<_ACEOF
6805/* confdefs.h. */
6806_ACEOF
6807cat confdefs.h >>conftest.$ac_ext
6808cat >>conftest.$ac_ext <<_ACEOF
6809/* end confdefs.h. */
6810$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006811typedef off_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006812int
6813main ()
6814{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006815if ((ac__type_new_ *) 0)
6816 return 0;
6817if (sizeof (ac__type_new_))
6818 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006819 ;
6820 return 0;
6821}
6822_ACEOF
6823rm -f conftest.$ac_objext
6824if { (ac_try="$ac_compile"
6825case "(($ac_try" in
6826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6827 *) ac_try_echo=$ac_try;;
6828esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006830 (eval "$ac_compile") 2>conftest.er1
6831 ac_status=$?
6832 grep -v '^ *+' conftest.er1 >conftest.err
6833 rm -f conftest.er1
6834 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006836 (exit $ac_status); } && {
6837 test -z "$ac_c_werror_flag" ||
6838 test ! -s conftest.err
6839 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006840 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006841else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006842 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006843sed 's/^/| /' conftest.$ac_ext >&5
6844
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006845 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006846fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006847
6848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006849fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006850{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6851echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6852if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006853 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006854else
Martin v. Löwis11437992002-04-12 09:54:03 +00006855
6856cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006857#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006858_ACEOF
6859
6860fi
6861
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006862{ echo "$as_me:$LINENO: checking for pid_t" >&5
6863echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006864if test "${ac_cv_type_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006865 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006866else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006867 cat >conftest.$ac_ext <<_ACEOF
6868/* confdefs.h. */
6869_ACEOF
6870cat confdefs.h >>conftest.$ac_ext
6871cat >>conftest.$ac_ext <<_ACEOF
6872/* end confdefs.h. */
6873$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006874typedef pid_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006875int
6876main ()
6877{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006878if ((ac__type_new_ *) 0)
6879 return 0;
6880if (sizeof (ac__type_new_))
6881 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006882 ;
6883 return 0;
6884}
6885_ACEOF
6886rm -f conftest.$ac_objext
6887if { (ac_try="$ac_compile"
6888case "(($ac_try" in
6889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6890 *) ac_try_echo=$ac_try;;
6891esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006893 (eval "$ac_compile") 2>conftest.er1
6894 ac_status=$?
6895 grep -v '^ *+' conftest.er1 >conftest.err
6896 rm -f conftest.er1
6897 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006899 (exit $ac_status); } && {
6900 test -z "$ac_c_werror_flag" ||
6901 test ! -s conftest.err
6902 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006903 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006904else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006905 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006906sed 's/^/| /' conftest.$ac_ext >&5
6907
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006908 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006909fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006910
6911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006912fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006913{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6914echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6915if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006916 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006917else
Martin v. Löwis11437992002-04-12 09:54:03 +00006918
6919cat >>confdefs.h <<_ACEOF
6920#define pid_t int
6921_ACEOF
6922
6923fi
6924
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006925{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6926echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006927if test "${ac_cv_type_signal+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006928 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006929else
6930 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006931/* confdefs.h. */
6932_ACEOF
6933cat confdefs.h >>conftest.$ac_ext
6934cat >>conftest.$ac_ext <<_ACEOF
6935/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006936#include <sys/types.h>
6937#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006938
Martin v. Löwis11437992002-04-12 09:54:03 +00006939int
6940main ()
6941{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006942return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006943 ;
6944 return 0;
6945}
6946_ACEOF
6947rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006948if { (ac_try="$ac_compile"
6949case "(($ac_try" in
6950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6951 *) ac_try_echo=$ac_try;;
6952esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006954 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006955 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006956 grep -v '^ *+' conftest.er1 >conftest.err
6957 rm -f conftest.er1
6958 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006960 (exit $ac_status); } && {
6961 test -z "$ac_c_werror_flag" ||
6962 test ! -s conftest.err
6963 } && test -s conftest.$ac_objext; then
6964 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006965else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006966 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006967sed 's/^/| /' conftest.$ac_ext >&5
6968
Martin v. Löwiseba40652007-08-30 20:10:57 +00006969 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006970fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006971
6972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006973fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006974{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6975echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006976
Martin v. Löwis11437992002-04-12 09:54:03 +00006977cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006978#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006979_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006980
Michael W. Hudson54241132001-12-07 15:38:26 +00006981
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006982{ echo "$as_me:$LINENO: checking for size_t" >&5
6983echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006984if test "${ac_cv_type_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006985 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006986else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006987 cat >conftest.$ac_ext <<_ACEOF
6988/* confdefs.h. */
6989_ACEOF
6990cat confdefs.h >>conftest.$ac_ext
6991cat >>conftest.$ac_ext <<_ACEOF
6992/* end confdefs.h. */
6993$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006994typedef size_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006995int
6996main ()
6997{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006998if ((ac__type_new_ *) 0)
6999 return 0;
7000if (sizeof (ac__type_new_))
7001 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007002 ;
7003 return 0;
7004}
7005_ACEOF
7006rm -f conftest.$ac_objext
7007if { (ac_try="$ac_compile"
7008case "(($ac_try" in
7009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7010 *) ac_try_echo=$ac_try;;
7011esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007013 (eval "$ac_compile") 2>conftest.er1
7014 ac_status=$?
7015 grep -v '^ *+' conftest.er1 >conftest.err
7016 rm -f conftest.er1
7017 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007019 (exit $ac_status); } && {
7020 test -z "$ac_c_werror_flag" ||
7021 test ! -s conftest.err
7022 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007023 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007024else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007025 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007026sed 's/^/| /' conftest.$ac_ext >&5
7027
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007028 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007029fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007030
7031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007032fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007033{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7034echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7035if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007036 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007037else
Martin v. Löwis11437992002-04-12 09:54:03 +00007038
7039cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007040#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007041_ACEOF
7042
7043fi
7044
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007045{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7046echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007047if test "${ac_cv_type_uid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007048 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007049else
7050 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007051/* confdefs.h. */
7052_ACEOF
7053cat confdefs.h >>conftest.$ac_ext
7054cat >>conftest.$ac_ext <<_ACEOF
7055/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007056#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007057
7058_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007059if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007060 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007061 ac_cv_type_uid_t=yes
7062else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007063 ac_cv_type_uid_t=no
7064fi
Mark Dickinsonab442262009-11-20 19:27:43 +00007065rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007066
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007067fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007068{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7069echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007070if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007071
Martin v. Löwis11437992002-04-12 09:54:03 +00007072cat >>confdefs.h <<\_ACEOF
7073#define uid_t int
7074_ACEOF
7075
7076
7077cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007078#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007079_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007080
7081fi
7082
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007083
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007084 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7085echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007086if test "${ac_cv_c_uint32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007087 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007088else
7089 ac_cv_c_uint32_t=no
7090 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7091 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7092 cat >conftest.$ac_ext <<_ACEOF
7093/* confdefs.h. */
7094_ACEOF
7095cat confdefs.h >>conftest.$ac_ext
7096cat >>conftest.$ac_ext <<_ACEOF
7097/* end confdefs.h. */
7098$ac_includes_default
7099int
7100main ()
7101{
7102static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7103test_array [0] = 0
7104
7105 ;
7106 return 0;
7107}
7108_ACEOF
7109rm -f conftest.$ac_objext
7110if { (ac_try="$ac_compile"
7111case "(($ac_try" in
7112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7113 *) ac_try_echo=$ac_try;;
7114esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007116 (eval "$ac_compile") 2>conftest.er1
7117 ac_status=$?
7118 grep -v '^ *+' conftest.er1 >conftest.err
7119 rm -f conftest.er1
7120 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007122 (exit $ac_status); } && {
7123 test -z "$ac_c_werror_flag" ||
7124 test ! -s conftest.err
7125 } && test -s conftest.$ac_objext; then
7126 case $ac_type in
7127 uint32_t) ac_cv_c_uint32_t=yes ;;
7128 *) ac_cv_c_uint32_t=$ac_type ;;
7129esac
7130
7131else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007132 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007133sed 's/^/| /' conftest.$ac_ext >&5
7134
7135
7136fi
7137
7138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7139 test "$ac_cv_c_uint32_t" != no && break
7140 done
7141fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007142{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7143echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007144 case $ac_cv_c_uint32_t in #(
7145 no|yes) ;; #(
7146 *)
7147
7148cat >>confdefs.h <<\_ACEOF
7149#define _UINT32_T 1
7150_ACEOF
7151
7152
7153cat >>confdefs.h <<_ACEOF
7154#define uint32_t $ac_cv_c_uint32_t
7155_ACEOF
7156;;
7157 esac
7158
7159
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007160 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7161echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007162if test "${ac_cv_c_uint64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007163 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007164else
7165 ac_cv_c_uint64_t=no
7166 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7167 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7168 cat >conftest.$ac_ext <<_ACEOF
7169/* confdefs.h. */
7170_ACEOF
7171cat confdefs.h >>conftest.$ac_ext
7172cat >>conftest.$ac_ext <<_ACEOF
7173/* end confdefs.h. */
7174$ac_includes_default
7175int
7176main ()
7177{
7178static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7179test_array [0] = 0
7180
7181 ;
7182 return 0;
7183}
7184_ACEOF
7185rm -f conftest.$ac_objext
7186if { (ac_try="$ac_compile"
7187case "(($ac_try" in
7188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7189 *) ac_try_echo=$ac_try;;
7190esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007192 (eval "$ac_compile") 2>conftest.er1
7193 ac_status=$?
7194 grep -v '^ *+' conftest.er1 >conftest.err
7195 rm -f conftest.er1
7196 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007198 (exit $ac_status); } && {
7199 test -z "$ac_c_werror_flag" ||
7200 test ! -s conftest.err
7201 } && test -s conftest.$ac_objext; then
7202 case $ac_type in
7203 uint64_t) ac_cv_c_uint64_t=yes ;;
7204 *) ac_cv_c_uint64_t=$ac_type ;;
7205esac
7206
7207else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007208 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007209sed 's/^/| /' conftest.$ac_ext >&5
7210
7211
7212fi
7213
7214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7215 test "$ac_cv_c_uint64_t" != no && break
7216 done
7217fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007218{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7219echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007220 case $ac_cv_c_uint64_t in #(
7221 no|yes) ;; #(
7222 *)
7223
7224cat >>confdefs.h <<\_ACEOF
7225#define _UINT64_T 1
7226_ACEOF
7227
7228
7229cat >>confdefs.h <<_ACEOF
7230#define uint64_t $ac_cv_c_uint64_t
7231_ACEOF
7232;;
7233 esac
7234
7235
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007236 { echo "$as_me:$LINENO: checking for int32_t" >&5
7237echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007238if test "${ac_cv_c_int32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007239 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007240else
7241 ac_cv_c_int32_t=no
7242 for ac_type in 'int32_t' 'int' 'long int' \
7243 'long long int' 'short int' 'signed char'; do
7244 cat >conftest.$ac_ext <<_ACEOF
7245/* confdefs.h. */
7246_ACEOF
7247cat confdefs.h >>conftest.$ac_ext
7248cat >>conftest.$ac_ext <<_ACEOF
7249/* end confdefs.h. */
7250$ac_includes_default
7251int
7252main ()
7253{
7254static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7255test_array [0] = 0
7256
7257 ;
7258 return 0;
7259}
7260_ACEOF
7261rm -f conftest.$ac_objext
7262if { (ac_try="$ac_compile"
7263case "(($ac_try" in
7264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7265 *) ac_try_echo=$ac_try;;
7266esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007268 (eval "$ac_compile") 2>conftest.er1
7269 ac_status=$?
7270 grep -v '^ *+' conftest.er1 >conftest.err
7271 rm -f conftest.er1
7272 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007274 (exit $ac_status); } && {
7275 test -z "$ac_c_werror_flag" ||
7276 test ! -s conftest.err
7277 } && test -s conftest.$ac_objext; then
7278 cat >conftest.$ac_ext <<_ACEOF
7279/* confdefs.h. */
7280_ACEOF
7281cat confdefs.h >>conftest.$ac_ext
7282cat >>conftest.$ac_ext <<_ACEOF
7283/* end confdefs.h. */
7284$ac_includes_default
7285int
7286main ()
7287{
7288static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007289 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007290test_array [0] = 0
7291
7292 ;
7293 return 0;
7294}
7295_ACEOF
7296rm -f conftest.$ac_objext
7297if { (ac_try="$ac_compile"
7298case "(($ac_try" in
7299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7300 *) ac_try_echo=$ac_try;;
7301esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007303 (eval "$ac_compile") 2>conftest.er1
7304 ac_status=$?
7305 grep -v '^ *+' conftest.er1 >conftest.err
7306 rm -f conftest.er1
7307 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007309 (exit $ac_status); } && {
7310 test -z "$ac_c_werror_flag" ||
7311 test ! -s conftest.err
7312 } && test -s conftest.$ac_objext; then
7313 :
7314else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007315 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007316sed 's/^/| /' conftest.$ac_ext >&5
7317
7318 case $ac_type in
7319 int32_t) ac_cv_c_int32_t=yes ;;
7320 *) ac_cv_c_int32_t=$ac_type ;;
7321esac
7322
7323fi
7324
7325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7326else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007327 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007328sed 's/^/| /' conftest.$ac_ext >&5
7329
7330
7331fi
7332
7333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7334 test "$ac_cv_c_int32_t" != no && break
7335 done
7336fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007337{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7338echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007339 case $ac_cv_c_int32_t in #(
7340 no|yes) ;; #(
7341 *)
7342
7343cat >>confdefs.h <<_ACEOF
7344#define int32_t $ac_cv_c_int32_t
7345_ACEOF
7346;;
7347 esac
7348
7349
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007350 { echo "$as_me:$LINENO: checking for int64_t" >&5
7351echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007352if test "${ac_cv_c_int64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007353 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007354else
7355 ac_cv_c_int64_t=no
7356 for ac_type in 'int64_t' 'int' 'long int' \
7357 'long long int' 'short int' 'signed char'; do
7358 cat >conftest.$ac_ext <<_ACEOF
7359/* confdefs.h. */
7360_ACEOF
7361cat confdefs.h >>conftest.$ac_ext
7362cat >>conftest.$ac_ext <<_ACEOF
7363/* end confdefs.h. */
7364$ac_includes_default
7365int
7366main ()
7367{
7368static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7369test_array [0] = 0
7370
7371 ;
7372 return 0;
7373}
7374_ACEOF
7375rm -f conftest.$ac_objext
7376if { (ac_try="$ac_compile"
7377case "(($ac_try" in
7378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7379 *) ac_try_echo=$ac_try;;
7380esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007382 (eval "$ac_compile") 2>conftest.er1
7383 ac_status=$?
7384 grep -v '^ *+' conftest.er1 >conftest.err
7385 rm -f conftest.er1
7386 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007388 (exit $ac_status); } && {
7389 test -z "$ac_c_werror_flag" ||
7390 test ! -s conftest.err
7391 } && test -s conftest.$ac_objext; then
7392 cat >conftest.$ac_ext <<_ACEOF
7393/* confdefs.h. */
7394_ACEOF
7395cat confdefs.h >>conftest.$ac_ext
7396cat >>conftest.$ac_ext <<_ACEOF
7397/* end confdefs.h. */
7398$ac_includes_default
7399int
7400main ()
7401{
7402static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007403 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007404test_array [0] = 0
7405
7406 ;
7407 return 0;
7408}
7409_ACEOF
7410rm -f conftest.$ac_objext
7411if { (ac_try="$ac_compile"
7412case "(($ac_try" in
7413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7414 *) ac_try_echo=$ac_try;;
7415esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007417 (eval "$ac_compile") 2>conftest.er1
7418 ac_status=$?
7419 grep -v '^ *+' conftest.er1 >conftest.err
7420 rm -f conftest.er1
7421 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007423 (exit $ac_status); } && {
7424 test -z "$ac_c_werror_flag" ||
7425 test ! -s conftest.err
7426 } && test -s conftest.$ac_objext; then
7427 :
7428else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007429 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007430sed 's/^/| /' conftest.$ac_ext >&5
7431
7432 case $ac_type in
7433 int64_t) ac_cv_c_int64_t=yes ;;
7434 *) ac_cv_c_int64_t=$ac_type ;;
7435esac
7436
7437fi
7438
7439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7440else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007441 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007442sed 's/^/| /' conftest.$ac_ext >&5
7443
7444
7445fi
7446
7447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7448 test "$ac_cv_c_int64_t" != no && break
7449 done
7450fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007451{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7452echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007453 case $ac_cv_c_int64_t in #(
7454 no|yes) ;; #(
7455 *)
7456
7457cat >>confdefs.h <<_ACEOF
7458#define int64_t $ac_cv_c_int64_t
7459_ACEOF
7460;;
7461 esac
7462
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007463{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7464echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007465if test "${ac_cv_type_ssize_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007466 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007467else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007468 cat >conftest.$ac_ext <<_ACEOF
7469/* confdefs.h. */
7470_ACEOF
7471cat confdefs.h >>conftest.$ac_ext
7472cat >>conftest.$ac_ext <<_ACEOF
7473/* end confdefs.h. */
7474$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007475typedef ssize_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007476int
7477main ()
7478{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007479if ((ac__type_new_ *) 0)
7480 return 0;
7481if (sizeof (ac__type_new_))
7482 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007483 ;
7484 return 0;
7485}
7486_ACEOF
7487rm -f conftest.$ac_objext
7488if { (ac_try="$ac_compile"
7489case "(($ac_try" in
7490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7491 *) ac_try_echo=$ac_try;;
7492esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007494 (eval "$ac_compile") 2>conftest.er1
7495 ac_status=$?
7496 grep -v '^ *+' conftest.er1 >conftest.err
7497 rm -f conftest.er1
7498 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007500 (exit $ac_status); } && {
7501 test -z "$ac_c_werror_flag" ||
7502 test ! -s conftest.err
7503 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007504 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007505else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007506 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007507sed 's/^/| /' conftest.$ac_ext >&5
7508
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007509 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007510fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007511
7512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007513fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007514{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7515echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7516if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007517
7518cat >>confdefs.h <<\_ACEOF
7519#define HAVE_SSIZE_T 1
7520_ACEOF
7521
7522fi
7523
Jack Jansendd19cf82001-12-06 22:36:17 +00007524
Michael W. Hudson54241132001-12-07 15:38:26 +00007525# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007526# ANSI C requires sizeof(char) == 1, so no need to check it
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007527{ echo "$as_me:$LINENO: checking for int" >&5
7528echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7529if test "${ac_cv_type_int+set}" = set; then
7530 echo $ECHO_N "(cached) $ECHO_C" >&6
7531else
7532 cat >conftest.$ac_ext <<_ACEOF
7533/* confdefs.h. */
7534_ACEOF
7535cat confdefs.h >>conftest.$ac_ext
7536cat >>conftest.$ac_ext <<_ACEOF
7537/* end confdefs.h. */
7538$ac_includes_default
7539typedef int ac__type_new_;
7540int
7541main ()
7542{
7543if ((ac__type_new_ *) 0)
7544 return 0;
7545if (sizeof (ac__type_new_))
7546 return 0;
7547 ;
7548 return 0;
7549}
7550_ACEOF
7551rm -f conftest.$ac_objext
7552if { (ac_try="$ac_compile"
7553case "(($ac_try" in
7554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7555 *) ac_try_echo=$ac_try;;
7556esac
7557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7558 (eval "$ac_compile") 2>conftest.er1
7559 ac_status=$?
7560 grep -v '^ *+' conftest.er1 >conftest.err
7561 rm -f conftest.er1
7562 cat conftest.err >&5
7563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7564 (exit $ac_status); } && {
7565 test -z "$ac_c_werror_flag" ||
7566 test ! -s conftest.err
7567 } && test -s conftest.$ac_objext; then
7568 ac_cv_type_int=yes
7569else
7570 echo "$as_me: failed program was:" >&5
7571sed 's/^/| /' conftest.$ac_ext >&5
7572
7573 ac_cv_type_int=no
7574fi
7575
7576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7577fi
7578{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7579echo "${ECHO_T}$ac_cv_type_int" >&6; }
7580
Martin v. Löwiseba40652007-08-30 20:10:57 +00007581# The cast to long int works around a bug in the HP C Compiler
7582# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7583# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7584# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007585{ echo "$as_me:$LINENO: checking size of int" >&5
7586echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007587if test "${ac_cv_sizeof_int+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007588 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007589else
Martin v. Löwis11437992002-04-12 09:54:03 +00007590 if test "$cross_compiling" = yes; then
7591 # Depending upon the size, compute the lo and hi bounds.
7592cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007593/* confdefs.h. */
7594_ACEOF
7595cat confdefs.h >>conftest.$ac_ext
7596cat >>conftest.$ac_ext <<_ACEOF
7597/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007598$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007599 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007600int
7601main ()
7602{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007603static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007604test_array [0] = 0
7605
7606 ;
7607 return 0;
7608}
7609_ACEOF
7610rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007611if { (ac_try="$ac_compile"
7612case "(($ac_try" in
7613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7614 *) ac_try_echo=$ac_try;;
7615esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007617 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007618 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007619 grep -v '^ *+' conftest.er1 >conftest.err
7620 rm -f conftest.er1
7621 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007623 (exit $ac_status); } && {
7624 test -z "$ac_c_werror_flag" ||
7625 test ! -s conftest.err
7626 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007627 ac_lo=0 ac_mid=0
7628 while :; do
7629 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007630/* confdefs.h. */
7631_ACEOF
7632cat confdefs.h >>conftest.$ac_ext
7633cat >>conftest.$ac_ext <<_ACEOF
7634/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007635$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007636 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007637int
7638main ()
7639{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007640static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007641test_array [0] = 0
7642
7643 ;
7644 return 0;
7645}
7646_ACEOF
7647rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007648if { (ac_try="$ac_compile"
7649case "(($ac_try" in
7650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7651 *) ac_try_echo=$ac_try;;
7652esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007654 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007655 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007656 grep -v '^ *+' conftest.er1 >conftest.err
7657 rm -f conftest.er1
7658 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007660 (exit $ac_status); } && {
7661 test -z "$ac_c_werror_flag" ||
7662 test ! -s conftest.err
7663 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007664 ac_hi=$ac_mid; break
7665else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007666 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007667sed 's/^/| /' conftest.$ac_ext >&5
7668
Martin v. Löwiseba40652007-08-30 20:10:57 +00007669 ac_lo=`expr $ac_mid + 1`
7670 if test $ac_lo -le $ac_mid; then
7671 ac_lo= ac_hi=
7672 break
7673 fi
7674 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007675fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007676
7677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007678 done
7679else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007680 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007681sed 's/^/| /' conftest.$ac_ext >&5
7682
Martin v. Löwiseba40652007-08-30 20:10:57 +00007683 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007684/* confdefs.h. */
7685_ACEOF
7686cat confdefs.h >>conftest.$ac_ext
7687cat >>conftest.$ac_ext <<_ACEOF
7688/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007689$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007690 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007691int
7692main ()
7693{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007694static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007695test_array [0] = 0
7696
7697 ;
7698 return 0;
7699}
7700_ACEOF
7701rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007702if { (ac_try="$ac_compile"
7703case "(($ac_try" in
7704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7705 *) ac_try_echo=$ac_try;;
7706esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007708 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007709 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007710 grep -v '^ *+' conftest.er1 >conftest.err
7711 rm -f conftest.er1
7712 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007714 (exit $ac_status); } && {
7715 test -z "$ac_c_werror_flag" ||
7716 test ! -s conftest.err
7717 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007718 ac_hi=-1 ac_mid=-1
7719 while :; do
7720 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007721/* confdefs.h. */
7722_ACEOF
7723cat confdefs.h >>conftest.$ac_ext
7724cat >>conftest.$ac_ext <<_ACEOF
7725/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007726$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007727 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007728int
7729main ()
7730{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007731static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007732test_array [0] = 0
7733
7734 ;
7735 return 0;
7736}
7737_ACEOF
7738rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007739if { (ac_try="$ac_compile"
7740case "(($ac_try" in
7741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7742 *) ac_try_echo=$ac_try;;
7743esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007745 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007746 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007747 grep -v '^ *+' conftest.er1 >conftest.err
7748 rm -f conftest.er1
7749 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007751 (exit $ac_status); } && {
7752 test -z "$ac_c_werror_flag" ||
7753 test ! -s conftest.err
7754 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007755 ac_lo=$ac_mid; break
7756else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007757 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007758sed 's/^/| /' conftest.$ac_ext >&5
7759
Martin v. Löwiseba40652007-08-30 20:10:57 +00007760 ac_hi=`expr '(' $ac_mid ')' - 1`
7761 if test $ac_mid -le $ac_hi; then
7762 ac_lo= ac_hi=
7763 break
7764 fi
7765 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007766fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007767
7768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007769 done
7770else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007771 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007772sed 's/^/| /' conftest.$ac_ext >&5
7773
Martin v. Löwiseba40652007-08-30 20:10:57 +00007774 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007775fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007776
7777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007778fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007779
7780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007781# Binary search between lo and hi bounds.
7782while test "x$ac_lo" != "x$ac_hi"; do
7783 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7784 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007785/* confdefs.h. */
7786_ACEOF
7787cat confdefs.h >>conftest.$ac_ext
7788cat >>conftest.$ac_ext <<_ACEOF
7789/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007790$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007791 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007792int
7793main ()
7794{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007795static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007796test_array [0] = 0
7797
7798 ;
7799 return 0;
7800}
7801_ACEOF
7802rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007803if { (ac_try="$ac_compile"
7804case "(($ac_try" in
7805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7806 *) ac_try_echo=$ac_try;;
7807esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007809 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007810 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007811 grep -v '^ *+' conftest.er1 >conftest.err
7812 rm -f conftest.er1
7813 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007815 (exit $ac_status); } && {
7816 test -z "$ac_c_werror_flag" ||
7817 test ! -s conftest.err
7818 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007819 ac_hi=$ac_mid
7820else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007821 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007822sed 's/^/| /' conftest.$ac_ext >&5
7823
Martin v. Löwiseba40652007-08-30 20:10:57 +00007824 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007825fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007826
7827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007828done
7829case $ac_lo in
7830?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007831'') if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007832 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007833See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007834echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007835See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007836 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007837 else
7838 ac_cv_sizeof_int=0
7839 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007840esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007841else
Martin v. Löwis11437992002-04-12 09:54:03 +00007842 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007843/* confdefs.h. */
7844_ACEOF
7845cat confdefs.h >>conftest.$ac_ext
7846cat >>conftest.$ac_ext <<_ACEOF
7847/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007848$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007849 typedef int ac__type_sizeof_;
7850static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7851static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007852#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007853#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007854int
7855main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007856{
Martin v. Löwis11437992002-04-12 09:54:03 +00007857
7858 FILE *f = fopen ("conftest.val", "w");
7859 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007860 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007861 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007862 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007863 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007864 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007865 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007866 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007867 }
7868 else
7869 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007870 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007871 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007872 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007873 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007874 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007875 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007876
7877 ;
7878 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007879}
Martin v. Löwis11437992002-04-12 09:54:03 +00007880_ACEOF
7881rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007882if { (ac_try="$ac_link"
7883case "(($ac_try" in
7884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7885 *) ac_try_echo=$ac_try;;
7886esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007888 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007889 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007891 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007892 { (case "(($ac_try" in
7893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7894 *) ac_try_echo=$ac_try;;
7895esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007897 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007898 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007900 (exit $ac_status); }; }; then
7901 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007902else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007903 echo "$as_me: program exited with status $ac_status" >&5
7904echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007905sed 's/^/| /' conftest.$ac_ext >&5
7906
Martin v. Löwis11437992002-04-12 09:54:03 +00007907( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007908if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007909 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007910See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007911echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007912See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007913 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007914 else
7915 ac_cv_sizeof_int=0
7916 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007917fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007918rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007919fi
7920rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007921fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007922{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7923echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007924
7925
7926
Martin v. Löwis11437992002-04-12 09:54:03 +00007927cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007928#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007929_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007930
7931
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007932{ echo "$as_me:$LINENO: checking for long" >&5
7933echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7934if test "${ac_cv_type_long+set}" = set; then
7935 echo $ECHO_N "(cached) $ECHO_C" >&6
7936else
7937 cat >conftest.$ac_ext <<_ACEOF
7938/* confdefs.h. */
7939_ACEOF
7940cat confdefs.h >>conftest.$ac_ext
7941cat >>conftest.$ac_ext <<_ACEOF
7942/* end confdefs.h. */
7943$ac_includes_default
7944typedef long ac__type_new_;
7945int
7946main ()
7947{
7948if ((ac__type_new_ *) 0)
7949 return 0;
7950if (sizeof (ac__type_new_))
7951 return 0;
7952 ;
7953 return 0;
7954}
7955_ACEOF
7956rm -f conftest.$ac_objext
7957if { (ac_try="$ac_compile"
7958case "(($ac_try" in
7959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7960 *) ac_try_echo=$ac_try;;
7961esac
7962eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7963 (eval "$ac_compile") 2>conftest.er1
7964 ac_status=$?
7965 grep -v '^ *+' conftest.er1 >conftest.err
7966 rm -f conftest.er1
7967 cat conftest.err >&5
7968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7969 (exit $ac_status); } && {
7970 test -z "$ac_c_werror_flag" ||
7971 test ! -s conftest.err
7972 } && test -s conftest.$ac_objext; then
7973 ac_cv_type_long=yes
7974else
7975 echo "$as_me: failed program was:" >&5
7976sed 's/^/| /' conftest.$ac_ext >&5
7977
7978 ac_cv_type_long=no
7979fi
7980
7981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7982fi
7983{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7984echo "${ECHO_T}$ac_cv_type_long" >&6; }
7985
Martin v. Löwiseba40652007-08-30 20:10:57 +00007986# The cast to long int works around a bug in the HP C Compiler
7987# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7988# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7989# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007990{ echo "$as_me:$LINENO: checking size of long" >&5
7991echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007992if test "${ac_cv_sizeof_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007993 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007994else
Martin v. Löwis11437992002-04-12 09:54:03 +00007995 if test "$cross_compiling" = yes; then
7996 # Depending upon the size, compute the lo and hi bounds.
7997cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007998/* confdefs.h. */
7999_ACEOF
8000cat confdefs.h >>conftest.$ac_ext
8001cat >>conftest.$ac_ext <<_ACEOF
8002/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008003$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008004 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008005int
8006main ()
8007{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008008static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008009test_array [0] = 0
8010
8011 ;
8012 return 0;
8013}
8014_ACEOF
8015rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008016if { (ac_try="$ac_compile"
8017case "(($ac_try" in
8018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8019 *) ac_try_echo=$ac_try;;
8020esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008022 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008023 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008024 grep -v '^ *+' conftest.er1 >conftest.err
8025 rm -f conftest.er1
8026 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008028 (exit $ac_status); } && {
8029 test -z "$ac_c_werror_flag" ||
8030 test ! -s conftest.err
8031 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008032 ac_lo=0 ac_mid=0
8033 while :; do
8034 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008035/* confdefs.h. */
8036_ACEOF
8037cat confdefs.h >>conftest.$ac_ext
8038cat >>conftest.$ac_ext <<_ACEOF
8039/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008040$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008041 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008042int
8043main ()
8044{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008045static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008046test_array [0] = 0
8047
8048 ;
8049 return 0;
8050}
8051_ACEOF
8052rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008053if { (ac_try="$ac_compile"
8054case "(($ac_try" in
8055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8056 *) ac_try_echo=$ac_try;;
8057esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008059 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008060 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008061 grep -v '^ *+' conftest.er1 >conftest.err
8062 rm -f conftest.er1
8063 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008065 (exit $ac_status); } && {
8066 test -z "$ac_c_werror_flag" ||
8067 test ! -s conftest.err
8068 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008069 ac_hi=$ac_mid; break
8070else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008071 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008072sed 's/^/| /' conftest.$ac_ext >&5
8073
Martin v. Löwiseba40652007-08-30 20:10:57 +00008074 ac_lo=`expr $ac_mid + 1`
8075 if test $ac_lo -le $ac_mid; then
8076 ac_lo= ac_hi=
8077 break
8078 fi
8079 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008080fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008081
8082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008083 done
8084else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008085 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008086sed 's/^/| /' conftest.$ac_ext >&5
8087
Martin v. Löwiseba40652007-08-30 20:10:57 +00008088 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008089/* confdefs.h. */
8090_ACEOF
8091cat confdefs.h >>conftest.$ac_ext
8092cat >>conftest.$ac_ext <<_ACEOF
8093/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008094$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008095 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008096int
8097main ()
8098{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008099static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008100test_array [0] = 0
8101
8102 ;
8103 return 0;
8104}
8105_ACEOF
8106rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008107if { (ac_try="$ac_compile"
8108case "(($ac_try" in
8109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8110 *) ac_try_echo=$ac_try;;
8111esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008113 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008114 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008115 grep -v '^ *+' conftest.er1 >conftest.err
8116 rm -f conftest.er1
8117 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008119 (exit $ac_status); } && {
8120 test -z "$ac_c_werror_flag" ||
8121 test ! -s conftest.err
8122 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008123 ac_hi=-1 ac_mid=-1
8124 while :; do
8125 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008126/* confdefs.h. */
8127_ACEOF
8128cat confdefs.h >>conftest.$ac_ext
8129cat >>conftest.$ac_ext <<_ACEOF
8130/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008131$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008132 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008133int
8134main ()
8135{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008136static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008137test_array [0] = 0
8138
8139 ;
8140 return 0;
8141}
8142_ACEOF
8143rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008144if { (ac_try="$ac_compile"
8145case "(($ac_try" in
8146 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8147 *) ac_try_echo=$ac_try;;
8148esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008149eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008150 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008151 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008152 grep -v '^ *+' conftest.er1 >conftest.err
8153 rm -f conftest.er1
8154 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008156 (exit $ac_status); } && {
8157 test -z "$ac_c_werror_flag" ||
8158 test ! -s conftest.err
8159 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008160 ac_lo=$ac_mid; break
8161else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008162 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008163sed 's/^/| /' conftest.$ac_ext >&5
8164
Martin v. Löwiseba40652007-08-30 20:10:57 +00008165 ac_hi=`expr '(' $ac_mid ')' - 1`
8166 if test $ac_mid -le $ac_hi; then
8167 ac_lo= ac_hi=
8168 break
8169 fi
8170 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008171fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008172
8173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008174 done
8175else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008176 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008177sed 's/^/| /' conftest.$ac_ext >&5
8178
Martin v. Löwiseba40652007-08-30 20:10:57 +00008179 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008180fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008181
8182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008183fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008184
8185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008186# Binary search between lo and hi bounds.
8187while test "x$ac_lo" != "x$ac_hi"; do
8188 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8189 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008190/* confdefs.h. */
8191_ACEOF
8192cat confdefs.h >>conftest.$ac_ext
8193cat >>conftest.$ac_ext <<_ACEOF
8194/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008195$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008196 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008197int
8198main ()
8199{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008200static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008201test_array [0] = 0
8202
8203 ;
8204 return 0;
8205}
8206_ACEOF
8207rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008208if { (ac_try="$ac_compile"
8209case "(($ac_try" in
8210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8211 *) ac_try_echo=$ac_try;;
8212esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008214 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008215 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008216 grep -v '^ *+' conftest.er1 >conftest.err
8217 rm -f conftest.er1
8218 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008220 (exit $ac_status); } && {
8221 test -z "$ac_c_werror_flag" ||
8222 test ! -s conftest.err
8223 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008224 ac_hi=$ac_mid
8225else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008226 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008227sed 's/^/| /' conftest.$ac_ext >&5
8228
Martin v. Löwiseba40652007-08-30 20:10:57 +00008229 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008230fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008231
8232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008233done
8234case $ac_lo in
8235?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008236'') if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008237 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008238See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008239echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008240See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008241 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008242 else
8243 ac_cv_sizeof_long=0
8244 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008245esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008246else
Martin v. Löwis11437992002-04-12 09:54:03 +00008247 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008248/* confdefs.h. */
8249_ACEOF
8250cat confdefs.h >>conftest.$ac_ext
8251cat >>conftest.$ac_ext <<_ACEOF
8252/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008253$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008254 typedef long ac__type_sizeof_;
8255static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8256static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008257#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008258#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008259int
8260main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008261{
Martin v. Löwis11437992002-04-12 09:54:03 +00008262
8263 FILE *f = fopen ("conftest.val", "w");
8264 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008265 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008266 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008267 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008268 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008269 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008270 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008271 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008272 }
8273 else
8274 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008275 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008276 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008277 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008278 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008279 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008280 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008281
8282 ;
8283 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008284}
Martin v. Löwis11437992002-04-12 09:54:03 +00008285_ACEOF
8286rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008287if { (ac_try="$ac_link"
8288case "(($ac_try" in
8289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8290 *) ac_try_echo=$ac_try;;
8291esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008293 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008294 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008296 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008297 { (case "(($ac_try" in
8298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8299 *) ac_try_echo=$ac_try;;
8300esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008302 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008303 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008305 (exit $ac_status); }; }; then
8306 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008307else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008308 echo "$as_me: program exited with status $ac_status" >&5
8309echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008310sed 's/^/| /' conftest.$ac_ext >&5
8311
Martin v. Löwis11437992002-04-12 09:54:03 +00008312( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008313if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008314 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008315See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008316echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008317See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008318 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008319 else
8320 ac_cv_sizeof_long=0
8321 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008322fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008323rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008324fi
8325rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008326fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008327{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8328echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008329
8330
8331
Martin v. Löwis11437992002-04-12 09:54:03 +00008332cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008333#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008334_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008335
8336
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008337{ echo "$as_me:$LINENO: checking for void *" >&5
8338echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8339if test "${ac_cv_type_void_p+set}" = set; then
8340 echo $ECHO_N "(cached) $ECHO_C" >&6
8341else
8342 cat >conftest.$ac_ext <<_ACEOF
8343/* confdefs.h. */
8344_ACEOF
8345cat confdefs.h >>conftest.$ac_ext
8346cat >>conftest.$ac_ext <<_ACEOF
8347/* end confdefs.h. */
8348$ac_includes_default
8349typedef void * ac__type_new_;
8350int
8351main ()
8352{
8353if ((ac__type_new_ *) 0)
8354 return 0;
8355if (sizeof (ac__type_new_))
8356 return 0;
8357 ;
8358 return 0;
8359}
8360_ACEOF
8361rm -f conftest.$ac_objext
8362if { (ac_try="$ac_compile"
8363case "(($ac_try" in
8364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8365 *) ac_try_echo=$ac_try;;
8366esac
8367eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8368 (eval "$ac_compile") 2>conftest.er1
8369 ac_status=$?
8370 grep -v '^ *+' conftest.er1 >conftest.err
8371 rm -f conftest.er1
8372 cat conftest.err >&5
8373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8374 (exit $ac_status); } && {
8375 test -z "$ac_c_werror_flag" ||
8376 test ! -s conftest.err
8377 } && test -s conftest.$ac_objext; then
8378 ac_cv_type_void_p=yes
8379else
8380 echo "$as_me: failed program was:" >&5
8381sed 's/^/| /' conftest.$ac_ext >&5
8382
8383 ac_cv_type_void_p=no
8384fi
8385
8386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8387fi
8388{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8389echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8390
Martin v. Löwiseba40652007-08-30 20:10:57 +00008391# The cast to long int works around a bug in the HP C Compiler
8392# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8393# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8394# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008395{ echo "$as_me:$LINENO: checking size of void *" >&5
8396echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008397if test "${ac_cv_sizeof_void_p+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008398 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008399else
Martin v. Löwis11437992002-04-12 09:54:03 +00008400 if test "$cross_compiling" = yes; then
8401 # Depending upon the size, compute the lo and hi bounds.
8402cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008403/* confdefs.h. */
8404_ACEOF
8405cat confdefs.h >>conftest.$ac_ext
8406cat >>conftest.$ac_ext <<_ACEOF
8407/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008408$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008409 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008410int
8411main ()
8412{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008413static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008414test_array [0] = 0
8415
8416 ;
8417 return 0;
8418}
8419_ACEOF
8420rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008421if { (ac_try="$ac_compile"
8422case "(($ac_try" in
8423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8424 *) ac_try_echo=$ac_try;;
8425esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008427 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008428 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008429 grep -v '^ *+' conftest.er1 >conftest.err
8430 rm -f conftest.er1
8431 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008433 (exit $ac_status); } && {
8434 test -z "$ac_c_werror_flag" ||
8435 test ! -s conftest.err
8436 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008437 ac_lo=0 ac_mid=0
8438 while :; do
8439 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008440/* confdefs.h. */
8441_ACEOF
8442cat confdefs.h >>conftest.$ac_ext
8443cat >>conftest.$ac_ext <<_ACEOF
8444/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008445$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008446 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008447int
8448main ()
8449{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008450static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008451test_array [0] = 0
8452
8453 ;
8454 return 0;
8455}
8456_ACEOF
8457rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008458if { (ac_try="$ac_compile"
8459case "(($ac_try" in
8460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8461 *) ac_try_echo=$ac_try;;
8462esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008464 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008465 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008466 grep -v '^ *+' conftest.er1 >conftest.err
8467 rm -f conftest.er1
8468 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008470 (exit $ac_status); } && {
8471 test -z "$ac_c_werror_flag" ||
8472 test ! -s conftest.err
8473 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008474 ac_hi=$ac_mid; break
8475else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008476 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008477sed 's/^/| /' conftest.$ac_ext >&5
8478
Martin v. Löwiseba40652007-08-30 20:10:57 +00008479 ac_lo=`expr $ac_mid + 1`
8480 if test $ac_lo -le $ac_mid; then
8481 ac_lo= ac_hi=
8482 break
8483 fi
8484 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008485fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008486
8487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008488 done
8489else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008490 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008491sed 's/^/| /' conftest.$ac_ext >&5
8492
Martin v. Löwiseba40652007-08-30 20:10:57 +00008493 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008494/* confdefs.h. */
8495_ACEOF
8496cat confdefs.h >>conftest.$ac_ext
8497cat >>conftest.$ac_ext <<_ACEOF
8498/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008499$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008500 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008501int
8502main ()
8503{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008504static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008505test_array [0] = 0
8506
8507 ;
8508 return 0;
8509}
8510_ACEOF
8511rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008512if { (ac_try="$ac_compile"
8513case "(($ac_try" in
8514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8515 *) ac_try_echo=$ac_try;;
8516esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008518 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008519 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008520 grep -v '^ *+' conftest.er1 >conftest.err
8521 rm -f conftest.er1
8522 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008524 (exit $ac_status); } && {
8525 test -z "$ac_c_werror_flag" ||
8526 test ! -s conftest.err
8527 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008528 ac_hi=-1 ac_mid=-1
8529 while :; do
8530 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008531/* confdefs.h. */
8532_ACEOF
8533cat confdefs.h >>conftest.$ac_ext
8534cat >>conftest.$ac_ext <<_ACEOF
8535/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008536$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008537 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008538int
8539main ()
8540{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008541static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008542test_array [0] = 0
8543
8544 ;
8545 return 0;
8546}
8547_ACEOF
8548rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008549if { (ac_try="$ac_compile"
8550case "(($ac_try" in
8551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8552 *) ac_try_echo=$ac_try;;
8553esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008555 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008556 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008557 grep -v '^ *+' conftest.er1 >conftest.err
8558 rm -f conftest.er1
8559 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008561 (exit $ac_status); } && {
8562 test -z "$ac_c_werror_flag" ||
8563 test ! -s conftest.err
8564 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008565 ac_lo=$ac_mid; break
8566else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008567 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008568sed 's/^/| /' conftest.$ac_ext >&5
8569
Martin v. Löwiseba40652007-08-30 20:10:57 +00008570 ac_hi=`expr '(' $ac_mid ')' - 1`
8571 if test $ac_mid -le $ac_hi; then
8572 ac_lo= ac_hi=
8573 break
8574 fi
8575 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008576fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008577
8578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008579 done
8580else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008581 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008582sed 's/^/| /' conftest.$ac_ext >&5
8583
Martin v. Löwiseba40652007-08-30 20:10:57 +00008584 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008585fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008586
8587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008588fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008589
8590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008591# Binary search between lo and hi bounds.
8592while test "x$ac_lo" != "x$ac_hi"; do
8593 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8594 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008595/* confdefs.h. */
8596_ACEOF
8597cat confdefs.h >>conftest.$ac_ext
8598cat >>conftest.$ac_ext <<_ACEOF
8599/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008600$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008601 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008602int
8603main ()
8604{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008605static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008606test_array [0] = 0
8607
8608 ;
8609 return 0;
8610}
8611_ACEOF
8612rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008613if { (ac_try="$ac_compile"
8614case "(($ac_try" in
8615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8616 *) ac_try_echo=$ac_try;;
8617esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008619 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008620 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008621 grep -v '^ *+' conftest.er1 >conftest.err
8622 rm -f conftest.er1
8623 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008625 (exit $ac_status); } && {
8626 test -z "$ac_c_werror_flag" ||
8627 test ! -s conftest.err
8628 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008629 ac_hi=$ac_mid
8630else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008631 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008632sed 's/^/| /' conftest.$ac_ext >&5
8633
Martin v. Löwiseba40652007-08-30 20:10:57 +00008634 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008635fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008636
8637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008638done
8639case $ac_lo in
8640?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008641'') if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008642 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008643See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008644echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008645See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008646 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008647 else
8648 ac_cv_sizeof_void_p=0
8649 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008650esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008651else
Martin v. Löwis11437992002-04-12 09:54:03 +00008652 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008653/* confdefs.h. */
8654_ACEOF
8655cat confdefs.h >>conftest.$ac_ext
8656cat >>conftest.$ac_ext <<_ACEOF
8657/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008658$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008659 typedef void * ac__type_sizeof_;
8660static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8661static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008662#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008663#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008664int
8665main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008666{
Martin v. Löwis11437992002-04-12 09:54:03 +00008667
8668 FILE *f = fopen ("conftest.val", "w");
8669 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008670 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008671 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008672 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008673 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008674 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008675 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008676 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008677 }
8678 else
8679 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008680 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008681 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008682 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008683 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008684 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008685 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008686
8687 ;
8688 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008689}
Martin v. Löwis11437992002-04-12 09:54:03 +00008690_ACEOF
8691rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008692if { (ac_try="$ac_link"
8693case "(($ac_try" in
8694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8695 *) ac_try_echo=$ac_try;;
8696esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008698 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008699 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008701 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008702 { (case "(($ac_try" in
8703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8704 *) ac_try_echo=$ac_try;;
8705esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008707 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008708 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008710 (exit $ac_status); }; }; then
8711 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008712else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008713 echo "$as_me: program exited with status $ac_status" >&5
8714echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008715sed 's/^/| /' conftest.$ac_ext >&5
8716
Martin v. Löwis11437992002-04-12 09:54:03 +00008717( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008718if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008719 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008720See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008721echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008722See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008723 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008724 else
8725 ac_cv_sizeof_void_p=0
8726 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008727fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008728rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008729fi
8730rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008731fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008732{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8733echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008734
8735
8736
Martin v. Löwis11437992002-04-12 09:54:03 +00008737cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008738#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008739_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008740
8741
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008742{ echo "$as_me:$LINENO: checking for short" >&5
8743echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8744if test "${ac_cv_type_short+set}" = set; then
8745 echo $ECHO_N "(cached) $ECHO_C" >&6
8746else
8747 cat >conftest.$ac_ext <<_ACEOF
8748/* confdefs.h. */
8749_ACEOF
8750cat confdefs.h >>conftest.$ac_ext
8751cat >>conftest.$ac_ext <<_ACEOF
8752/* end confdefs.h. */
8753$ac_includes_default
8754typedef short ac__type_new_;
8755int
8756main ()
8757{
8758if ((ac__type_new_ *) 0)
8759 return 0;
8760if (sizeof (ac__type_new_))
8761 return 0;
8762 ;
8763 return 0;
8764}
8765_ACEOF
8766rm -f conftest.$ac_objext
8767if { (ac_try="$ac_compile"
8768case "(($ac_try" in
8769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8770 *) ac_try_echo=$ac_try;;
8771esac
8772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8773 (eval "$ac_compile") 2>conftest.er1
8774 ac_status=$?
8775 grep -v '^ *+' conftest.er1 >conftest.err
8776 rm -f conftest.er1
8777 cat conftest.err >&5
8778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8779 (exit $ac_status); } && {
8780 test -z "$ac_c_werror_flag" ||
8781 test ! -s conftest.err
8782 } && test -s conftest.$ac_objext; then
8783 ac_cv_type_short=yes
8784else
8785 echo "$as_me: failed program was:" >&5
8786sed 's/^/| /' conftest.$ac_ext >&5
8787
8788 ac_cv_type_short=no
8789fi
8790
8791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8792fi
8793{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8794echo "${ECHO_T}$ac_cv_type_short" >&6; }
8795
Martin v. Löwiseba40652007-08-30 20:10:57 +00008796# The cast to long int works around a bug in the HP C Compiler
8797# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8798# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8799# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008800{ echo "$as_me:$LINENO: checking size of short" >&5
8801echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008802if test "${ac_cv_sizeof_short+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008803 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008804else
Martin v. Löwis11437992002-04-12 09:54:03 +00008805 if test "$cross_compiling" = yes; then
8806 # Depending upon the size, compute the lo and hi bounds.
8807cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008808/* confdefs.h. */
8809_ACEOF
8810cat confdefs.h >>conftest.$ac_ext
8811cat >>conftest.$ac_ext <<_ACEOF
8812/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008813$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008814 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008815int
8816main ()
8817{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008818static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008819test_array [0] = 0
8820
8821 ;
8822 return 0;
8823}
8824_ACEOF
8825rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008826if { (ac_try="$ac_compile"
8827case "(($ac_try" in
8828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8829 *) ac_try_echo=$ac_try;;
8830esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008832 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008833 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008834 grep -v '^ *+' conftest.er1 >conftest.err
8835 rm -f conftest.er1
8836 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008838 (exit $ac_status); } && {
8839 test -z "$ac_c_werror_flag" ||
8840 test ! -s conftest.err
8841 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008842 ac_lo=0 ac_mid=0
8843 while :; do
8844 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008845/* confdefs.h. */
8846_ACEOF
8847cat confdefs.h >>conftest.$ac_ext
8848cat >>conftest.$ac_ext <<_ACEOF
8849/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008850$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008851 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008852int
8853main ()
8854{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008855static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008856test_array [0] = 0
8857
8858 ;
8859 return 0;
8860}
8861_ACEOF
8862rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008863if { (ac_try="$ac_compile"
8864case "(($ac_try" in
8865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8866 *) ac_try_echo=$ac_try;;
8867esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008869 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008870 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008871 grep -v '^ *+' conftest.er1 >conftest.err
8872 rm -f conftest.er1
8873 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008875 (exit $ac_status); } && {
8876 test -z "$ac_c_werror_flag" ||
8877 test ! -s conftest.err
8878 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008879 ac_hi=$ac_mid; break
8880else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008881 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008882sed 's/^/| /' conftest.$ac_ext >&5
8883
Martin v. Löwiseba40652007-08-30 20:10:57 +00008884 ac_lo=`expr $ac_mid + 1`
8885 if test $ac_lo -le $ac_mid; then
8886 ac_lo= ac_hi=
8887 break
8888 fi
8889 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008890fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008891
8892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008893 done
8894else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008895 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008896sed 's/^/| /' conftest.$ac_ext >&5
8897
Martin v. Löwiseba40652007-08-30 20:10:57 +00008898 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008899/* confdefs.h. */
8900_ACEOF
8901cat confdefs.h >>conftest.$ac_ext
8902cat >>conftest.$ac_ext <<_ACEOF
8903/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008904$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008905 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008906int
8907main ()
8908{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008909static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008910test_array [0] = 0
8911
8912 ;
8913 return 0;
8914}
8915_ACEOF
8916rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008917if { (ac_try="$ac_compile"
8918case "(($ac_try" in
8919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8920 *) ac_try_echo=$ac_try;;
8921esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008923 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008924 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008925 grep -v '^ *+' conftest.er1 >conftest.err
8926 rm -f conftest.er1
8927 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008929 (exit $ac_status); } && {
8930 test -z "$ac_c_werror_flag" ||
8931 test ! -s conftest.err
8932 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008933 ac_hi=-1 ac_mid=-1
8934 while :; do
8935 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008936/* confdefs.h. */
8937_ACEOF
8938cat confdefs.h >>conftest.$ac_ext
8939cat >>conftest.$ac_ext <<_ACEOF
8940/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008941$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008942 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008943int
8944main ()
8945{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008946static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008947test_array [0] = 0
8948
8949 ;
8950 return 0;
8951}
8952_ACEOF
8953rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008954if { (ac_try="$ac_compile"
8955case "(($ac_try" in
8956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8957 *) ac_try_echo=$ac_try;;
8958esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008960 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008961 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008962 grep -v '^ *+' conftest.er1 >conftest.err
8963 rm -f conftest.er1
8964 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008966 (exit $ac_status); } && {
8967 test -z "$ac_c_werror_flag" ||
8968 test ! -s conftest.err
8969 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008970 ac_lo=$ac_mid; break
8971else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008972 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008973sed 's/^/| /' conftest.$ac_ext >&5
8974
Martin v. Löwiseba40652007-08-30 20:10:57 +00008975 ac_hi=`expr '(' $ac_mid ')' - 1`
8976 if test $ac_mid -le $ac_hi; then
8977 ac_lo= ac_hi=
8978 break
8979 fi
8980 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008981fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008982
8983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008984 done
8985else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008986 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008987sed 's/^/| /' conftest.$ac_ext >&5
8988
Martin v. Löwiseba40652007-08-30 20:10:57 +00008989 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008990fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008991
8992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008993fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008994
8995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008996# Binary search between lo and hi bounds.
8997while test "x$ac_lo" != "x$ac_hi"; do
8998 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8999 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009000/* confdefs.h. */
9001_ACEOF
9002cat confdefs.h >>conftest.$ac_ext
9003cat >>conftest.$ac_ext <<_ACEOF
9004/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009005$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009006 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009007int
9008main ()
9009{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009010static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009011test_array [0] = 0
9012
9013 ;
9014 return 0;
9015}
9016_ACEOF
9017rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009018if { (ac_try="$ac_compile"
9019case "(($ac_try" in
9020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9021 *) ac_try_echo=$ac_try;;
9022esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009024 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009025 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009026 grep -v '^ *+' conftest.er1 >conftest.err
9027 rm -f conftest.er1
9028 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009030 (exit $ac_status); } && {
9031 test -z "$ac_c_werror_flag" ||
9032 test ! -s conftest.err
9033 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009034 ac_hi=$ac_mid
9035else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009036 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009037sed 's/^/| /' conftest.$ac_ext >&5
9038
Martin v. Löwiseba40652007-08-30 20:10:57 +00009039 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009040fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009041
9042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009043done
9044case $ac_lo in
9045?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009046'') if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009047 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009048See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009049echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009050See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009051 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009052 else
9053 ac_cv_sizeof_short=0
9054 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009055esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009056else
Martin v. Löwis11437992002-04-12 09:54:03 +00009057 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009058/* confdefs.h. */
9059_ACEOF
9060cat confdefs.h >>conftest.$ac_ext
9061cat >>conftest.$ac_ext <<_ACEOF
9062/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009063$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009064 typedef short ac__type_sizeof_;
9065static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9066static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009067#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009068#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009069int
9070main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009071{
Martin v. Löwis11437992002-04-12 09:54:03 +00009072
9073 FILE *f = fopen ("conftest.val", "w");
9074 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009075 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009076 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009077 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009078 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009079 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009080 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009081 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009082 }
9083 else
9084 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009085 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009086 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009087 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009088 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009089 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009090 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009091
9092 ;
9093 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009094}
Martin v. Löwis11437992002-04-12 09:54:03 +00009095_ACEOF
9096rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009097if { (ac_try="$ac_link"
9098case "(($ac_try" in
9099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9100 *) ac_try_echo=$ac_try;;
9101esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009103 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009104 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009106 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009107 { (case "(($ac_try" in
9108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9109 *) ac_try_echo=$ac_try;;
9110esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009112 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009113 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009115 (exit $ac_status); }; }; then
9116 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009117else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009118 echo "$as_me: program exited with status $ac_status" >&5
9119echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009120sed 's/^/| /' conftest.$ac_ext >&5
9121
Martin v. Löwis11437992002-04-12 09:54:03 +00009122( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009123if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009124 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009125See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009126echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009127See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009128 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009129 else
9130 ac_cv_sizeof_short=0
9131 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009132fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009133rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009134fi
9135rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009136fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009137{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9138echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009139
9140
9141
Martin v. Löwis11437992002-04-12 09:54:03 +00009142cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009143#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009144_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009145
9146
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009147{ echo "$as_me:$LINENO: checking for float" >&5
9148echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9149if test "${ac_cv_type_float+set}" = set; then
9150 echo $ECHO_N "(cached) $ECHO_C" >&6
9151else
9152 cat >conftest.$ac_ext <<_ACEOF
9153/* confdefs.h. */
9154_ACEOF
9155cat confdefs.h >>conftest.$ac_ext
9156cat >>conftest.$ac_ext <<_ACEOF
9157/* end confdefs.h. */
9158$ac_includes_default
9159typedef float ac__type_new_;
9160int
9161main ()
9162{
9163if ((ac__type_new_ *) 0)
9164 return 0;
9165if (sizeof (ac__type_new_))
9166 return 0;
9167 ;
9168 return 0;
9169}
9170_ACEOF
9171rm -f conftest.$ac_objext
9172if { (ac_try="$ac_compile"
9173case "(($ac_try" in
9174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9175 *) ac_try_echo=$ac_try;;
9176esac
9177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9178 (eval "$ac_compile") 2>conftest.er1
9179 ac_status=$?
9180 grep -v '^ *+' conftest.er1 >conftest.err
9181 rm -f conftest.er1
9182 cat conftest.err >&5
9183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9184 (exit $ac_status); } && {
9185 test -z "$ac_c_werror_flag" ||
9186 test ! -s conftest.err
9187 } && test -s conftest.$ac_objext; then
9188 ac_cv_type_float=yes
9189else
9190 echo "$as_me: failed program was:" >&5
9191sed 's/^/| /' conftest.$ac_ext >&5
9192
9193 ac_cv_type_float=no
9194fi
9195
9196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9197fi
9198{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9199echo "${ECHO_T}$ac_cv_type_float" >&6; }
9200
Martin v. Löwiseba40652007-08-30 20:10:57 +00009201# The cast to long int works around a bug in the HP C Compiler
9202# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9203# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9204# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009205{ echo "$as_me:$LINENO: checking size of float" >&5
9206echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009207if test "${ac_cv_sizeof_float+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009208 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009209else
Martin v. Löwis11437992002-04-12 09:54:03 +00009210 if test "$cross_compiling" = yes; then
9211 # Depending upon the size, compute the lo and hi bounds.
9212cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009213/* confdefs.h. */
9214_ACEOF
9215cat confdefs.h >>conftest.$ac_ext
9216cat >>conftest.$ac_ext <<_ACEOF
9217/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009218$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009219 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009220int
9221main ()
9222{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009223static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009224test_array [0] = 0
9225
9226 ;
9227 return 0;
9228}
9229_ACEOF
9230rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009231if { (ac_try="$ac_compile"
9232case "(($ac_try" in
9233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9234 *) ac_try_echo=$ac_try;;
9235esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009237 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009238 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009239 grep -v '^ *+' conftest.er1 >conftest.err
9240 rm -f conftest.er1
9241 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009243 (exit $ac_status); } && {
9244 test -z "$ac_c_werror_flag" ||
9245 test ! -s conftest.err
9246 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009247 ac_lo=0 ac_mid=0
9248 while :; do
9249 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009250/* confdefs.h. */
9251_ACEOF
9252cat confdefs.h >>conftest.$ac_ext
9253cat >>conftest.$ac_ext <<_ACEOF
9254/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009255$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009256 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009257int
9258main ()
9259{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009260static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009261test_array [0] = 0
9262
9263 ;
9264 return 0;
9265}
9266_ACEOF
9267rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009268if { (ac_try="$ac_compile"
9269case "(($ac_try" in
9270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9271 *) ac_try_echo=$ac_try;;
9272esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009274 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009275 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009276 grep -v '^ *+' conftest.er1 >conftest.err
9277 rm -f conftest.er1
9278 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009280 (exit $ac_status); } && {
9281 test -z "$ac_c_werror_flag" ||
9282 test ! -s conftest.err
9283 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009284 ac_hi=$ac_mid; break
9285else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009286 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009287sed 's/^/| /' conftest.$ac_ext >&5
9288
Martin v. Löwiseba40652007-08-30 20:10:57 +00009289 ac_lo=`expr $ac_mid + 1`
9290 if test $ac_lo -le $ac_mid; then
9291 ac_lo= ac_hi=
9292 break
9293 fi
9294 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009295fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009296
9297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009298 done
9299else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009300 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009301sed 's/^/| /' conftest.$ac_ext >&5
9302
Martin v. Löwiseba40652007-08-30 20:10:57 +00009303 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009304/* confdefs.h. */
9305_ACEOF
9306cat confdefs.h >>conftest.$ac_ext
9307cat >>conftest.$ac_ext <<_ACEOF
9308/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009309$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009310 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009311int
9312main ()
9313{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009314static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009315test_array [0] = 0
9316
9317 ;
9318 return 0;
9319}
9320_ACEOF
9321rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009322if { (ac_try="$ac_compile"
9323case "(($ac_try" in
9324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9325 *) ac_try_echo=$ac_try;;
9326esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009328 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009329 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009330 grep -v '^ *+' conftest.er1 >conftest.err
9331 rm -f conftest.er1
9332 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009334 (exit $ac_status); } && {
9335 test -z "$ac_c_werror_flag" ||
9336 test ! -s conftest.err
9337 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009338 ac_hi=-1 ac_mid=-1
9339 while :; do
9340 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009341/* confdefs.h. */
9342_ACEOF
9343cat confdefs.h >>conftest.$ac_ext
9344cat >>conftest.$ac_ext <<_ACEOF
9345/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009346$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009347 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009348int
9349main ()
9350{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009351static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009352test_array [0] = 0
9353
9354 ;
9355 return 0;
9356}
9357_ACEOF
9358rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009359if { (ac_try="$ac_compile"
9360case "(($ac_try" in
9361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9362 *) ac_try_echo=$ac_try;;
9363esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009365 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009366 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009367 grep -v '^ *+' conftest.er1 >conftest.err
9368 rm -f conftest.er1
9369 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009371 (exit $ac_status); } && {
9372 test -z "$ac_c_werror_flag" ||
9373 test ! -s conftest.err
9374 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009375 ac_lo=$ac_mid; break
9376else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009377 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009378sed 's/^/| /' conftest.$ac_ext >&5
9379
Martin v. Löwiseba40652007-08-30 20:10:57 +00009380 ac_hi=`expr '(' $ac_mid ')' - 1`
9381 if test $ac_mid -le $ac_hi; then
9382 ac_lo= ac_hi=
9383 break
9384 fi
9385 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009386fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009387
9388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009389 done
9390else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009391 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009392sed 's/^/| /' conftest.$ac_ext >&5
9393
Martin v. Löwiseba40652007-08-30 20:10:57 +00009394 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009395fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009396
9397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009398fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009399
9400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009401# Binary search between lo and hi bounds.
9402while test "x$ac_lo" != "x$ac_hi"; do
9403 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9404 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009405/* confdefs.h. */
9406_ACEOF
9407cat confdefs.h >>conftest.$ac_ext
9408cat >>conftest.$ac_ext <<_ACEOF
9409/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009410$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009411 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009412int
9413main ()
9414{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009415static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009416test_array [0] = 0
9417
9418 ;
9419 return 0;
9420}
9421_ACEOF
9422rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009423if { (ac_try="$ac_compile"
9424case "(($ac_try" in
9425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9426 *) ac_try_echo=$ac_try;;
9427esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009429 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009430 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009431 grep -v '^ *+' conftest.er1 >conftest.err
9432 rm -f conftest.er1
9433 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009435 (exit $ac_status); } && {
9436 test -z "$ac_c_werror_flag" ||
9437 test ! -s conftest.err
9438 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009439 ac_hi=$ac_mid
9440else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009441 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009442sed 's/^/| /' conftest.$ac_ext >&5
9443
Martin v. Löwiseba40652007-08-30 20:10:57 +00009444 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009445fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009446
9447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009448done
9449case $ac_lo in
9450?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009451'') if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009452 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009453See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009454echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009455See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009456 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009457 else
9458 ac_cv_sizeof_float=0
9459 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009460esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009461else
Martin v. Löwis11437992002-04-12 09:54:03 +00009462 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009463/* confdefs.h. */
9464_ACEOF
9465cat confdefs.h >>conftest.$ac_ext
9466cat >>conftest.$ac_ext <<_ACEOF
9467/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009468$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009469 typedef float ac__type_sizeof_;
9470static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9471static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009472#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009473#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009474int
9475main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009476{
Martin v. Löwis11437992002-04-12 09:54:03 +00009477
9478 FILE *f = fopen ("conftest.val", "w");
9479 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009480 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009481 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009482 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009483 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009484 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009485 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009486 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009487 }
9488 else
9489 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009490 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009491 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009492 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009493 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009494 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009495 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009496
9497 ;
9498 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009499}
Martin v. Löwis11437992002-04-12 09:54:03 +00009500_ACEOF
9501rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009502if { (ac_try="$ac_link"
9503case "(($ac_try" in
9504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9505 *) ac_try_echo=$ac_try;;
9506esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009508 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009509 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009511 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009512 { (case "(($ac_try" in
9513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9514 *) ac_try_echo=$ac_try;;
9515esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009517 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009518 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009520 (exit $ac_status); }; }; then
9521 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009522else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009523 echo "$as_me: program exited with status $ac_status" >&5
9524echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009525sed 's/^/| /' conftest.$ac_ext >&5
9526
Martin v. Löwis11437992002-04-12 09:54:03 +00009527( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009528if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009529 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009530See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009531echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009532See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009533 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009534 else
9535 ac_cv_sizeof_float=0
9536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009537fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009538rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009539fi
9540rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009541fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009542{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9543echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009544
9545
9546
Martin v. Löwis11437992002-04-12 09:54:03 +00009547cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009548#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009549_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009550
9551
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009552{ echo "$as_me:$LINENO: checking for double" >&5
9553echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9554if test "${ac_cv_type_double+set}" = set; then
9555 echo $ECHO_N "(cached) $ECHO_C" >&6
9556else
9557 cat >conftest.$ac_ext <<_ACEOF
9558/* confdefs.h. */
9559_ACEOF
9560cat confdefs.h >>conftest.$ac_ext
9561cat >>conftest.$ac_ext <<_ACEOF
9562/* end confdefs.h. */
9563$ac_includes_default
9564typedef double ac__type_new_;
9565int
9566main ()
9567{
9568if ((ac__type_new_ *) 0)
9569 return 0;
9570if (sizeof (ac__type_new_))
9571 return 0;
9572 ;
9573 return 0;
9574}
9575_ACEOF
9576rm -f conftest.$ac_objext
9577if { (ac_try="$ac_compile"
9578case "(($ac_try" in
9579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9580 *) ac_try_echo=$ac_try;;
9581esac
9582eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9583 (eval "$ac_compile") 2>conftest.er1
9584 ac_status=$?
9585 grep -v '^ *+' conftest.er1 >conftest.err
9586 rm -f conftest.er1
9587 cat conftest.err >&5
9588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9589 (exit $ac_status); } && {
9590 test -z "$ac_c_werror_flag" ||
9591 test ! -s conftest.err
9592 } && test -s conftest.$ac_objext; then
9593 ac_cv_type_double=yes
9594else
9595 echo "$as_me: failed program was:" >&5
9596sed 's/^/| /' conftest.$ac_ext >&5
9597
9598 ac_cv_type_double=no
9599fi
9600
9601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9602fi
9603{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9604echo "${ECHO_T}$ac_cv_type_double" >&6; }
9605
Martin v. Löwiseba40652007-08-30 20:10:57 +00009606# The cast to long int works around a bug in the HP C Compiler
9607# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9608# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9609# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009610{ echo "$as_me:$LINENO: checking size of double" >&5
9611echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009612if test "${ac_cv_sizeof_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009613 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009614else
Martin v. Löwis11437992002-04-12 09:54:03 +00009615 if test "$cross_compiling" = yes; then
9616 # Depending upon the size, compute the lo and hi bounds.
9617cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009618/* confdefs.h. */
9619_ACEOF
9620cat confdefs.h >>conftest.$ac_ext
9621cat >>conftest.$ac_ext <<_ACEOF
9622/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009623$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009624 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009625int
9626main ()
9627{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009628static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009629test_array [0] = 0
9630
9631 ;
9632 return 0;
9633}
9634_ACEOF
9635rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009636if { (ac_try="$ac_compile"
9637case "(($ac_try" in
9638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9639 *) ac_try_echo=$ac_try;;
9640esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009641eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009642 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009643 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009644 grep -v '^ *+' conftest.er1 >conftest.err
9645 rm -f conftest.er1
9646 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009648 (exit $ac_status); } && {
9649 test -z "$ac_c_werror_flag" ||
9650 test ! -s conftest.err
9651 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009652 ac_lo=0 ac_mid=0
9653 while :; do
9654 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009655/* confdefs.h. */
9656_ACEOF
9657cat confdefs.h >>conftest.$ac_ext
9658cat >>conftest.$ac_ext <<_ACEOF
9659/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009660$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009661 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009662int
9663main ()
9664{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009665static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009666test_array [0] = 0
9667
9668 ;
9669 return 0;
9670}
9671_ACEOF
9672rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009673if { (ac_try="$ac_compile"
9674case "(($ac_try" in
9675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9676 *) ac_try_echo=$ac_try;;
9677esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009679 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009680 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009681 grep -v '^ *+' conftest.er1 >conftest.err
9682 rm -f conftest.er1
9683 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009685 (exit $ac_status); } && {
9686 test -z "$ac_c_werror_flag" ||
9687 test ! -s conftest.err
9688 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009689 ac_hi=$ac_mid; break
9690else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009691 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009692sed 's/^/| /' conftest.$ac_ext >&5
9693
Martin v. Löwiseba40652007-08-30 20:10:57 +00009694 ac_lo=`expr $ac_mid + 1`
9695 if test $ac_lo -le $ac_mid; then
9696 ac_lo= ac_hi=
9697 break
9698 fi
9699 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009700fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009701
9702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009703 done
9704else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009705 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009706sed 's/^/| /' conftest.$ac_ext >&5
9707
Martin v. Löwiseba40652007-08-30 20:10:57 +00009708 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009709/* confdefs.h. */
9710_ACEOF
9711cat confdefs.h >>conftest.$ac_ext
9712cat >>conftest.$ac_ext <<_ACEOF
9713/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009714$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009715 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009716int
9717main ()
9718{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009719static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009720test_array [0] = 0
9721
9722 ;
9723 return 0;
9724}
9725_ACEOF
9726rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009727if { (ac_try="$ac_compile"
9728case "(($ac_try" in
9729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9730 *) ac_try_echo=$ac_try;;
9731esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009733 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009734 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009735 grep -v '^ *+' conftest.er1 >conftest.err
9736 rm -f conftest.er1
9737 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009739 (exit $ac_status); } && {
9740 test -z "$ac_c_werror_flag" ||
9741 test ! -s conftest.err
9742 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009743 ac_hi=-1 ac_mid=-1
9744 while :; do
9745 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009746/* confdefs.h. */
9747_ACEOF
9748cat confdefs.h >>conftest.$ac_ext
9749cat >>conftest.$ac_ext <<_ACEOF
9750/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009751$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009752 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009753int
9754main ()
9755{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009756static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009757test_array [0] = 0
9758
9759 ;
9760 return 0;
9761}
9762_ACEOF
9763rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009764if { (ac_try="$ac_compile"
9765case "(($ac_try" in
9766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9767 *) ac_try_echo=$ac_try;;
9768esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009770 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009771 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009772 grep -v '^ *+' conftest.er1 >conftest.err
9773 rm -f conftest.er1
9774 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009776 (exit $ac_status); } && {
9777 test -z "$ac_c_werror_flag" ||
9778 test ! -s conftest.err
9779 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009780 ac_lo=$ac_mid; break
9781else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009782 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009783sed 's/^/| /' conftest.$ac_ext >&5
9784
Martin v. Löwiseba40652007-08-30 20:10:57 +00009785 ac_hi=`expr '(' $ac_mid ')' - 1`
9786 if test $ac_mid -le $ac_hi; then
9787 ac_lo= ac_hi=
9788 break
9789 fi
9790 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009791fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009792
9793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009794 done
9795else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009796 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009797sed 's/^/| /' conftest.$ac_ext >&5
9798
Martin v. Löwiseba40652007-08-30 20:10:57 +00009799 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009800fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009801
9802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009803fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009804
9805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009806# Binary search between lo and hi bounds.
9807while test "x$ac_lo" != "x$ac_hi"; do
9808 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9809 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009810/* confdefs.h. */
9811_ACEOF
9812cat confdefs.h >>conftest.$ac_ext
9813cat >>conftest.$ac_ext <<_ACEOF
9814/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009815$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009816 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009817int
9818main ()
9819{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009820static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009821test_array [0] = 0
9822
9823 ;
9824 return 0;
9825}
9826_ACEOF
9827rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009828if { (ac_try="$ac_compile"
9829case "(($ac_try" in
9830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9831 *) ac_try_echo=$ac_try;;
9832esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009834 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009835 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009836 grep -v '^ *+' conftest.er1 >conftest.err
9837 rm -f conftest.er1
9838 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009840 (exit $ac_status); } && {
9841 test -z "$ac_c_werror_flag" ||
9842 test ! -s conftest.err
9843 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009844 ac_hi=$ac_mid
9845else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009846 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009847sed 's/^/| /' conftest.$ac_ext >&5
9848
Martin v. Löwiseba40652007-08-30 20:10:57 +00009849 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009850fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009851
9852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009853done
9854case $ac_lo in
9855?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009856'') if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009857 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009858See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009859echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009860See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009861 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009862 else
9863 ac_cv_sizeof_double=0
9864 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009865esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009866else
Martin v. Löwis11437992002-04-12 09:54:03 +00009867 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009868/* confdefs.h. */
9869_ACEOF
9870cat confdefs.h >>conftest.$ac_ext
9871cat >>conftest.$ac_ext <<_ACEOF
9872/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009873$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009874 typedef double ac__type_sizeof_;
9875static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9876static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009877#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009878#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009879int
9880main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009881{
Martin v. Löwis11437992002-04-12 09:54:03 +00009882
9883 FILE *f = fopen ("conftest.val", "w");
9884 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009885 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009886 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009887 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009888 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009889 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009890 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009891 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009892 }
9893 else
9894 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009895 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009896 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009897 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009898 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009899 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009900 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009901
9902 ;
9903 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009904}
Martin v. Löwis11437992002-04-12 09:54:03 +00009905_ACEOF
9906rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009907if { (ac_try="$ac_link"
9908case "(($ac_try" in
9909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9910 *) ac_try_echo=$ac_try;;
9911esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009913 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009914 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009916 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009917 { (case "(($ac_try" in
9918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9919 *) ac_try_echo=$ac_try;;
9920esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009922 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009923 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009925 (exit $ac_status); }; }; then
9926 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009927else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009928 echo "$as_me: program exited with status $ac_status" >&5
9929echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009930sed 's/^/| /' conftest.$ac_ext >&5
9931
Martin v. Löwis11437992002-04-12 09:54:03 +00009932( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009933if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009934 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009935See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009936echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009937See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009938 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009939 else
9940 ac_cv_sizeof_double=0
9941 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009942fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009943rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009944fi
9945rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009946fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009947{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9948echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009949
9950
9951
Martin v. Löwis11437992002-04-12 09:54:03 +00009952cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009953#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009954_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009955
9956
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009957{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9958echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9959if test "${ac_cv_type_fpos_t+set}" = set; then
9960 echo $ECHO_N "(cached) $ECHO_C" >&6
9961else
9962 cat >conftest.$ac_ext <<_ACEOF
9963/* confdefs.h. */
9964_ACEOF
9965cat confdefs.h >>conftest.$ac_ext
9966cat >>conftest.$ac_ext <<_ACEOF
9967/* end confdefs.h. */
9968$ac_includes_default
9969typedef fpos_t ac__type_new_;
9970int
9971main ()
9972{
9973if ((ac__type_new_ *) 0)
9974 return 0;
9975if (sizeof (ac__type_new_))
9976 return 0;
9977 ;
9978 return 0;
9979}
9980_ACEOF
9981rm -f conftest.$ac_objext
9982if { (ac_try="$ac_compile"
9983case "(($ac_try" in
9984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9985 *) ac_try_echo=$ac_try;;
9986esac
9987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9988 (eval "$ac_compile") 2>conftest.er1
9989 ac_status=$?
9990 grep -v '^ *+' conftest.er1 >conftest.err
9991 rm -f conftest.er1
9992 cat conftest.err >&5
9993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9994 (exit $ac_status); } && {
9995 test -z "$ac_c_werror_flag" ||
9996 test ! -s conftest.err
9997 } && test -s conftest.$ac_objext; then
9998 ac_cv_type_fpos_t=yes
9999else
10000 echo "$as_me: failed program was:" >&5
10001sed 's/^/| /' conftest.$ac_ext >&5
10002
10003 ac_cv_type_fpos_t=no
10004fi
10005
10006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10007fi
10008{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
10009echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
10010
Martin v. Löwiseba40652007-08-30 20:10:57 +000010011# The cast to long int works around a bug in the HP C Compiler
10012# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10013# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10014# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010015{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
10016echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010017if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010018 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010019else
Martin v. Löwis11437992002-04-12 09:54:03 +000010020 if test "$cross_compiling" = yes; then
10021 # Depending upon the size, compute the lo and hi bounds.
10022cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010023/* confdefs.h. */
10024_ACEOF
10025cat confdefs.h >>conftest.$ac_ext
10026cat >>conftest.$ac_ext <<_ACEOF
10027/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010028$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010029 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010030int
10031main ()
10032{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010033static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010034test_array [0] = 0
10035
10036 ;
10037 return 0;
10038}
10039_ACEOF
10040rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010041if { (ac_try="$ac_compile"
10042case "(($ac_try" in
10043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10044 *) ac_try_echo=$ac_try;;
10045esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010047 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010048 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010049 grep -v '^ *+' conftest.er1 >conftest.err
10050 rm -f conftest.er1
10051 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010053 (exit $ac_status); } && {
10054 test -z "$ac_c_werror_flag" ||
10055 test ! -s conftest.err
10056 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010057 ac_lo=0 ac_mid=0
10058 while :; do
10059 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010060/* confdefs.h. */
10061_ACEOF
10062cat confdefs.h >>conftest.$ac_ext
10063cat >>conftest.$ac_ext <<_ACEOF
10064/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010065$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010066 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010067int
10068main ()
10069{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010070static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010071test_array [0] = 0
10072
10073 ;
10074 return 0;
10075}
10076_ACEOF
10077rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010078if { (ac_try="$ac_compile"
10079case "(($ac_try" in
10080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10081 *) ac_try_echo=$ac_try;;
10082esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010084 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010085 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010086 grep -v '^ *+' conftest.er1 >conftest.err
10087 rm -f conftest.er1
10088 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010090 (exit $ac_status); } && {
10091 test -z "$ac_c_werror_flag" ||
10092 test ! -s conftest.err
10093 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010094 ac_hi=$ac_mid; break
10095else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010096 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010097sed 's/^/| /' conftest.$ac_ext >&5
10098
Martin v. Löwiseba40652007-08-30 20:10:57 +000010099 ac_lo=`expr $ac_mid + 1`
10100 if test $ac_lo -le $ac_mid; then
10101 ac_lo= ac_hi=
10102 break
10103 fi
10104 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010105fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010106
10107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010108 done
10109else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010110 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010111sed 's/^/| /' conftest.$ac_ext >&5
10112
Martin v. Löwiseba40652007-08-30 20:10:57 +000010113 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010114/* confdefs.h. */
10115_ACEOF
10116cat confdefs.h >>conftest.$ac_ext
10117cat >>conftest.$ac_ext <<_ACEOF
10118/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010119$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010120 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010121int
10122main ()
10123{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010124static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010125test_array [0] = 0
10126
10127 ;
10128 return 0;
10129}
10130_ACEOF
10131rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010132if { (ac_try="$ac_compile"
10133case "(($ac_try" in
10134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10135 *) ac_try_echo=$ac_try;;
10136esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010138 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010139 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010140 grep -v '^ *+' conftest.er1 >conftest.err
10141 rm -f conftest.er1
10142 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010144 (exit $ac_status); } && {
10145 test -z "$ac_c_werror_flag" ||
10146 test ! -s conftest.err
10147 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010148 ac_hi=-1 ac_mid=-1
10149 while :; do
10150 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010151/* confdefs.h. */
10152_ACEOF
10153cat confdefs.h >>conftest.$ac_ext
10154cat >>conftest.$ac_ext <<_ACEOF
10155/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010156$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010157 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010158int
10159main ()
10160{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010161static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010162test_array [0] = 0
10163
10164 ;
10165 return 0;
10166}
10167_ACEOF
10168rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010169if { (ac_try="$ac_compile"
10170case "(($ac_try" in
10171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10172 *) ac_try_echo=$ac_try;;
10173esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010175 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010176 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010177 grep -v '^ *+' conftest.er1 >conftest.err
10178 rm -f conftest.er1
10179 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010181 (exit $ac_status); } && {
10182 test -z "$ac_c_werror_flag" ||
10183 test ! -s conftest.err
10184 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010185 ac_lo=$ac_mid; break
10186else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010187 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010188sed 's/^/| /' conftest.$ac_ext >&5
10189
Martin v. Löwiseba40652007-08-30 20:10:57 +000010190 ac_hi=`expr '(' $ac_mid ')' - 1`
10191 if test $ac_mid -le $ac_hi; then
10192 ac_lo= ac_hi=
10193 break
10194 fi
10195 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010196fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010197
10198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010199 done
10200else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010201 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010202sed 's/^/| /' conftest.$ac_ext >&5
10203
Martin v. Löwiseba40652007-08-30 20:10:57 +000010204 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010205fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010206
10207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010208fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010209
10210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010211# Binary search between lo and hi bounds.
10212while test "x$ac_lo" != "x$ac_hi"; do
10213 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10214 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010215/* confdefs.h. */
10216_ACEOF
10217cat confdefs.h >>conftest.$ac_ext
10218cat >>conftest.$ac_ext <<_ACEOF
10219/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010220$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010221 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010222int
10223main ()
10224{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010225static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010226test_array [0] = 0
10227
10228 ;
10229 return 0;
10230}
10231_ACEOF
10232rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010233if { (ac_try="$ac_compile"
10234case "(($ac_try" in
10235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10236 *) ac_try_echo=$ac_try;;
10237esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010239 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010240 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010241 grep -v '^ *+' conftest.er1 >conftest.err
10242 rm -f conftest.er1
10243 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010245 (exit $ac_status); } && {
10246 test -z "$ac_c_werror_flag" ||
10247 test ! -s conftest.err
10248 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010249 ac_hi=$ac_mid
10250else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010251 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010252sed 's/^/| /' conftest.$ac_ext >&5
10253
Martin v. Löwiseba40652007-08-30 20:10:57 +000010254 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010255fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010256
10257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010258done
10259case $ac_lo in
10260?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010261'') if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010262 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010263See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010264echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010265See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010266 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010267 else
10268 ac_cv_sizeof_fpos_t=0
10269 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010270esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010271else
Martin v. Löwis11437992002-04-12 09:54:03 +000010272 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010273/* confdefs.h. */
10274_ACEOF
10275cat confdefs.h >>conftest.$ac_ext
10276cat >>conftest.$ac_ext <<_ACEOF
10277/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010278$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010279 typedef fpos_t ac__type_sizeof_;
10280static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10281static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010282#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010283#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010284int
10285main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010286{
Martin v. Löwis11437992002-04-12 09:54:03 +000010287
10288 FILE *f = fopen ("conftest.val", "w");
10289 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010290 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010291 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010292 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010293 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010294 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010295 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010296 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010297 }
10298 else
10299 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010300 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010301 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010302 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010303 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010304 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010305 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010306
10307 ;
10308 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010309}
Martin v. Löwis11437992002-04-12 09:54:03 +000010310_ACEOF
10311rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010312if { (ac_try="$ac_link"
10313case "(($ac_try" in
10314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10315 *) ac_try_echo=$ac_try;;
10316esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010318 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010319 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010321 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010322 { (case "(($ac_try" in
10323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10324 *) ac_try_echo=$ac_try;;
10325esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010327 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010328 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010330 (exit $ac_status); }; }; then
10331 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010332else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010333 echo "$as_me: program exited with status $ac_status" >&5
10334echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010335sed 's/^/| /' conftest.$ac_ext >&5
10336
Martin v. Löwis11437992002-04-12 09:54:03 +000010337( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010338if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010339 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010340See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010341echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010342See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010343 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010344 else
10345 ac_cv_sizeof_fpos_t=0
10346 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010347fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010348rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010349fi
10350rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010351fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010352{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10353echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010354
10355
10356
Martin v. Löwis11437992002-04-12 09:54:03 +000010357cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010358#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010359_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010360
Michael W. Hudson54241132001-12-07 15:38:26 +000010361
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010362{ echo "$as_me:$LINENO: checking for size_t" >&5
10363echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10364if test "${ac_cv_type_size_t+set}" = set; then
10365 echo $ECHO_N "(cached) $ECHO_C" >&6
10366else
10367 cat >conftest.$ac_ext <<_ACEOF
10368/* confdefs.h. */
10369_ACEOF
10370cat confdefs.h >>conftest.$ac_ext
10371cat >>conftest.$ac_ext <<_ACEOF
10372/* end confdefs.h. */
10373$ac_includes_default
10374typedef size_t ac__type_new_;
10375int
10376main ()
10377{
10378if ((ac__type_new_ *) 0)
10379 return 0;
10380if (sizeof (ac__type_new_))
10381 return 0;
10382 ;
10383 return 0;
10384}
10385_ACEOF
10386rm -f conftest.$ac_objext
10387if { (ac_try="$ac_compile"
10388case "(($ac_try" in
10389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10390 *) ac_try_echo=$ac_try;;
10391esac
10392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10393 (eval "$ac_compile") 2>conftest.er1
10394 ac_status=$?
10395 grep -v '^ *+' conftest.er1 >conftest.err
10396 rm -f conftest.er1
10397 cat conftest.err >&5
10398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10399 (exit $ac_status); } && {
10400 test -z "$ac_c_werror_flag" ||
10401 test ! -s conftest.err
10402 } && test -s conftest.$ac_objext; then
10403 ac_cv_type_size_t=yes
10404else
10405 echo "$as_me: failed program was:" >&5
10406sed 's/^/| /' conftest.$ac_ext >&5
10407
10408 ac_cv_type_size_t=no
10409fi
10410
10411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10412fi
10413{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10414echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10415
Martin v. Löwiseba40652007-08-30 20:10:57 +000010416# The cast to long int works around a bug in the HP C Compiler
10417# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10418# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10419# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010420{ echo "$as_me:$LINENO: checking size of size_t" >&5
10421echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010422if test "${ac_cv_sizeof_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010423 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010424else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010425 if test "$cross_compiling" = yes; then
10426 # Depending upon the size, compute the lo and hi bounds.
10427cat >conftest.$ac_ext <<_ACEOF
10428/* confdefs.h. */
10429_ACEOF
10430cat confdefs.h >>conftest.$ac_ext
10431cat >>conftest.$ac_ext <<_ACEOF
10432/* end confdefs.h. */
10433$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010434 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010435int
10436main ()
10437{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010438static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010439test_array [0] = 0
10440
10441 ;
10442 return 0;
10443}
10444_ACEOF
10445rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010446if { (ac_try="$ac_compile"
10447case "(($ac_try" in
10448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10449 *) ac_try_echo=$ac_try;;
10450esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010452 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010453 ac_status=$?
10454 grep -v '^ *+' conftest.er1 >conftest.err
10455 rm -f conftest.er1
10456 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010458 (exit $ac_status); } && {
10459 test -z "$ac_c_werror_flag" ||
10460 test ! -s conftest.err
10461 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010462 ac_lo=0 ac_mid=0
10463 while :; do
10464 cat >conftest.$ac_ext <<_ACEOF
10465/* confdefs.h. */
10466_ACEOF
10467cat confdefs.h >>conftest.$ac_ext
10468cat >>conftest.$ac_ext <<_ACEOF
10469/* end confdefs.h. */
10470$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010471 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010472int
10473main ()
10474{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010475static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010476test_array [0] = 0
10477
10478 ;
10479 return 0;
10480}
10481_ACEOF
10482rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010483if { (ac_try="$ac_compile"
10484case "(($ac_try" in
10485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10486 *) ac_try_echo=$ac_try;;
10487esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010489 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010490 ac_status=$?
10491 grep -v '^ *+' conftest.er1 >conftest.err
10492 rm -f conftest.er1
10493 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010495 (exit $ac_status); } && {
10496 test -z "$ac_c_werror_flag" ||
10497 test ! -s conftest.err
10498 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010499 ac_hi=$ac_mid; break
10500else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010501 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010502sed 's/^/| /' conftest.$ac_ext >&5
10503
Martin v. Löwiseba40652007-08-30 20:10:57 +000010504 ac_lo=`expr $ac_mid + 1`
10505 if test $ac_lo -le $ac_mid; then
10506 ac_lo= ac_hi=
10507 break
10508 fi
10509 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010510fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010511
10512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010513 done
10514else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010515 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010516sed 's/^/| /' conftest.$ac_ext >&5
10517
Martin v. Löwiseba40652007-08-30 20:10:57 +000010518 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010519/* confdefs.h. */
10520_ACEOF
10521cat confdefs.h >>conftest.$ac_ext
10522cat >>conftest.$ac_ext <<_ACEOF
10523/* end confdefs.h. */
10524$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010525 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010526int
10527main ()
10528{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010529static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010530test_array [0] = 0
10531
10532 ;
10533 return 0;
10534}
10535_ACEOF
10536rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010537if { (ac_try="$ac_compile"
10538case "(($ac_try" in
10539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10540 *) ac_try_echo=$ac_try;;
10541esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010543 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010544 ac_status=$?
10545 grep -v '^ *+' conftest.er1 >conftest.err
10546 rm -f conftest.er1
10547 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010549 (exit $ac_status); } && {
10550 test -z "$ac_c_werror_flag" ||
10551 test ! -s conftest.err
10552 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010553 ac_hi=-1 ac_mid=-1
10554 while :; do
10555 cat >conftest.$ac_ext <<_ACEOF
10556/* confdefs.h. */
10557_ACEOF
10558cat confdefs.h >>conftest.$ac_ext
10559cat >>conftest.$ac_ext <<_ACEOF
10560/* end confdefs.h. */
10561$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010562 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010563int
10564main ()
10565{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010566static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010567test_array [0] = 0
10568
10569 ;
10570 return 0;
10571}
10572_ACEOF
10573rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010574if { (ac_try="$ac_compile"
10575case "(($ac_try" in
10576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10577 *) ac_try_echo=$ac_try;;
10578esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010580 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010581 ac_status=$?
10582 grep -v '^ *+' conftest.er1 >conftest.err
10583 rm -f conftest.er1
10584 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010586 (exit $ac_status); } && {
10587 test -z "$ac_c_werror_flag" ||
10588 test ! -s conftest.err
10589 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010590 ac_lo=$ac_mid; break
10591else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010592 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010593sed 's/^/| /' conftest.$ac_ext >&5
10594
Martin v. Löwiseba40652007-08-30 20:10:57 +000010595 ac_hi=`expr '(' $ac_mid ')' - 1`
10596 if test $ac_mid -le $ac_hi; then
10597 ac_lo= ac_hi=
10598 break
10599 fi
10600 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010601fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010602
10603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010604 done
10605else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010606 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010607sed 's/^/| /' conftest.$ac_ext >&5
10608
Martin v. Löwiseba40652007-08-30 20:10:57 +000010609 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010610fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010611
10612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010613fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010614
10615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010616# Binary search between lo and hi bounds.
10617while test "x$ac_lo" != "x$ac_hi"; do
10618 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10619 cat >conftest.$ac_ext <<_ACEOF
10620/* confdefs.h. */
10621_ACEOF
10622cat confdefs.h >>conftest.$ac_ext
10623cat >>conftest.$ac_ext <<_ACEOF
10624/* end confdefs.h. */
10625$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010626 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010627int
10628main ()
10629{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010630static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010631test_array [0] = 0
10632
10633 ;
10634 return 0;
10635}
10636_ACEOF
10637rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010638if { (ac_try="$ac_compile"
10639case "(($ac_try" in
10640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10641 *) ac_try_echo=$ac_try;;
10642esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010644 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010645 ac_status=$?
10646 grep -v '^ *+' conftest.er1 >conftest.err
10647 rm -f conftest.er1
10648 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010650 (exit $ac_status); } && {
10651 test -z "$ac_c_werror_flag" ||
10652 test ! -s conftest.err
10653 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010654 ac_hi=$ac_mid
10655else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010656 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010657sed 's/^/| /' conftest.$ac_ext >&5
10658
Martin v. Löwiseba40652007-08-30 20:10:57 +000010659 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010660fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010661
10662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010663done
10664case $ac_lo in
10665?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010666'') if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010667 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010668See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010669echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010670See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010671 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010672 else
10673 ac_cv_sizeof_size_t=0
10674 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010675esac
10676else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010677 cat >conftest.$ac_ext <<_ACEOF
10678/* confdefs.h. */
10679_ACEOF
10680cat confdefs.h >>conftest.$ac_ext
10681cat >>conftest.$ac_ext <<_ACEOF
10682/* end confdefs.h. */
10683$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010684 typedef size_t ac__type_sizeof_;
10685static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10686static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010687#include <stdio.h>
10688#include <stdlib.h>
10689int
10690main ()
10691{
10692
10693 FILE *f = fopen ("conftest.val", "w");
10694 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010695 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010696 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010697 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010698 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010699 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010700 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010701 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010702 }
10703 else
10704 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010705 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010706 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010707 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010708 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010709 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010710 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010711
10712 ;
10713 return 0;
10714}
10715_ACEOF
10716rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010717if { (ac_try="$ac_link"
10718case "(($ac_try" in
10719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10720 *) ac_try_echo=$ac_try;;
10721esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010723 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010724 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010726 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010727 { (case "(($ac_try" in
10728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10729 *) ac_try_echo=$ac_try;;
10730esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010732 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010733 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010735 (exit $ac_status); }; }; then
10736 ac_cv_sizeof_size_t=`cat conftest.val`
10737else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010738 echo "$as_me: program exited with status $ac_status" >&5
10739echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010740sed 's/^/| /' conftest.$ac_ext >&5
10741
10742( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010743if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010744 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010745See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010746echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010747See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010748 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010749 else
10750 ac_cv_sizeof_size_t=0
10751 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010752fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010753rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010754fi
10755rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010756fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010757{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10758echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010759
10760
10761
Martin v. Löwis18e16552006-02-15 17:27:45 +000010762cat >>confdefs.h <<_ACEOF
10763#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10764_ACEOF
10765
10766
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010767{ echo "$as_me:$LINENO: checking for pid_t" >&5
10768echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10769if test "${ac_cv_type_pid_t+set}" = set; then
10770 echo $ECHO_N "(cached) $ECHO_C" >&6
10771else
10772 cat >conftest.$ac_ext <<_ACEOF
10773/* confdefs.h. */
10774_ACEOF
10775cat confdefs.h >>conftest.$ac_ext
10776cat >>conftest.$ac_ext <<_ACEOF
10777/* end confdefs.h. */
10778$ac_includes_default
10779typedef pid_t ac__type_new_;
10780int
10781main ()
10782{
10783if ((ac__type_new_ *) 0)
10784 return 0;
10785if (sizeof (ac__type_new_))
10786 return 0;
10787 ;
10788 return 0;
10789}
10790_ACEOF
10791rm -f conftest.$ac_objext
10792if { (ac_try="$ac_compile"
10793case "(($ac_try" in
10794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10795 *) ac_try_echo=$ac_try;;
10796esac
10797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10798 (eval "$ac_compile") 2>conftest.er1
10799 ac_status=$?
10800 grep -v '^ *+' conftest.er1 >conftest.err
10801 rm -f conftest.er1
10802 cat conftest.err >&5
10803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10804 (exit $ac_status); } && {
10805 test -z "$ac_c_werror_flag" ||
10806 test ! -s conftest.err
10807 } && test -s conftest.$ac_objext; then
10808 ac_cv_type_pid_t=yes
10809else
10810 echo "$as_me: failed program was:" >&5
10811sed 's/^/| /' conftest.$ac_ext >&5
10812
10813 ac_cv_type_pid_t=no
10814fi
10815
10816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10817fi
10818{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10819echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10820
Christian Heimes951cc0f2008-01-31 23:08:23 +000010821# The cast to long int works around a bug in the HP C Compiler
10822# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10823# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10824# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010825{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10826echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000010827if test "${ac_cv_sizeof_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010828 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +000010829else
10830 if test "$cross_compiling" = yes; then
10831 # Depending upon the size, compute the lo and hi bounds.
10832cat >conftest.$ac_ext <<_ACEOF
10833/* confdefs.h. */
10834_ACEOF
10835cat confdefs.h >>conftest.$ac_ext
10836cat >>conftest.$ac_ext <<_ACEOF
10837/* end confdefs.h. */
10838$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010839 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010840int
10841main ()
10842{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010843static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010844test_array [0] = 0
10845
10846 ;
10847 return 0;
10848}
10849_ACEOF
10850rm -f conftest.$ac_objext
10851if { (ac_try="$ac_compile"
10852case "(($ac_try" in
10853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10854 *) ac_try_echo=$ac_try;;
10855esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010857 (eval "$ac_compile") 2>conftest.er1
10858 ac_status=$?
10859 grep -v '^ *+' conftest.er1 >conftest.err
10860 rm -f conftest.er1
10861 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010863 (exit $ac_status); } && {
10864 test -z "$ac_c_werror_flag" ||
10865 test ! -s conftest.err
10866 } && test -s conftest.$ac_objext; then
10867 ac_lo=0 ac_mid=0
10868 while :; do
10869 cat >conftest.$ac_ext <<_ACEOF
10870/* confdefs.h. */
10871_ACEOF
10872cat confdefs.h >>conftest.$ac_ext
10873cat >>conftest.$ac_ext <<_ACEOF
10874/* end confdefs.h. */
10875$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010876 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010877int
10878main ()
10879{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010880static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010881test_array [0] = 0
10882
10883 ;
10884 return 0;
10885}
10886_ACEOF
10887rm -f conftest.$ac_objext
10888if { (ac_try="$ac_compile"
10889case "(($ac_try" in
10890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10891 *) ac_try_echo=$ac_try;;
10892esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010894 (eval "$ac_compile") 2>conftest.er1
10895 ac_status=$?
10896 grep -v '^ *+' conftest.er1 >conftest.err
10897 rm -f conftest.er1
10898 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010900 (exit $ac_status); } && {
10901 test -z "$ac_c_werror_flag" ||
10902 test ! -s conftest.err
10903 } && test -s conftest.$ac_objext; then
10904 ac_hi=$ac_mid; break
10905else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010906 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010907sed 's/^/| /' conftest.$ac_ext >&5
10908
10909 ac_lo=`expr $ac_mid + 1`
10910 if test $ac_lo -le $ac_mid; then
10911 ac_lo= ac_hi=
10912 break
10913 fi
10914 ac_mid=`expr 2 '*' $ac_mid + 1`
10915fi
10916
10917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10918 done
10919else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010920 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010921sed 's/^/| /' conftest.$ac_ext >&5
10922
10923 cat >conftest.$ac_ext <<_ACEOF
10924/* confdefs.h. */
10925_ACEOF
10926cat confdefs.h >>conftest.$ac_ext
10927cat >>conftest.$ac_ext <<_ACEOF
10928/* end confdefs.h. */
10929$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010930 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010931int
10932main ()
10933{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010934static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010935test_array [0] = 0
10936
10937 ;
10938 return 0;
10939}
10940_ACEOF
10941rm -f conftest.$ac_objext
10942if { (ac_try="$ac_compile"
10943case "(($ac_try" in
10944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10945 *) ac_try_echo=$ac_try;;
10946esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010948 (eval "$ac_compile") 2>conftest.er1
10949 ac_status=$?
10950 grep -v '^ *+' conftest.er1 >conftest.err
10951 rm -f conftest.er1
10952 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010954 (exit $ac_status); } && {
10955 test -z "$ac_c_werror_flag" ||
10956 test ! -s conftest.err
10957 } && test -s conftest.$ac_objext; then
10958 ac_hi=-1 ac_mid=-1
10959 while :; do
10960 cat >conftest.$ac_ext <<_ACEOF
10961/* confdefs.h. */
10962_ACEOF
10963cat confdefs.h >>conftest.$ac_ext
10964cat >>conftest.$ac_ext <<_ACEOF
10965/* end confdefs.h. */
10966$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010967 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010968int
10969main ()
10970{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010971static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010972test_array [0] = 0
10973
10974 ;
10975 return 0;
10976}
10977_ACEOF
10978rm -f conftest.$ac_objext
10979if { (ac_try="$ac_compile"
10980case "(($ac_try" in
10981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10982 *) ac_try_echo=$ac_try;;
10983esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010985 (eval "$ac_compile") 2>conftest.er1
10986 ac_status=$?
10987 grep -v '^ *+' conftest.er1 >conftest.err
10988 rm -f conftest.er1
10989 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010991 (exit $ac_status); } && {
10992 test -z "$ac_c_werror_flag" ||
10993 test ! -s conftest.err
10994 } && test -s conftest.$ac_objext; then
10995 ac_lo=$ac_mid; break
10996else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010997 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010998sed 's/^/| /' conftest.$ac_ext >&5
10999
11000 ac_hi=`expr '(' $ac_mid ')' - 1`
11001 if test $ac_mid -le $ac_hi; then
11002 ac_lo= ac_hi=
11003 break
11004 fi
11005 ac_mid=`expr 2 '*' $ac_mid`
11006fi
11007
11008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11009 done
11010else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011011 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011012sed 's/^/| /' conftest.$ac_ext >&5
11013
11014 ac_lo= ac_hi=
11015fi
11016
11017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11018fi
11019
11020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11021# Binary search between lo and hi bounds.
11022while test "x$ac_lo" != "x$ac_hi"; do
11023 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11024 cat >conftest.$ac_ext <<_ACEOF
11025/* confdefs.h. */
11026_ACEOF
11027cat confdefs.h >>conftest.$ac_ext
11028cat >>conftest.$ac_ext <<_ACEOF
11029/* end confdefs.h. */
11030$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011031 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011032int
11033main ()
11034{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011035static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011036test_array [0] = 0
11037
11038 ;
11039 return 0;
11040}
11041_ACEOF
11042rm -f conftest.$ac_objext
11043if { (ac_try="$ac_compile"
11044case "(($ac_try" in
11045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11046 *) ac_try_echo=$ac_try;;
11047esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011049 (eval "$ac_compile") 2>conftest.er1
11050 ac_status=$?
11051 grep -v '^ *+' conftest.er1 >conftest.err
11052 rm -f conftest.er1
11053 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011055 (exit $ac_status); } && {
11056 test -z "$ac_c_werror_flag" ||
11057 test ! -s conftest.err
11058 } && test -s conftest.$ac_objext; then
11059 ac_hi=$ac_mid
11060else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011061 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011062sed 's/^/| /' conftest.$ac_ext >&5
11063
11064 ac_lo=`expr '(' $ac_mid ')' + 1`
11065fi
11066
11067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11068done
11069case $ac_lo in
11070?*) ac_cv_sizeof_pid_t=$ac_lo;;
11071'') if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011072 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011073See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011074echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011075See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011076 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011077 else
11078 ac_cv_sizeof_pid_t=0
11079 fi ;;
11080esac
11081else
11082 cat >conftest.$ac_ext <<_ACEOF
11083/* confdefs.h. */
11084_ACEOF
11085cat confdefs.h >>conftest.$ac_ext
11086cat >>conftest.$ac_ext <<_ACEOF
11087/* end confdefs.h. */
11088$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011089 typedef pid_t ac__type_sizeof_;
11090static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11091static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011092#include <stdio.h>
11093#include <stdlib.h>
11094int
11095main ()
11096{
11097
11098 FILE *f = fopen ("conftest.val", "w");
11099 if (! f)
11100 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011101 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011102 {
11103 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011104 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011105 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011106 fprintf (f, "%ld\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011107 }
11108 else
11109 {
11110 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011111 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011112 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011113 fprintf (f, "%lu\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011114 }
11115 return ferror (f) || fclose (f) != 0;
11116
11117 ;
11118 return 0;
11119}
11120_ACEOF
11121rm -f conftest$ac_exeext
11122if { (ac_try="$ac_link"
11123case "(($ac_try" in
11124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11125 *) ac_try_echo=$ac_try;;
11126esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011128 (eval "$ac_link") 2>&5
11129 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011131 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11132 { (case "(($ac_try" in
11133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11134 *) ac_try_echo=$ac_try;;
11135esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011137 (eval "$ac_try") 2>&5
11138 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011140 (exit $ac_status); }; }; then
11141 ac_cv_sizeof_pid_t=`cat conftest.val`
11142else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011143 echo "$as_me: program exited with status $ac_status" >&5
11144echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011145sed 's/^/| /' conftest.$ac_ext >&5
11146
11147( exit $ac_status )
11148if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011149 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011150See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011151echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011152See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011153 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011154 else
11155 ac_cv_sizeof_pid_t=0
11156 fi
11157fi
11158rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11159fi
11160rm -f conftest.val
11161fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011162{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11163echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011164
11165
11166
11167cat >>confdefs.h <<_ACEOF
11168#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11169_ACEOF
11170
11171
Michael W. Hudson54241132001-12-07 15:38:26 +000011172
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011173{ echo "$as_me:$LINENO: checking for long long support" >&5
11174echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011175have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011176cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011177/* confdefs.h. */
11178_ACEOF
11179cat confdefs.h >>conftest.$ac_ext
11180cat >>conftest.$ac_ext <<_ACEOF
11181/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011182
Martin v. Löwis11437992002-04-12 09:54:03 +000011183int
11184main ()
11185{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011186long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011187 ;
11188 return 0;
11189}
11190_ACEOF
11191rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011192if { (ac_try="$ac_compile"
11193case "(($ac_try" in
11194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11195 *) ac_try_echo=$ac_try;;
11196esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011198 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011199 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011200 grep -v '^ *+' conftest.er1 >conftest.err
11201 rm -f conftest.er1
11202 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011204 (exit $ac_status); } && {
11205 test -z "$ac_c_werror_flag" ||
11206 test ! -s conftest.err
11207 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011208
11209
11210cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011211#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011212_ACEOF
11213
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011214 have_long_long=yes
11215
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011216else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011217 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011218sed 's/^/| /' conftest.$ac_ext >&5
11219
Martin v. Löwiseba40652007-08-30 20:10:57 +000011220
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011221fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011222
11223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011224{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11225echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011226if test "$have_long_long" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011227{ echo "$as_me:$LINENO: checking for long long" >&5
11228echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11229if test "${ac_cv_type_long_long+set}" = set; then
11230 echo $ECHO_N "(cached) $ECHO_C" >&6
11231else
11232 cat >conftest.$ac_ext <<_ACEOF
11233/* confdefs.h. */
11234_ACEOF
11235cat confdefs.h >>conftest.$ac_ext
11236cat >>conftest.$ac_ext <<_ACEOF
11237/* end confdefs.h. */
11238$ac_includes_default
11239typedef long long ac__type_new_;
11240int
11241main ()
11242{
11243if ((ac__type_new_ *) 0)
11244 return 0;
11245if (sizeof (ac__type_new_))
11246 return 0;
11247 ;
11248 return 0;
11249}
11250_ACEOF
11251rm -f conftest.$ac_objext
11252if { (ac_try="$ac_compile"
11253case "(($ac_try" in
11254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11255 *) ac_try_echo=$ac_try;;
11256esac
11257eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11258 (eval "$ac_compile") 2>conftest.er1
11259 ac_status=$?
11260 grep -v '^ *+' conftest.er1 >conftest.err
11261 rm -f conftest.er1
11262 cat conftest.err >&5
11263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11264 (exit $ac_status); } && {
11265 test -z "$ac_c_werror_flag" ||
11266 test ! -s conftest.err
11267 } && test -s conftest.$ac_objext; then
11268 ac_cv_type_long_long=yes
11269else
11270 echo "$as_me: failed program was:" >&5
11271sed 's/^/| /' conftest.$ac_ext >&5
11272
11273 ac_cv_type_long_long=no
11274fi
11275
11276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11277fi
11278{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11279echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11280
Martin v. Löwiseba40652007-08-30 20:10:57 +000011281# The cast to long int works around a bug in the HP C Compiler
11282# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11283# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11284# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011285{ echo "$as_me:$LINENO: checking size of long long" >&5
11286echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011287if test "${ac_cv_sizeof_long_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011288 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011289else
Martin v. Löwis11437992002-04-12 09:54:03 +000011290 if test "$cross_compiling" = yes; then
11291 # Depending upon the size, compute the lo and hi bounds.
11292cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011293/* confdefs.h. */
11294_ACEOF
11295cat confdefs.h >>conftest.$ac_ext
11296cat >>conftest.$ac_ext <<_ACEOF
11297/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011298$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011299 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011300int
11301main ()
11302{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011303static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011304test_array [0] = 0
11305
11306 ;
11307 return 0;
11308}
11309_ACEOF
11310rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011311if { (ac_try="$ac_compile"
11312case "(($ac_try" in
11313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11314 *) ac_try_echo=$ac_try;;
11315esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011317 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011318 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011319 grep -v '^ *+' conftest.er1 >conftest.err
11320 rm -f conftest.er1
11321 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011323 (exit $ac_status); } && {
11324 test -z "$ac_c_werror_flag" ||
11325 test ! -s conftest.err
11326 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011327 ac_lo=0 ac_mid=0
11328 while :; do
11329 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011330/* confdefs.h. */
11331_ACEOF
11332cat confdefs.h >>conftest.$ac_ext
11333cat >>conftest.$ac_ext <<_ACEOF
11334/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011335$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011336 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011337int
11338main ()
11339{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011340static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011341test_array [0] = 0
11342
11343 ;
11344 return 0;
11345}
11346_ACEOF
11347rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011348if { (ac_try="$ac_compile"
11349case "(($ac_try" in
11350 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11351 *) ac_try_echo=$ac_try;;
11352esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011353eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011354 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011355 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011356 grep -v '^ *+' conftest.er1 >conftest.err
11357 rm -f conftest.er1
11358 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011360 (exit $ac_status); } && {
11361 test -z "$ac_c_werror_flag" ||
11362 test ! -s conftest.err
11363 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011364 ac_hi=$ac_mid; break
11365else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011366 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011367sed 's/^/| /' conftest.$ac_ext >&5
11368
Martin v. Löwiseba40652007-08-30 20:10:57 +000011369 ac_lo=`expr $ac_mid + 1`
11370 if test $ac_lo -le $ac_mid; then
11371 ac_lo= ac_hi=
11372 break
11373 fi
11374 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011375fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011376
11377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011378 done
11379else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011380 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011381sed 's/^/| /' conftest.$ac_ext >&5
11382
Martin v. Löwiseba40652007-08-30 20:10:57 +000011383 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011384/* confdefs.h. */
11385_ACEOF
11386cat confdefs.h >>conftest.$ac_ext
11387cat >>conftest.$ac_ext <<_ACEOF
11388/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011389$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011390 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011391int
11392main ()
11393{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011394static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011395test_array [0] = 0
11396
11397 ;
11398 return 0;
11399}
11400_ACEOF
11401rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011402if { (ac_try="$ac_compile"
11403case "(($ac_try" in
11404 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11405 *) ac_try_echo=$ac_try;;
11406esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011407eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011408 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011409 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011410 grep -v '^ *+' conftest.er1 >conftest.err
11411 rm -f conftest.er1
11412 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011414 (exit $ac_status); } && {
11415 test -z "$ac_c_werror_flag" ||
11416 test ! -s conftest.err
11417 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011418 ac_hi=-1 ac_mid=-1
11419 while :; do
11420 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011421/* confdefs.h. */
11422_ACEOF
11423cat confdefs.h >>conftest.$ac_ext
11424cat >>conftest.$ac_ext <<_ACEOF
11425/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011426$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011427 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011428int
11429main ()
11430{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011431static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011432test_array [0] = 0
11433
11434 ;
11435 return 0;
11436}
11437_ACEOF
11438rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011439if { (ac_try="$ac_compile"
11440case "(($ac_try" in
11441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11442 *) ac_try_echo=$ac_try;;
11443esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011445 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011446 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011447 grep -v '^ *+' conftest.er1 >conftest.err
11448 rm -f conftest.er1
11449 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011451 (exit $ac_status); } && {
11452 test -z "$ac_c_werror_flag" ||
11453 test ! -s conftest.err
11454 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011455 ac_lo=$ac_mid; break
11456else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011457 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011458sed 's/^/| /' conftest.$ac_ext >&5
11459
Martin v. Löwiseba40652007-08-30 20:10:57 +000011460 ac_hi=`expr '(' $ac_mid ')' - 1`
11461 if test $ac_mid -le $ac_hi; then
11462 ac_lo= ac_hi=
11463 break
11464 fi
11465 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011466fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011467
11468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011469 done
11470else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011471 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011472sed 's/^/| /' conftest.$ac_ext >&5
11473
Martin v. Löwiseba40652007-08-30 20:10:57 +000011474 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011475fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011476
11477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011478fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011479
11480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011481# Binary search between lo and hi bounds.
11482while test "x$ac_lo" != "x$ac_hi"; do
11483 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11484 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011485/* confdefs.h. */
11486_ACEOF
11487cat confdefs.h >>conftest.$ac_ext
11488cat >>conftest.$ac_ext <<_ACEOF
11489/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011490$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011491 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011492int
11493main ()
11494{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011495static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011496test_array [0] = 0
11497
11498 ;
11499 return 0;
11500}
11501_ACEOF
11502rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011503if { (ac_try="$ac_compile"
11504case "(($ac_try" in
11505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11506 *) ac_try_echo=$ac_try;;
11507esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011509 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011510 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011511 grep -v '^ *+' conftest.er1 >conftest.err
11512 rm -f conftest.er1
11513 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011515 (exit $ac_status); } && {
11516 test -z "$ac_c_werror_flag" ||
11517 test ! -s conftest.err
11518 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011519 ac_hi=$ac_mid
11520else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011521 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011522sed 's/^/| /' conftest.$ac_ext >&5
11523
Martin v. Löwiseba40652007-08-30 20:10:57 +000011524 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011525fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011526
11527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011528done
11529case $ac_lo in
11530?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011531'') if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011532 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011533See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011534echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011535See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011536 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011537 else
11538 ac_cv_sizeof_long_long=0
11539 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011540esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011541else
Martin v. Löwis11437992002-04-12 09:54:03 +000011542 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011543/* confdefs.h. */
11544_ACEOF
11545cat confdefs.h >>conftest.$ac_ext
11546cat >>conftest.$ac_ext <<_ACEOF
11547/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011548$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011549 typedef long long ac__type_sizeof_;
11550static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11551static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011552#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011553#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011554int
11555main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011556{
Martin v. Löwis11437992002-04-12 09:54:03 +000011557
11558 FILE *f = fopen ("conftest.val", "w");
11559 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011560 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011561 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011562 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011563 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011564 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011565 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011566 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011567 }
11568 else
11569 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011570 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011571 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011572 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011573 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011574 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011575 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011576
11577 ;
11578 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011579}
Martin v. Löwis11437992002-04-12 09:54:03 +000011580_ACEOF
11581rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011582if { (ac_try="$ac_link"
11583case "(($ac_try" in
11584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11585 *) ac_try_echo=$ac_try;;
11586esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011588 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011589 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011591 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011592 { (case "(($ac_try" in
11593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11594 *) ac_try_echo=$ac_try;;
11595esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011597 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011598 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011600 (exit $ac_status); }; }; then
11601 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011602else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011603 echo "$as_me: program exited with status $ac_status" >&5
11604echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011605sed 's/^/| /' conftest.$ac_ext >&5
11606
Martin v. Löwis11437992002-04-12 09:54:03 +000011607( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011608if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011609 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011610See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011611echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011612See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011613 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011614 else
11615 ac_cv_sizeof_long_long=0
11616 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011617fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011618rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011619fi
11620rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011621fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011622{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11623echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011624
11625
11626
Martin v. Löwis11437992002-04-12 09:54:03 +000011627cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011628#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011629_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011630
Michael W. Hudson54241132001-12-07 15:38:26 +000011631
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011632fi
11633
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011634{ echo "$as_me:$LINENO: checking for long double support" >&5
11635echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011636have_long_double=no
11637cat >conftest.$ac_ext <<_ACEOF
11638/* confdefs.h. */
11639_ACEOF
11640cat confdefs.h >>conftest.$ac_ext
11641cat >>conftest.$ac_ext <<_ACEOF
11642/* end confdefs.h. */
11643
11644int
11645main ()
11646{
11647long double x; x = (long double)0.;
11648 ;
11649 return 0;
11650}
11651_ACEOF
11652rm -f conftest.$ac_objext
11653if { (ac_try="$ac_compile"
11654case "(($ac_try" in
11655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11656 *) ac_try_echo=$ac_try;;
11657esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011659 (eval "$ac_compile") 2>conftest.er1
11660 ac_status=$?
11661 grep -v '^ *+' conftest.er1 >conftest.err
11662 rm -f conftest.er1
11663 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011665 (exit $ac_status); } && {
11666 test -z "$ac_c_werror_flag" ||
11667 test ! -s conftest.err
11668 } && test -s conftest.$ac_objext; then
11669
11670
11671cat >>confdefs.h <<\_ACEOF
11672#define HAVE_LONG_DOUBLE 1
11673_ACEOF
11674
11675 have_long_double=yes
11676
11677else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011678 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011679sed 's/^/| /' conftest.$ac_ext >&5
11680
11681
11682fi
11683
11684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011685{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11686echo "${ECHO_T}$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011687if test "$have_long_double" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011688{ echo "$as_me:$LINENO: checking for long double" >&5
11689echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11690if test "${ac_cv_type_long_double+set}" = set; then
11691 echo $ECHO_N "(cached) $ECHO_C" >&6
11692else
11693 cat >conftest.$ac_ext <<_ACEOF
11694/* confdefs.h. */
11695_ACEOF
11696cat confdefs.h >>conftest.$ac_ext
11697cat >>conftest.$ac_ext <<_ACEOF
11698/* end confdefs.h. */
11699$ac_includes_default
11700typedef long double ac__type_new_;
11701int
11702main ()
11703{
11704if ((ac__type_new_ *) 0)
11705 return 0;
11706if (sizeof (ac__type_new_))
11707 return 0;
11708 ;
11709 return 0;
11710}
11711_ACEOF
11712rm -f conftest.$ac_objext
11713if { (ac_try="$ac_compile"
11714case "(($ac_try" in
11715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11716 *) ac_try_echo=$ac_try;;
11717esac
11718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11719 (eval "$ac_compile") 2>conftest.er1
11720 ac_status=$?
11721 grep -v '^ *+' conftest.er1 >conftest.err
11722 rm -f conftest.er1
11723 cat conftest.err >&5
11724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11725 (exit $ac_status); } && {
11726 test -z "$ac_c_werror_flag" ||
11727 test ! -s conftest.err
11728 } && test -s conftest.$ac_objext; then
11729 ac_cv_type_long_double=yes
11730else
11731 echo "$as_me: failed program was:" >&5
11732sed 's/^/| /' conftest.$ac_ext >&5
11733
11734 ac_cv_type_long_double=no
11735fi
11736
11737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11738fi
11739{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11740echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11741
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011742# The cast to long int works around a bug in the HP C Compiler
11743# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11744# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11745# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011746{ echo "$as_me:$LINENO: checking size of long double" >&5
11747echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011748if test "${ac_cv_sizeof_long_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011749 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011750else
11751 if test "$cross_compiling" = yes; then
11752 # Depending upon the size, compute the lo and hi bounds.
11753cat >conftest.$ac_ext <<_ACEOF
11754/* confdefs.h. */
11755_ACEOF
11756cat confdefs.h >>conftest.$ac_ext
11757cat >>conftest.$ac_ext <<_ACEOF
11758/* end confdefs.h. */
11759$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011760 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011761int
11762main ()
11763{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011764static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011765test_array [0] = 0
11766
11767 ;
11768 return 0;
11769}
11770_ACEOF
11771rm -f conftest.$ac_objext
11772if { (ac_try="$ac_compile"
11773case "(($ac_try" in
11774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11775 *) ac_try_echo=$ac_try;;
11776esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011778 (eval "$ac_compile") 2>conftest.er1
11779 ac_status=$?
11780 grep -v '^ *+' conftest.er1 >conftest.err
11781 rm -f conftest.er1
11782 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011784 (exit $ac_status); } && {
11785 test -z "$ac_c_werror_flag" ||
11786 test ! -s conftest.err
11787 } && test -s conftest.$ac_objext; then
11788 ac_lo=0 ac_mid=0
11789 while :; do
11790 cat >conftest.$ac_ext <<_ACEOF
11791/* confdefs.h. */
11792_ACEOF
11793cat confdefs.h >>conftest.$ac_ext
11794cat >>conftest.$ac_ext <<_ACEOF
11795/* end confdefs.h. */
11796$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011797 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011798int
11799main ()
11800{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011801static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011802test_array [0] = 0
11803
11804 ;
11805 return 0;
11806}
11807_ACEOF
11808rm -f conftest.$ac_objext
11809if { (ac_try="$ac_compile"
11810case "(($ac_try" in
11811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11812 *) ac_try_echo=$ac_try;;
11813esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011815 (eval "$ac_compile") 2>conftest.er1
11816 ac_status=$?
11817 grep -v '^ *+' conftest.er1 >conftest.err
11818 rm -f conftest.er1
11819 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011821 (exit $ac_status); } && {
11822 test -z "$ac_c_werror_flag" ||
11823 test ! -s conftest.err
11824 } && test -s conftest.$ac_objext; then
11825 ac_hi=$ac_mid; break
11826else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011827 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011828sed 's/^/| /' conftest.$ac_ext >&5
11829
11830 ac_lo=`expr $ac_mid + 1`
11831 if test $ac_lo -le $ac_mid; then
11832 ac_lo= ac_hi=
11833 break
11834 fi
11835 ac_mid=`expr 2 '*' $ac_mid + 1`
11836fi
11837
11838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11839 done
11840else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011841 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011842sed 's/^/| /' conftest.$ac_ext >&5
11843
11844 cat >conftest.$ac_ext <<_ACEOF
11845/* confdefs.h. */
11846_ACEOF
11847cat confdefs.h >>conftest.$ac_ext
11848cat >>conftest.$ac_ext <<_ACEOF
11849/* end confdefs.h. */
11850$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011851 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011852int
11853main ()
11854{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011855static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011856test_array [0] = 0
11857
11858 ;
11859 return 0;
11860}
11861_ACEOF
11862rm -f conftest.$ac_objext
11863if { (ac_try="$ac_compile"
11864case "(($ac_try" in
11865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11866 *) ac_try_echo=$ac_try;;
11867esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011869 (eval "$ac_compile") 2>conftest.er1
11870 ac_status=$?
11871 grep -v '^ *+' conftest.er1 >conftest.err
11872 rm -f conftest.er1
11873 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011875 (exit $ac_status); } && {
11876 test -z "$ac_c_werror_flag" ||
11877 test ! -s conftest.err
11878 } && test -s conftest.$ac_objext; then
11879 ac_hi=-1 ac_mid=-1
11880 while :; do
11881 cat >conftest.$ac_ext <<_ACEOF
11882/* confdefs.h. */
11883_ACEOF
11884cat confdefs.h >>conftest.$ac_ext
11885cat >>conftest.$ac_ext <<_ACEOF
11886/* end confdefs.h. */
11887$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011888 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011889int
11890main ()
11891{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011892static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011893test_array [0] = 0
11894
11895 ;
11896 return 0;
11897}
11898_ACEOF
11899rm -f conftest.$ac_objext
11900if { (ac_try="$ac_compile"
11901case "(($ac_try" in
11902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11903 *) ac_try_echo=$ac_try;;
11904esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011906 (eval "$ac_compile") 2>conftest.er1
11907 ac_status=$?
11908 grep -v '^ *+' conftest.er1 >conftest.err
11909 rm -f conftest.er1
11910 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011912 (exit $ac_status); } && {
11913 test -z "$ac_c_werror_flag" ||
11914 test ! -s conftest.err
11915 } && test -s conftest.$ac_objext; then
11916 ac_lo=$ac_mid; break
11917else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011918 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011919sed 's/^/| /' conftest.$ac_ext >&5
11920
11921 ac_hi=`expr '(' $ac_mid ')' - 1`
11922 if test $ac_mid -le $ac_hi; then
11923 ac_lo= ac_hi=
11924 break
11925 fi
11926 ac_mid=`expr 2 '*' $ac_mid`
11927fi
11928
11929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11930 done
11931else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011932 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011933sed 's/^/| /' conftest.$ac_ext >&5
11934
11935 ac_lo= ac_hi=
11936fi
11937
11938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11939fi
11940
11941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11942# Binary search between lo and hi bounds.
11943while test "x$ac_lo" != "x$ac_hi"; do
11944 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11945 cat >conftest.$ac_ext <<_ACEOF
11946/* confdefs.h. */
11947_ACEOF
11948cat confdefs.h >>conftest.$ac_ext
11949cat >>conftest.$ac_ext <<_ACEOF
11950/* end confdefs.h. */
11951$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011952 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011953int
11954main ()
11955{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011956static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011957test_array [0] = 0
11958
11959 ;
11960 return 0;
11961}
11962_ACEOF
11963rm -f conftest.$ac_objext
11964if { (ac_try="$ac_compile"
11965case "(($ac_try" in
11966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11967 *) ac_try_echo=$ac_try;;
11968esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011969eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011970 (eval "$ac_compile") 2>conftest.er1
11971 ac_status=$?
11972 grep -v '^ *+' conftest.er1 >conftest.err
11973 rm -f conftest.er1
11974 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011976 (exit $ac_status); } && {
11977 test -z "$ac_c_werror_flag" ||
11978 test ! -s conftest.err
11979 } && test -s conftest.$ac_objext; then
11980 ac_hi=$ac_mid
11981else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011982 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011983sed 's/^/| /' conftest.$ac_ext >&5
11984
11985 ac_lo=`expr '(' $ac_mid ')' + 1`
11986fi
11987
11988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11989done
11990case $ac_lo in
11991?*) ac_cv_sizeof_long_double=$ac_lo;;
11992'') if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011993 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011994See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011995echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011996See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011997 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011998 else
11999 ac_cv_sizeof_long_double=0
12000 fi ;;
12001esac
12002else
12003 cat >conftest.$ac_ext <<_ACEOF
12004/* confdefs.h. */
12005_ACEOF
12006cat confdefs.h >>conftest.$ac_ext
12007cat >>conftest.$ac_ext <<_ACEOF
12008/* end confdefs.h. */
12009$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012010 typedef long double ac__type_sizeof_;
12011static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12012static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012013#include <stdio.h>
12014#include <stdlib.h>
12015int
12016main ()
12017{
12018
12019 FILE *f = fopen ("conftest.val", "w");
12020 if (! f)
12021 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012022 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012023 {
12024 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012025 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012026 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012027 fprintf (f, "%ld\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012028 }
12029 else
12030 {
12031 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012032 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012033 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012034 fprintf (f, "%lu\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012035 }
12036 return ferror (f) || fclose (f) != 0;
12037
12038 ;
12039 return 0;
12040}
12041_ACEOF
12042rm -f conftest$ac_exeext
12043if { (ac_try="$ac_link"
12044case "(($ac_try" in
12045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12046 *) ac_try_echo=$ac_try;;
12047esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012049 (eval "$ac_link") 2>&5
12050 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012052 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12053 { (case "(($ac_try" in
12054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12055 *) ac_try_echo=$ac_try;;
12056esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012058 (eval "$ac_try") 2>&5
12059 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012061 (exit $ac_status); }; }; then
12062 ac_cv_sizeof_long_double=`cat conftest.val`
12063else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012064 echo "$as_me: program exited with status $ac_status" >&5
12065echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012066sed 's/^/| /' conftest.$ac_ext >&5
12067
12068( exit $ac_status )
12069if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012070 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012071See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012072echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012073See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012074 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012075 else
12076 ac_cv_sizeof_long_double=0
12077 fi
12078fi
12079rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12080fi
12081rm -f conftest.val
12082fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012083{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12084echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012085
12086
12087
12088cat >>confdefs.h <<_ACEOF
12089#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12090_ACEOF
12091
12092
12093fi
12094
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012095{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12096echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012097have_c99_bool=no
12098cat >conftest.$ac_ext <<_ACEOF
12099/* confdefs.h. */
12100_ACEOF
12101cat confdefs.h >>conftest.$ac_ext
12102cat >>conftest.$ac_ext <<_ACEOF
12103/* end confdefs.h. */
12104
12105int
12106main ()
12107{
12108_Bool x; x = (_Bool)0;
12109 ;
12110 return 0;
12111}
12112_ACEOF
12113rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012114if { (ac_try="$ac_compile"
12115case "(($ac_try" in
12116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12117 *) ac_try_echo=$ac_try;;
12118esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012120 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012121 ac_status=$?
12122 grep -v '^ *+' conftest.er1 >conftest.err
12123 rm -f conftest.er1
12124 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012126 (exit $ac_status); } && {
12127 test -z "$ac_c_werror_flag" ||
12128 test ! -s conftest.err
12129 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012130
12131
12132cat >>confdefs.h <<\_ACEOF
12133#define HAVE_C99_BOOL 1
12134_ACEOF
12135
12136 have_c99_bool=yes
12137
12138else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012139 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012140sed 's/^/| /' conftest.$ac_ext >&5
12141
Martin v. Löwiseba40652007-08-30 20:10:57 +000012142
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012143fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012144
12145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012146{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12147echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012148if test "$have_c99_bool" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012149{ echo "$as_me:$LINENO: checking for _Bool" >&5
12150echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12151if test "${ac_cv_type__Bool+set}" = set; then
12152 echo $ECHO_N "(cached) $ECHO_C" >&6
12153else
12154 cat >conftest.$ac_ext <<_ACEOF
12155/* confdefs.h. */
12156_ACEOF
12157cat confdefs.h >>conftest.$ac_ext
12158cat >>conftest.$ac_ext <<_ACEOF
12159/* end confdefs.h. */
12160$ac_includes_default
12161typedef _Bool ac__type_new_;
12162int
12163main ()
12164{
12165if ((ac__type_new_ *) 0)
12166 return 0;
12167if (sizeof (ac__type_new_))
12168 return 0;
12169 ;
12170 return 0;
12171}
12172_ACEOF
12173rm -f conftest.$ac_objext
12174if { (ac_try="$ac_compile"
12175case "(($ac_try" in
12176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12177 *) ac_try_echo=$ac_try;;
12178esac
12179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12180 (eval "$ac_compile") 2>conftest.er1
12181 ac_status=$?
12182 grep -v '^ *+' conftest.er1 >conftest.err
12183 rm -f conftest.er1
12184 cat conftest.err >&5
12185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12186 (exit $ac_status); } && {
12187 test -z "$ac_c_werror_flag" ||
12188 test ! -s conftest.err
12189 } && test -s conftest.$ac_objext; then
12190 ac_cv_type__Bool=yes
12191else
12192 echo "$as_me: failed program was:" >&5
12193sed 's/^/| /' conftest.$ac_ext >&5
12194
12195 ac_cv_type__Bool=no
12196fi
12197
12198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12199fi
12200{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12201echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12202
Martin v. Löwiseba40652007-08-30 20:10:57 +000012203# The cast to long int works around a bug in the HP C Compiler
12204# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12205# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12206# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012207{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12208echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012209if test "${ac_cv_sizeof__Bool+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012210 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012211else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012212 if test "$cross_compiling" = yes; then
12213 # Depending upon the size, compute the lo and hi bounds.
12214cat >conftest.$ac_ext <<_ACEOF
12215/* confdefs.h. */
12216_ACEOF
12217cat confdefs.h >>conftest.$ac_ext
12218cat >>conftest.$ac_ext <<_ACEOF
12219/* end confdefs.h. */
12220$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012221 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012222int
12223main ()
12224{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012225static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012226test_array [0] = 0
12227
12228 ;
12229 return 0;
12230}
12231_ACEOF
12232rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012233if { (ac_try="$ac_compile"
12234case "(($ac_try" in
12235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12236 *) ac_try_echo=$ac_try;;
12237esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012239 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012240 ac_status=$?
12241 grep -v '^ *+' conftest.er1 >conftest.err
12242 rm -f conftest.er1
12243 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012245 (exit $ac_status); } && {
12246 test -z "$ac_c_werror_flag" ||
12247 test ! -s conftest.err
12248 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012249 ac_lo=0 ac_mid=0
12250 while :; do
12251 cat >conftest.$ac_ext <<_ACEOF
12252/* confdefs.h. */
12253_ACEOF
12254cat confdefs.h >>conftest.$ac_ext
12255cat >>conftest.$ac_ext <<_ACEOF
12256/* end confdefs.h. */
12257$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012258 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012259int
12260main ()
12261{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012262static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012263test_array [0] = 0
12264
12265 ;
12266 return 0;
12267}
12268_ACEOF
12269rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012270if { (ac_try="$ac_compile"
12271case "(($ac_try" in
12272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12273 *) ac_try_echo=$ac_try;;
12274esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012275eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012276 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012277 ac_status=$?
12278 grep -v '^ *+' conftest.er1 >conftest.err
12279 rm -f conftest.er1
12280 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012282 (exit $ac_status); } && {
12283 test -z "$ac_c_werror_flag" ||
12284 test ! -s conftest.err
12285 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012286 ac_hi=$ac_mid; break
12287else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012288 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012289sed 's/^/| /' conftest.$ac_ext >&5
12290
Martin v. Löwiseba40652007-08-30 20:10:57 +000012291 ac_lo=`expr $ac_mid + 1`
12292 if test $ac_lo -le $ac_mid; then
12293 ac_lo= ac_hi=
12294 break
12295 fi
12296 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012297fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012298
12299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012300 done
12301else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012302 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012303sed 's/^/| /' conftest.$ac_ext >&5
12304
Martin v. Löwiseba40652007-08-30 20:10:57 +000012305 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012306/* confdefs.h. */
12307_ACEOF
12308cat confdefs.h >>conftest.$ac_ext
12309cat >>conftest.$ac_ext <<_ACEOF
12310/* end confdefs.h. */
12311$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012312 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012313int
12314main ()
12315{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012316static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012317test_array [0] = 0
12318
12319 ;
12320 return 0;
12321}
12322_ACEOF
12323rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012324if { (ac_try="$ac_compile"
12325case "(($ac_try" in
12326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12327 *) ac_try_echo=$ac_try;;
12328esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012330 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012331 ac_status=$?
12332 grep -v '^ *+' conftest.er1 >conftest.err
12333 rm -f conftest.er1
12334 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012336 (exit $ac_status); } && {
12337 test -z "$ac_c_werror_flag" ||
12338 test ! -s conftest.err
12339 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012340 ac_hi=-1 ac_mid=-1
12341 while :; do
12342 cat >conftest.$ac_ext <<_ACEOF
12343/* confdefs.h. */
12344_ACEOF
12345cat confdefs.h >>conftest.$ac_ext
12346cat >>conftest.$ac_ext <<_ACEOF
12347/* end confdefs.h. */
12348$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012349 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012350int
12351main ()
12352{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012353static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012354test_array [0] = 0
12355
12356 ;
12357 return 0;
12358}
12359_ACEOF
12360rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012361if { (ac_try="$ac_compile"
12362case "(($ac_try" in
12363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12364 *) ac_try_echo=$ac_try;;
12365esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012367 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012368 ac_status=$?
12369 grep -v '^ *+' conftest.er1 >conftest.err
12370 rm -f conftest.er1
12371 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012373 (exit $ac_status); } && {
12374 test -z "$ac_c_werror_flag" ||
12375 test ! -s conftest.err
12376 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012377 ac_lo=$ac_mid; break
12378else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012379 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012380sed 's/^/| /' conftest.$ac_ext >&5
12381
Martin v. Löwiseba40652007-08-30 20:10:57 +000012382 ac_hi=`expr '(' $ac_mid ')' - 1`
12383 if test $ac_mid -le $ac_hi; then
12384 ac_lo= ac_hi=
12385 break
12386 fi
12387 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012388fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012389
12390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012391 done
12392else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012393 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012394sed 's/^/| /' conftest.$ac_ext >&5
12395
Martin v. Löwiseba40652007-08-30 20:10:57 +000012396 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012397fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012398
12399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012400fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012401
12402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012403# Binary search between lo and hi bounds.
12404while test "x$ac_lo" != "x$ac_hi"; do
12405 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12406 cat >conftest.$ac_ext <<_ACEOF
12407/* confdefs.h. */
12408_ACEOF
12409cat confdefs.h >>conftest.$ac_ext
12410cat >>conftest.$ac_ext <<_ACEOF
12411/* end confdefs.h. */
12412$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012413 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012414int
12415main ()
12416{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012417static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012418test_array [0] = 0
12419
12420 ;
12421 return 0;
12422}
12423_ACEOF
12424rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012425if { (ac_try="$ac_compile"
12426case "(($ac_try" in
12427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12428 *) ac_try_echo=$ac_try;;
12429esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012431 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012432 ac_status=$?
12433 grep -v '^ *+' conftest.er1 >conftest.err
12434 rm -f conftest.er1
12435 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012437 (exit $ac_status); } && {
12438 test -z "$ac_c_werror_flag" ||
12439 test ! -s conftest.err
12440 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012441 ac_hi=$ac_mid
12442else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012443 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012444sed 's/^/| /' conftest.$ac_ext >&5
12445
Martin v. Löwiseba40652007-08-30 20:10:57 +000012446 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012447fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012448
12449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012450done
12451case $ac_lo in
12452?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012453'') if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012454 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012455See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012456echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012457See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012458 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012459 else
12460 ac_cv_sizeof__Bool=0
12461 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012462esac
12463else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012464 cat >conftest.$ac_ext <<_ACEOF
12465/* confdefs.h. */
12466_ACEOF
12467cat confdefs.h >>conftest.$ac_ext
12468cat >>conftest.$ac_ext <<_ACEOF
12469/* end confdefs.h. */
12470$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012471 typedef _Bool ac__type_sizeof_;
12472static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12473static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012474#include <stdio.h>
12475#include <stdlib.h>
12476int
12477main ()
12478{
12479
12480 FILE *f = fopen ("conftest.val", "w");
12481 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012482 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012483 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012484 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012485 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012486 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012487 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012488 fprintf (f, "%ld\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012489 }
12490 else
12491 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012492 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012493 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012494 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012495 fprintf (f, "%lu\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012496 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012497 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012498
12499 ;
12500 return 0;
12501}
12502_ACEOF
12503rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012504if { (ac_try="$ac_link"
12505case "(($ac_try" in
12506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12507 *) ac_try_echo=$ac_try;;
12508esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012510 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012511 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012513 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012514 { (case "(($ac_try" in
12515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12516 *) ac_try_echo=$ac_try;;
12517esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012519 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012520 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012522 (exit $ac_status); }; }; then
12523 ac_cv_sizeof__Bool=`cat conftest.val`
12524else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012525 echo "$as_me: program exited with status $ac_status" >&5
12526echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012527sed 's/^/| /' conftest.$ac_ext >&5
12528
12529( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012530if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012531 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012532See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012533echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012534See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012535 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012536 else
12537 ac_cv_sizeof__Bool=0
12538 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012539fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012540rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012541fi
12542rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012543fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012544{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12545echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012546
12547
12548
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012549cat >>confdefs.h <<_ACEOF
12550#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12551_ACEOF
12552
12553
12554fi
12555
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012556{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12557echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012558if test "${ac_cv_type_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012559 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebe26702006-10-02 14:55:51 +000012560else
12561 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012562/* confdefs.h. */
12563_ACEOF
12564cat confdefs.h >>conftest.$ac_ext
12565cat >>conftest.$ac_ext <<_ACEOF
12566/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012567#ifdef HAVE_STDINT_H
12568 #include <stdint.h>
12569 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012570
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012571typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012572int
12573main ()
12574{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012575if ((ac__type_new_ *) 0)
12576 return 0;
12577if (sizeof (ac__type_new_))
12578 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012579 ;
12580 return 0;
12581}
12582_ACEOF
12583rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012584if { (ac_try="$ac_compile"
12585case "(($ac_try" in
12586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12587 *) ac_try_echo=$ac_try;;
12588esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012590 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012591 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012592 grep -v '^ *+' conftest.er1 >conftest.err
12593 rm -f conftest.er1
12594 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012596 (exit $ac_status); } && {
12597 test -z "$ac_c_werror_flag" ||
12598 test ! -s conftest.err
12599 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012600 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012601else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012602 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012603sed 's/^/| /' conftest.$ac_ext >&5
12604
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012605 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012606fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012607
12608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012609fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012610{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12611echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12612if test $ac_cv_type_uintptr_t = yes; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012613
12614cat >>confdefs.h <<_ACEOF
12615#define HAVE_UINTPTR_T 1
12616_ACEOF
12617
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012618{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12619echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12620if test "${ac_cv_type_uintptr_t+set}" = set; then
12621 echo $ECHO_N "(cached) $ECHO_C" >&6
12622else
12623 cat >conftest.$ac_ext <<_ACEOF
12624/* confdefs.h. */
12625_ACEOF
12626cat confdefs.h >>conftest.$ac_ext
12627cat >>conftest.$ac_ext <<_ACEOF
12628/* end confdefs.h. */
12629$ac_includes_default
12630typedef uintptr_t ac__type_new_;
12631int
12632main ()
12633{
12634if ((ac__type_new_ *) 0)
12635 return 0;
12636if (sizeof (ac__type_new_))
12637 return 0;
12638 ;
12639 return 0;
12640}
12641_ACEOF
12642rm -f conftest.$ac_objext
12643if { (ac_try="$ac_compile"
12644case "(($ac_try" in
12645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12646 *) ac_try_echo=$ac_try;;
12647esac
12648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12649 (eval "$ac_compile") 2>conftest.er1
12650 ac_status=$?
12651 grep -v '^ *+' conftest.er1 >conftest.err
12652 rm -f conftest.er1
12653 cat conftest.err >&5
12654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12655 (exit $ac_status); } && {
12656 test -z "$ac_c_werror_flag" ||
12657 test ! -s conftest.err
12658 } && test -s conftest.$ac_objext; then
12659 ac_cv_type_uintptr_t=yes
12660else
12661 echo "$as_me: failed program was:" >&5
12662sed 's/^/| /' conftest.$ac_ext >&5
12663
12664 ac_cv_type_uintptr_t=no
12665fi
12666
12667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12668fi
12669{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12670echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12671
Martin v. Löwiseba40652007-08-30 20:10:57 +000012672# The cast to long int works around a bug in the HP C Compiler
12673# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12674# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12675# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012676{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12677echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012678if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012679 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012680else
Martin v. Löwis11437992002-04-12 09:54:03 +000012681 if test "$cross_compiling" = yes; then
12682 # Depending upon the size, compute the lo and hi bounds.
12683cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012684/* confdefs.h. */
12685_ACEOF
12686cat confdefs.h >>conftest.$ac_ext
12687cat >>conftest.$ac_ext <<_ACEOF
12688/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012689$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012690 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012691int
12692main ()
12693{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012694static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012695test_array [0] = 0
12696
12697 ;
12698 return 0;
12699}
12700_ACEOF
12701rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012702if { (ac_try="$ac_compile"
12703case "(($ac_try" in
12704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12705 *) ac_try_echo=$ac_try;;
12706esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012708 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012709 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012710 grep -v '^ *+' conftest.er1 >conftest.err
12711 rm -f conftest.er1
12712 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012714 (exit $ac_status); } && {
12715 test -z "$ac_c_werror_flag" ||
12716 test ! -s conftest.err
12717 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012718 ac_lo=0 ac_mid=0
12719 while :; do
12720 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012721/* confdefs.h. */
12722_ACEOF
12723cat confdefs.h >>conftest.$ac_ext
12724cat >>conftest.$ac_ext <<_ACEOF
12725/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012726$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012727 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012728int
12729main ()
12730{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012731static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012732test_array [0] = 0
12733
12734 ;
12735 return 0;
12736}
12737_ACEOF
12738rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012739if { (ac_try="$ac_compile"
12740case "(($ac_try" in
12741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12742 *) ac_try_echo=$ac_try;;
12743esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012745 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012746 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012747 grep -v '^ *+' conftest.er1 >conftest.err
12748 rm -f conftest.er1
12749 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012751 (exit $ac_status); } && {
12752 test -z "$ac_c_werror_flag" ||
12753 test ! -s conftest.err
12754 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012755 ac_hi=$ac_mid; break
12756else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012757 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012758sed 's/^/| /' conftest.$ac_ext >&5
12759
Martin v. Löwiseba40652007-08-30 20:10:57 +000012760 ac_lo=`expr $ac_mid + 1`
12761 if test $ac_lo -le $ac_mid; then
12762 ac_lo= ac_hi=
12763 break
12764 fi
12765 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012766fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012767
12768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012769 done
12770else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012771 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012772sed 's/^/| /' conftest.$ac_ext >&5
12773
Martin v. Löwiseba40652007-08-30 20:10:57 +000012774 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012775/* confdefs.h. */
12776_ACEOF
12777cat confdefs.h >>conftest.$ac_ext
12778cat >>conftest.$ac_ext <<_ACEOF
12779/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012780$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012781 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012782int
12783main ()
12784{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012785static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012786test_array [0] = 0
12787
12788 ;
12789 return 0;
12790}
12791_ACEOF
12792rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012793if { (ac_try="$ac_compile"
12794case "(($ac_try" in
12795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12796 *) ac_try_echo=$ac_try;;
12797esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012799 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012800 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012801 grep -v '^ *+' conftest.er1 >conftest.err
12802 rm -f conftest.er1
12803 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012805 (exit $ac_status); } && {
12806 test -z "$ac_c_werror_flag" ||
12807 test ! -s conftest.err
12808 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012809 ac_hi=-1 ac_mid=-1
12810 while :; do
12811 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012812/* confdefs.h. */
12813_ACEOF
12814cat confdefs.h >>conftest.$ac_ext
12815cat >>conftest.$ac_ext <<_ACEOF
12816/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012817$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012818 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012819int
12820main ()
12821{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012822static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012823test_array [0] = 0
12824
12825 ;
12826 return 0;
12827}
12828_ACEOF
12829rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012830if { (ac_try="$ac_compile"
12831case "(($ac_try" in
12832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12833 *) ac_try_echo=$ac_try;;
12834esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012836 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012837 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012838 grep -v '^ *+' conftest.er1 >conftest.err
12839 rm -f conftest.er1
12840 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012842 (exit $ac_status); } && {
12843 test -z "$ac_c_werror_flag" ||
12844 test ! -s conftest.err
12845 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012846 ac_lo=$ac_mid; break
12847else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012848 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012849sed 's/^/| /' conftest.$ac_ext >&5
12850
Martin v. Löwiseba40652007-08-30 20:10:57 +000012851 ac_hi=`expr '(' $ac_mid ')' - 1`
12852 if test $ac_mid -le $ac_hi; then
12853 ac_lo= ac_hi=
12854 break
12855 fi
12856 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012857fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012858
12859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012860 done
12861else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012862 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012863sed 's/^/| /' conftest.$ac_ext >&5
12864
Martin v. Löwiseba40652007-08-30 20:10:57 +000012865 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012866fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012867
12868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012869fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012870
12871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012872# Binary search between lo and hi bounds.
12873while test "x$ac_lo" != "x$ac_hi"; do
12874 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12875 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012876/* confdefs.h. */
12877_ACEOF
12878cat confdefs.h >>conftest.$ac_ext
12879cat >>conftest.$ac_ext <<_ACEOF
12880/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012881$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012882 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012883int
12884main ()
12885{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012886static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012887test_array [0] = 0
12888
12889 ;
12890 return 0;
12891}
12892_ACEOF
12893rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012894if { (ac_try="$ac_compile"
12895case "(($ac_try" in
12896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12897 *) ac_try_echo=$ac_try;;
12898esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012900 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012901 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012902 grep -v '^ *+' conftest.er1 >conftest.err
12903 rm -f conftest.er1
12904 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012906 (exit $ac_status); } && {
12907 test -z "$ac_c_werror_flag" ||
12908 test ! -s conftest.err
12909 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012910 ac_hi=$ac_mid
12911else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012912 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012913sed 's/^/| /' conftest.$ac_ext >&5
12914
Martin v. Löwiseba40652007-08-30 20:10:57 +000012915 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012916fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012917
12918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012919done
12920case $ac_lo in
12921?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012922'') if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012923 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012924See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012925echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012926See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012927 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012928 else
12929 ac_cv_sizeof_uintptr_t=0
12930 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012931esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012932else
Martin v. Löwis11437992002-04-12 09:54:03 +000012933 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012934/* confdefs.h. */
12935_ACEOF
12936cat confdefs.h >>conftest.$ac_ext
12937cat >>conftest.$ac_ext <<_ACEOF
12938/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012939$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012940 typedef uintptr_t ac__type_sizeof_;
12941static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12942static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012943#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012944#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012945int
12946main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012947{
Martin v. Löwis11437992002-04-12 09:54:03 +000012948
12949 FILE *f = fopen ("conftest.val", "w");
12950 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012951 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012952 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012953 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012954 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012955 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012956 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012957 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012958 }
12959 else
12960 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012961 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012962 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012963 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012964 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012965 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012966 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012967
12968 ;
12969 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012970}
Martin v. Löwis11437992002-04-12 09:54:03 +000012971_ACEOF
12972rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012973if { (ac_try="$ac_link"
12974case "(($ac_try" in
12975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12976 *) ac_try_echo=$ac_try;;
12977esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012979 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012980 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012982 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012983 { (case "(($ac_try" in
12984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12985 *) ac_try_echo=$ac_try;;
12986esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012988 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012989 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012991 (exit $ac_status); }; }; then
12992 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012993else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012994 echo "$as_me: program exited with status $ac_status" >&5
12995echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012996sed 's/^/| /' conftest.$ac_ext >&5
12997
Martin v. Löwis11437992002-04-12 09:54:03 +000012998( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012999if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013000 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013001See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013002echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013003See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013004 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013005 else
13006 ac_cv_sizeof_uintptr_t=0
13007 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013008fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013009rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013010fi
13011rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013012fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013013{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13014echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013015
13016
13017
Martin v. Löwis11437992002-04-12 09:54:03 +000013018cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013019#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013020_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013021
Michael W. Hudson54241132001-12-07 15:38:26 +000013022
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013023fi
13024
Martin v. Löwisebe26702006-10-02 14:55:51 +000013025
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013026{ echo "$as_me:$LINENO: checking for off_t" >&5
13027echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
13028if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013029 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013030else
Martin v. Löwis11437992002-04-12 09:54:03 +000013031 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013032/* confdefs.h. */
13033_ACEOF
13034cat confdefs.h >>conftest.$ac_ext
13035cat >>conftest.$ac_ext <<_ACEOF
13036/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013037
13038#ifdef HAVE_SYS_TYPES_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013039#include <sys/types.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013040#endif
13041
13042
13043typedef off_t ac__type_new_;
13044int
13045main ()
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013046{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013047if ((ac__type_new_ *) 0)
13048 return 0;
13049if (sizeof (ac__type_new_))
13050 return 0;
13051 ;
13052 return 0;
13053}
13054_ACEOF
13055rm -f conftest.$ac_objext
13056if { (ac_try="$ac_compile"
13057case "(($ac_try" in
13058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13059 *) ac_try_echo=$ac_try;;
13060esac
13061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13062 (eval "$ac_compile") 2>conftest.er1
13063 ac_status=$?
13064 grep -v '^ *+' conftest.er1 >conftest.err
13065 rm -f conftest.er1
13066 cat conftest.err >&5
13067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13068 (exit $ac_status); } && {
13069 test -z "$ac_c_werror_flag" ||
13070 test ! -s conftest.err
13071 } && test -s conftest.$ac_objext; then
13072 ac_cv_type_off_t=yes
13073else
13074 echo "$as_me: failed program was:" >&5
13075sed 's/^/| /' conftest.$ac_ext >&5
13076
13077 ac_cv_type_off_t=no
13078fi
13079
13080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13081fi
13082{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13083echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13084
13085# The cast to long int works around a bug in the HP C Compiler
13086# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13087# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13088# This bug is HP SR number 8606223364.
13089{ echo "$as_me:$LINENO: checking size of off_t" >&5
13090echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
13091if test "${ac_cv_sizeof_off_t+set}" = set; then
13092 echo $ECHO_N "(cached) $ECHO_C" >&6
13093else
13094 if test "$cross_compiling" = yes; then
13095 # Depending upon the size, compute the lo and hi bounds.
13096cat >conftest.$ac_ext <<_ACEOF
13097/* confdefs.h. */
13098_ACEOF
13099cat confdefs.h >>conftest.$ac_ext
13100cat >>conftest.$ac_ext <<_ACEOF
13101/* end confdefs.h. */
13102
13103#ifdef HAVE_SYS_TYPES_H
13104#include <sys/types.h>
13105#endif
13106
13107
13108 typedef off_t ac__type_sizeof_;
13109int
13110main ()
13111{
13112static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13113test_array [0] = 0
13114
13115 ;
13116 return 0;
13117}
13118_ACEOF
13119rm -f conftest.$ac_objext
13120if { (ac_try="$ac_compile"
13121case "(($ac_try" in
13122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13123 *) ac_try_echo=$ac_try;;
13124esac
13125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13126 (eval "$ac_compile") 2>conftest.er1
13127 ac_status=$?
13128 grep -v '^ *+' conftest.er1 >conftest.err
13129 rm -f conftest.er1
13130 cat conftest.err >&5
13131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13132 (exit $ac_status); } && {
13133 test -z "$ac_c_werror_flag" ||
13134 test ! -s conftest.err
13135 } && test -s conftest.$ac_objext; then
13136 ac_lo=0 ac_mid=0
13137 while :; do
13138 cat >conftest.$ac_ext <<_ACEOF
13139/* confdefs.h. */
13140_ACEOF
13141cat confdefs.h >>conftest.$ac_ext
13142cat >>conftest.$ac_ext <<_ACEOF
13143/* end confdefs.h. */
13144
13145#ifdef HAVE_SYS_TYPES_H
13146#include <sys/types.h>
13147#endif
13148
13149
13150 typedef off_t ac__type_sizeof_;
13151int
13152main ()
13153{
13154static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13155test_array [0] = 0
13156
13157 ;
13158 return 0;
13159}
13160_ACEOF
13161rm -f conftest.$ac_objext
13162if { (ac_try="$ac_compile"
13163case "(($ac_try" in
13164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13165 *) ac_try_echo=$ac_try;;
13166esac
13167eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13168 (eval "$ac_compile") 2>conftest.er1
13169 ac_status=$?
13170 grep -v '^ *+' conftest.er1 >conftest.err
13171 rm -f conftest.er1
13172 cat conftest.err >&5
13173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13174 (exit $ac_status); } && {
13175 test -z "$ac_c_werror_flag" ||
13176 test ! -s conftest.err
13177 } && test -s conftest.$ac_objext; then
13178 ac_hi=$ac_mid; break
13179else
13180 echo "$as_me: failed program was:" >&5
13181sed 's/^/| /' conftest.$ac_ext >&5
13182
13183 ac_lo=`expr $ac_mid + 1`
13184 if test $ac_lo -le $ac_mid; then
13185 ac_lo= ac_hi=
13186 break
13187 fi
13188 ac_mid=`expr 2 '*' $ac_mid + 1`
13189fi
13190
13191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13192 done
13193else
13194 echo "$as_me: failed program was:" >&5
13195sed 's/^/| /' conftest.$ac_ext >&5
13196
13197 cat >conftest.$ac_ext <<_ACEOF
13198/* confdefs.h. */
13199_ACEOF
13200cat confdefs.h >>conftest.$ac_ext
13201cat >>conftest.$ac_ext <<_ACEOF
13202/* end confdefs.h. */
13203
13204#ifdef HAVE_SYS_TYPES_H
13205#include <sys/types.h>
13206#endif
13207
13208
13209 typedef off_t ac__type_sizeof_;
13210int
13211main ()
13212{
13213static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13214test_array [0] = 0
13215
13216 ;
13217 return 0;
13218}
13219_ACEOF
13220rm -f conftest.$ac_objext
13221if { (ac_try="$ac_compile"
13222case "(($ac_try" in
13223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13224 *) ac_try_echo=$ac_try;;
13225esac
13226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13227 (eval "$ac_compile") 2>conftest.er1
13228 ac_status=$?
13229 grep -v '^ *+' conftest.er1 >conftest.err
13230 rm -f conftest.er1
13231 cat conftest.err >&5
13232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13233 (exit $ac_status); } && {
13234 test -z "$ac_c_werror_flag" ||
13235 test ! -s conftest.err
13236 } && test -s conftest.$ac_objext; then
13237 ac_hi=-1 ac_mid=-1
13238 while :; do
13239 cat >conftest.$ac_ext <<_ACEOF
13240/* confdefs.h. */
13241_ACEOF
13242cat confdefs.h >>conftest.$ac_ext
13243cat >>conftest.$ac_ext <<_ACEOF
13244/* end confdefs.h. */
13245
13246#ifdef HAVE_SYS_TYPES_H
13247#include <sys/types.h>
13248#endif
13249
13250
13251 typedef off_t ac__type_sizeof_;
13252int
13253main ()
13254{
13255static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13256test_array [0] = 0
13257
13258 ;
13259 return 0;
13260}
13261_ACEOF
13262rm -f conftest.$ac_objext
13263if { (ac_try="$ac_compile"
13264case "(($ac_try" in
13265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13266 *) ac_try_echo=$ac_try;;
13267esac
13268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13269 (eval "$ac_compile") 2>conftest.er1
13270 ac_status=$?
13271 grep -v '^ *+' conftest.er1 >conftest.err
13272 rm -f conftest.er1
13273 cat conftest.err >&5
13274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13275 (exit $ac_status); } && {
13276 test -z "$ac_c_werror_flag" ||
13277 test ! -s conftest.err
13278 } && test -s conftest.$ac_objext; then
13279 ac_lo=$ac_mid; break
13280else
13281 echo "$as_me: failed program was:" >&5
13282sed 's/^/| /' conftest.$ac_ext >&5
13283
13284 ac_hi=`expr '(' $ac_mid ')' - 1`
13285 if test $ac_mid -le $ac_hi; then
13286 ac_lo= ac_hi=
13287 break
13288 fi
13289 ac_mid=`expr 2 '*' $ac_mid`
13290fi
13291
13292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13293 done
13294else
13295 echo "$as_me: failed program was:" >&5
13296sed 's/^/| /' conftest.$ac_ext >&5
13297
13298 ac_lo= ac_hi=
13299fi
13300
13301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13302fi
13303
13304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13305# Binary search between lo and hi bounds.
13306while test "x$ac_lo" != "x$ac_hi"; do
13307 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13308 cat >conftest.$ac_ext <<_ACEOF
13309/* confdefs.h. */
13310_ACEOF
13311cat confdefs.h >>conftest.$ac_ext
13312cat >>conftest.$ac_ext <<_ACEOF
13313/* end confdefs.h. */
13314
13315#ifdef HAVE_SYS_TYPES_H
13316#include <sys/types.h>
13317#endif
13318
13319
13320 typedef off_t ac__type_sizeof_;
13321int
13322main ()
13323{
13324static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13325test_array [0] = 0
13326
13327 ;
13328 return 0;
13329}
13330_ACEOF
13331rm -f conftest.$ac_objext
13332if { (ac_try="$ac_compile"
13333case "(($ac_try" in
13334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13335 *) ac_try_echo=$ac_try;;
13336esac
13337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13338 (eval "$ac_compile") 2>conftest.er1
13339 ac_status=$?
13340 grep -v '^ *+' conftest.er1 >conftest.err
13341 rm -f conftest.er1
13342 cat conftest.err >&5
13343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13344 (exit $ac_status); } && {
13345 test -z "$ac_c_werror_flag" ||
13346 test ! -s conftest.err
13347 } && test -s conftest.$ac_objext; then
13348 ac_hi=$ac_mid
13349else
13350 echo "$as_me: failed program was:" >&5
13351sed 's/^/| /' conftest.$ac_ext >&5
13352
13353 ac_lo=`expr '(' $ac_mid ')' + 1`
13354fi
13355
13356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13357done
13358case $ac_lo in
13359?*) ac_cv_sizeof_off_t=$ac_lo;;
13360'') if test "$ac_cv_type_off_t" = yes; then
13361 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13362See \`config.log' for more details." >&5
13363echo "$as_me: error: cannot compute sizeof (off_t)
13364See \`config.log' for more details." >&2;}
13365 { (exit 77); exit 77; }; }
13366 else
13367 ac_cv_sizeof_off_t=0
13368 fi ;;
13369esac
13370else
13371 cat >conftest.$ac_ext <<_ACEOF
13372/* confdefs.h. */
13373_ACEOF
13374cat confdefs.h >>conftest.$ac_ext
13375cat >>conftest.$ac_ext <<_ACEOF
13376/* end confdefs.h. */
13377
13378#ifdef HAVE_SYS_TYPES_H
13379#include <sys/types.h>
13380#endif
13381
13382
13383 typedef off_t ac__type_sizeof_;
13384static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13385static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13386#include <stdio.h>
13387#include <stdlib.h>
13388int
13389main ()
13390{
13391
13392 FILE *f = fopen ("conftest.val", "w");
13393 if (! f)
13394 return 1;
13395 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13396 {
13397 long int i = longval ();
13398 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13399 return 1;
13400 fprintf (f, "%ld\n", i);
13401 }
13402 else
13403 {
13404 unsigned long int i = ulongval ();
13405 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13406 return 1;
13407 fprintf (f, "%lu\n", i);
13408 }
13409 return ferror (f) || fclose (f) != 0;
13410
13411 ;
13412 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013413}
Martin v. Löwis11437992002-04-12 09:54:03 +000013414_ACEOF
13415rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013416if { (ac_try="$ac_link"
13417case "(($ac_try" in
13418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13419 *) ac_try_echo=$ac_try;;
13420esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013422 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013423 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013425 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013426 { (case "(($ac_try" in
13427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13428 *) ac_try_echo=$ac_try;;
13429esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013431 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013432 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013434 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013435 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013436else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013437 echo "$as_me: program exited with status $ac_status" >&5
13438echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013439sed 's/^/| /' conftest.$ac_ext >&5
13440
Martin v. Löwis11437992002-04-12 09:54:03 +000013441( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013442if test "$ac_cv_type_off_t" = yes; then
13443 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13444See \`config.log' for more details." >&5
13445echo "$as_me: error: cannot compute sizeof (off_t)
13446See \`config.log' for more details." >&2;}
13447 { (exit 77); exit 77; }; }
13448 else
13449 ac_cv_sizeof_off_t=0
13450 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013451fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013452rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013453fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013454rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013455fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013456{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13457echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013458
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013459
13460
Martin v. Löwis11437992002-04-12 09:54:03 +000013461cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013462#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013463_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013464
Michael W. Hudson54241132001-12-07 15:38:26 +000013465
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013466
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013467{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13468echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013469if test "$have_long_long" = yes -a \
13470 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
13471 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013472
Martin v. Löwis11437992002-04-12 09:54:03 +000013473cat >>confdefs.h <<\_ACEOF
13474#define HAVE_LARGEFILE_SUPPORT 1
13475_ACEOF
13476
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013477 { echo "$as_me:$LINENO: result: yes" >&5
13478echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013479else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013480 { echo "$as_me:$LINENO: result: no" >&5
13481echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013482fi
13483
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013484{ echo "$as_me:$LINENO: checking for time_t" >&5
13485echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13486if test "${ac_cv_type_time_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013487 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013488else
Martin v. Löwis11437992002-04-12 09:54:03 +000013489 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013490/* confdefs.h. */
13491_ACEOF
13492cat confdefs.h >>conftest.$ac_ext
13493cat >>conftest.$ac_ext <<_ACEOF
13494/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013495
13496#ifdef HAVE_SYS_TYPES_H
13497#include <sys/types.h>
13498#endif
13499#ifdef HAVE_TIME_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013500#include <time.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013501#endif
13502
13503
13504typedef time_t ac__type_new_;
13505int
13506main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013507{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013508if ((ac__type_new_ *) 0)
13509 return 0;
13510if (sizeof (ac__type_new_))
13511 return 0;
13512 ;
13513 return 0;
13514}
13515_ACEOF
13516rm -f conftest.$ac_objext
13517if { (ac_try="$ac_compile"
13518case "(($ac_try" in
13519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13520 *) ac_try_echo=$ac_try;;
13521esac
13522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13523 (eval "$ac_compile") 2>conftest.er1
13524 ac_status=$?
13525 grep -v '^ *+' conftest.er1 >conftest.err
13526 rm -f conftest.er1
13527 cat conftest.err >&5
13528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13529 (exit $ac_status); } && {
13530 test -z "$ac_c_werror_flag" ||
13531 test ! -s conftest.err
13532 } && test -s conftest.$ac_objext; then
13533 ac_cv_type_time_t=yes
13534else
13535 echo "$as_me: failed program was:" >&5
13536sed 's/^/| /' conftest.$ac_ext >&5
13537
13538 ac_cv_type_time_t=no
13539fi
13540
13541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13542fi
13543{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13544echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13545
13546# The cast to long int works around a bug in the HP C Compiler
13547# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13548# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13549# This bug is HP SR number 8606223364.
13550{ echo "$as_me:$LINENO: checking size of time_t" >&5
13551echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
13552if test "${ac_cv_sizeof_time_t+set}" = set; then
13553 echo $ECHO_N "(cached) $ECHO_C" >&6
13554else
13555 if test "$cross_compiling" = yes; then
13556 # Depending upon the size, compute the lo and hi bounds.
13557cat >conftest.$ac_ext <<_ACEOF
13558/* confdefs.h. */
13559_ACEOF
13560cat confdefs.h >>conftest.$ac_ext
13561cat >>conftest.$ac_ext <<_ACEOF
13562/* end confdefs.h. */
13563
13564#ifdef HAVE_SYS_TYPES_H
13565#include <sys/types.h>
13566#endif
13567#ifdef HAVE_TIME_H
13568#include <time.h>
13569#endif
13570
13571
13572 typedef time_t ac__type_sizeof_;
13573int
13574main ()
13575{
13576static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13577test_array [0] = 0
13578
13579 ;
13580 return 0;
13581}
13582_ACEOF
13583rm -f conftest.$ac_objext
13584if { (ac_try="$ac_compile"
13585case "(($ac_try" in
13586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13587 *) ac_try_echo=$ac_try;;
13588esac
13589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13590 (eval "$ac_compile") 2>conftest.er1
13591 ac_status=$?
13592 grep -v '^ *+' conftest.er1 >conftest.err
13593 rm -f conftest.er1
13594 cat conftest.err >&5
13595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13596 (exit $ac_status); } && {
13597 test -z "$ac_c_werror_flag" ||
13598 test ! -s conftest.err
13599 } && test -s conftest.$ac_objext; then
13600 ac_lo=0 ac_mid=0
13601 while :; do
13602 cat >conftest.$ac_ext <<_ACEOF
13603/* confdefs.h. */
13604_ACEOF
13605cat confdefs.h >>conftest.$ac_ext
13606cat >>conftest.$ac_ext <<_ACEOF
13607/* end confdefs.h. */
13608
13609#ifdef HAVE_SYS_TYPES_H
13610#include <sys/types.h>
13611#endif
13612#ifdef HAVE_TIME_H
13613#include <time.h>
13614#endif
13615
13616
13617 typedef time_t ac__type_sizeof_;
13618int
13619main ()
13620{
13621static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13622test_array [0] = 0
13623
13624 ;
13625 return 0;
13626}
13627_ACEOF
13628rm -f conftest.$ac_objext
13629if { (ac_try="$ac_compile"
13630case "(($ac_try" in
13631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13632 *) ac_try_echo=$ac_try;;
13633esac
13634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13635 (eval "$ac_compile") 2>conftest.er1
13636 ac_status=$?
13637 grep -v '^ *+' conftest.er1 >conftest.err
13638 rm -f conftest.er1
13639 cat conftest.err >&5
13640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13641 (exit $ac_status); } && {
13642 test -z "$ac_c_werror_flag" ||
13643 test ! -s conftest.err
13644 } && test -s conftest.$ac_objext; then
13645 ac_hi=$ac_mid; break
13646else
13647 echo "$as_me: failed program was:" >&5
13648sed 's/^/| /' conftest.$ac_ext >&5
13649
13650 ac_lo=`expr $ac_mid + 1`
13651 if test $ac_lo -le $ac_mid; then
13652 ac_lo= ac_hi=
13653 break
13654 fi
13655 ac_mid=`expr 2 '*' $ac_mid + 1`
13656fi
13657
13658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13659 done
13660else
13661 echo "$as_me: failed program was:" >&5
13662sed 's/^/| /' conftest.$ac_ext >&5
13663
13664 cat >conftest.$ac_ext <<_ACEOF
13665/* confdefs.h. */
13666_ACEOF
13667cat confdefs.h >>conftest.$ac_ext
13668cat >>conftest.$ac_ext <<_ACEOF
13669/* end confdefs.h. */
13670
13671#ifdef HAVE_SYS_TYPES_H
13672#include <sys/types.h>
13673#endif
13674#ifdef HAVE_TIME_H
13675#include <time.h>
13676#endif
13677
13678
13679 typedef time_t ac__type_sizeof_;
13680int
13681main ()
13682{
13683static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13684test_array [0] = 0
13685
13686 ;
13687 return 0;
13688}
13689_ACEOF
13690rm -f conftest.$ac_objext
13691if { (ac_try="$ac_compile"
13692case "(($ac_try" in
13693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13694 *) ac_try_echo=$ac_try;;
13695esac
13696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13697 (eval "$ac_compile") 2>conftest.er1
13698 ac_status=$?
13699 grep -v '^ *+' conftest.er1 >conftest.err
13700 rm -f conftest.er1
13701 cat conftest.err >&5
13702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13703 (exit $ac_status); } && {
13704 test -z "$ac_c_werror_flag" ||
13705 test ! -s conftest.err
13706 } && test -s conftest.$ac_objext; then
13707 ac_hi=-1 ac_mid=-1
13708 while :; do
13709 cat >conftest.$ac_ext <<_ACEOF
13710/* confdefs.h. */
13711_ACEOF
13712cat confdefs.h >>conftest.$ac_ext
13713cat >>conftest.$ac_ext <<_ACEOF
13714/* end confdefs.h. */
13715
13716#ifdef HAVE_SYS_TYPES_H
13717#include <sys/types.h>
13718#endif
13719#ifdef HAVE_TIME_H
13720#include <time.h>
13721#endif
13722
13723
13724 typedef time_t ac__type_sizeof_;
13725int
13726main ()
13727{
13728static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13729test_array [0] = 0
13730
13731 ;
13732 return 0;
13733}
13734_ACEOF
13735rm -f conftest.$ac_objext
13736if { (ac_try="$ac_compile"
13737case "(($ac_try" in
13738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13739 *) ac_try_echo=$ac_try;;
13740esac
13741eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13742 (eval "$ac_compile") 2>conftest.er1
13743 ac_status=$?
13744 grep -v '^ *+' conftest.er1 >conftest.err
13745 rm -f conftest.er1
13746 cat conftest.err >&5
13747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13748 (exit $ac_status); } && {
13749 test -z "$ac_c_werror_flag" ||
13750 test ! -s conftest.err
13751 } && test -s conftest.$ac_objext; then
13752 ac_lo=$ac_mid; break
13753else
13754 echo "$as_me: failed program was:" >&5
13755sed 's/^/| /' conftest.$ac_ext >&5
13756
13757 ac_hi=`expr '(' $ac_mid ')' - 1`
13758 if test $ac_mid -le $ac_hi; then
13759 ac_lo= ac_hi=
13760 break
13761 fi
13762 ac_mid=`expr 2 '*' $ac_mid`
13763fi
13764
13765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13766 done
13767else
13768 echo "$as_me: failed program was:" >&5
13769sed 's/^/| /' conftest.$ac_ext >&5
13770
13771 ac_lo= ac_hi=
13772fi
13773
13774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13775fi
13776
13777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13778# Binary search between lo and hi bounds.
13779while test "x$ac_lo" != "x$ac_hi"; do
13780 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13781 cat >conftest.$ac_ext <<_ACEOF
13782/* confdefs.h. */
13783_ACEOF
13784cat confdefs.h >>conftest.$ac_ext
13785cat >>conftest.$ac_ext <<_ACEOF
13786/* end confdefs.h. */
13787
13788#ifdef HAVE_SYS_TYPES_H
13789#include <sys/types.h>
13790#endif
13791#ifdef HAVE_TIME_H
13792#include <time.h>
13793#endif
13794
13795
13796 typedef time_t ac__type_sizeof_;
13797int
13798main ()
13799{
13800static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13801test_array [0] = 0
13802
13803 ;
13804 return 0;
13805}
13806_ACEOF
13807rm -f conftest.$ac_objext
13808if { (ac_try="$ac_compile"
13809case "(($ac_try" in
13810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13811 *) ac_try_echo=$ac_try;;
13812esac
13813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13814 (eval "$ac_compile") 2>conftest.er1
13815 ac_status=$?
13816 grep -v '^ *+' conftest.er1 >conftest.err
13817 rm -f conftest.er1
13818 cat conftest.err >&5
13819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13820 (exit $ac_status); } && {
13821 test -z "$ac_c_werror_flag" ||
13822 test ! -s conftest.err
13823 } && test -s conftest.$ac_objext; then
13824 ac_hi=$ac_mid
13825else
13826 echo "$as_me: failed program was:" >&5
13827sed 's/^/| /' conftest.$ac_ext >&5
13828
13829 ac_lo=`expr '(' $ac_mid ')' + 1`
13830fi
13831
13832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13833done
13834case $ac_lo in
13835?*) ac_cv_sizeof_time_t=$ac_lo;;
13836'') if test "$ac_cv_type_time_t" = yes; then
13837 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13838See \`config.log' for more details." >&5
13839echo "$as_me: error: cannot compute sizeof (time_t)
13840See \`config.log' for more details." >&2;}
13841 { (exit 77); exit 77; }; }
13842 else
13843 ac_cv_sizeof_time_t=0
13844 fi ;;
13845esac
13846else
13847 cat >conftest.$ac_ext <<_ACEOF
13848/* confdefs.h. */
13849_ACEOF
13850cat confdefs.h >>conftest.$ac_ext
13851cat >>conftest.$ac_ext <<_ACEOF
13852/* end confdefs.h. */
13853
13854#ifdef HAVE_SYS_TYPES_H
13855#include <sys/types.h>
13856#endif
13857#ifdef HAVE_TIME_H
13858#include <time.h>
13859#endif
13860
13861
13862 typedef time_t ac__type_sizeof_;
13863static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13864static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13865#include <stdio.h>
13866#include <stdlib.h>
13867int
13868main ()
13869{
13870
13871 FILE *f = fopen ("conftest.val", "w");
13872 if (! f)
13873 return 1;
13874 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13875 {
13876 long int i = longval ();
13877 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13878 return 1;
13879 fprintf (f, "%ld\n", i);
13880 }
13881 else
13882 {
13883 unsigned long int i = ulongval ();
13884 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13885 return 1;
13886 fprintf (f, "%lu\n", i);
13887 }
13888 return ferror (f) || fclose (f) != 0;
13889
13890 ;
13891 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013892}
Martin v. Löwis11437992002-04-12 09:54:03 +000013893_ACEOF
13894rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013895if { (ac_try="$ac_link"
13896case "(($ac_try" in
13897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13898 *) ac_try_echo=$ac_try;;
13899esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013901 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013902 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013904 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013905 { (case "(($ac_try" in
13906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13907 *) ac_try_echo=$ac_try;;
13908esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013910 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013911 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013913 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013914 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013915else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013916 echo "$as_me: program exited with status $ac_status" >&5
13917echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013918sed 's/^/| /' conftest.$ac_ext >&5
13919
Martin v. Löwis11437992002-04-12 09:54:03 +000013920( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013921if test "$ac_cv_type_time_t" = yes; then
13922 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13923See \`config.log' for more details." >&5
13924echo "$as_me: error: cannot compute sizeof (time_t)
13925See \`config.log' for more details." >&2;}
13926 { (exit 77); exit 77; }; }
13927 else
13928 ac_cv_sizeof_time_t=0
13929 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013930fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013931rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013932fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013933rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013934fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013935{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13936echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013937
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013938
13939
Martin v. Löwis11437992002-04-12 09:54:03 +000013940cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013941#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013942_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013943
Michael W. Hudson54241132001-12-07 15:38:26 +000013944
13945
Trent Mick635f6fb2000-08-23 21:33:05 +000013946# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013947ac_save_cc="$CC"
13948if test "$ac_cv_kpthread" = "yes"
13949then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013950elif test "$ac_cv_kthread" = "yes"
13951then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013952elif test "$ac_cv_pthread" = "yes"
13953then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013954fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013955{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13956echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013957have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013958cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013959/* confdefs.h. */
13960_ACEOF
13961cat confdefs.h >>conftest.$ac_ext
13962cat >>conftest.$ac_ext <<_ACEOF
13963/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013964#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013965int
13966main ()
13967{
Guido van Rossum12580492000-09-24 16:47:19 +000013968pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013969 ;
13970 return 0;
13971}
13972_ACEOF
13973rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013974if { (ac_try="$ac_compile"
13975case "(($ac_try" in
13976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13977 *) ac_try_echo=$ac_try;;
13978esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013980 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013981 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013982 grep -v '^ *+' conftest.er1 >conftest.err
13983 rm -f conftest.er1
13984 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013986 (exit $ac_status); } && {
13987 test -z "$ac_c_werror_flag" ||
13988 test ! -s conftest.err
13989 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013990 have_pthread_t=yes
13991else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013992 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013993sed 's/^/| /' conftest.$ac_ext >&5
13994
Martin v. Löwiseba40652007-08-30 20:10:57 +000013995
Trent Mick635f6fb2000-08-23 21:33:05 +000013996fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013997
13998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013999{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
14000echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014001if test "$have_pthread_t" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014002 { echo "$as_me:$LINENO: checking for pthread_t" >&5
14003echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
14004if test "${ac_cv_type_pthread_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014005 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000014006else
Martin v. Löwis11437992002-04-12 09:54:03 +000014007 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014008/* confdefs.h. */
14009_ACEOF
14010cat confdefs.h >>conftest.$ac_ext
14011cat >>conftest.$ac_ext <<_ACEOF
14012/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014013
14014#ifdef HAVE_PTHREAD_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014015#include <pthread.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014016#endif
14017
14018
14019typedef pthread_t ac__type_new_;
14020int
14021main ()
14022{
14023if ((ac__type_new_ *) 0)
14024 return 0;
14025if (sizeof (ac__type_new_))
14026 return 0;
14027 ;
14028 return 0;
14029}
14030_ACEOF
14031rm -f conftest.$ac_objext
14032if { (ac_try="$ac_compile"
14033case "(($ac_try" in
14034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14035 *) ac_try_echo=$ac_try;;
14036esac
14037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14038 (eval "$ac_compile") 2>conftest.er1
14039 ac_status=$?
14040 grep -v '^ *+' conftest.er1 >conftest.err
14041 rm -f conftest.er1
14042 cat conftest.err >&5
14043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14044 (exit $ac_status); } && {
14045 test -z "$ac_c_werror_flag" ||
14046 test ! -s conftest.err
14047 } && test -s conftest.$ac_objext; then
14048 ac_cv_type_pthread_t=yes
14049else
14050 echo "$as_me: failed program was:" >&5
14051sed 's/^/| /' conftest.$ac_ext >&5
14052
14053 ac_cv_type_pthread_t=no
14054fi
14055
14056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14057fi
14058{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14059echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14060
14061# The cast to long int works around a bug in the HP C Compiler
14062# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14063# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14064# This bug is HP SR number 8606223364.
14065{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14066echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
14067if test "${ac_cv_sizeof_pthread_t+set}" = set; then
14068 echo $ECHO_N "(cached) $ECHO_C" >&6
14069else
14070 if test "$cross_compiling" = yes; then
14071 # Depending upon the size, compute the lo and hi bounds.
14072cat >conftest.$ac_ext <<_ACEOF
14073/* confdefs.h. */
14074_ACEOF
14075cat confdefs.h >>conftest.$ac_ext
14076cat >>conftest.$ac_ext <<_ACEOF
14077/* end confdefs.h. */
14078
14079#ifdef HAVE_PTHREAD_H
14080#include <pthread.h>
14081#endif
14082
14083
14084 typedef pthread_t ac__type_sizeof_;
14085int
14086main ()
14087{
14088static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
14089test_array [0] = 0
14090
14091 ;
14092 return 0;
14093}
14094_ACEOF
14095rm -f conftest.$ac_objext
14096if { (ac_try="$ac_compile"
14097case "(($ac_try" in
14098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14099 *) ac_try_echo=$ac_try;;
14100esac
14101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14102 (eval "$ac_compile") 2>conftest.er1
14103 ac_status=$?
14104 grep -v '^ *+' conftest.er1 >conftest.err
14105 rm -f conftest.er1
14106 cat conftest.err >&5
14107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14108 (exit $ac_status); } && {
14109 test -z "$ac_c_werror_flag" ||
14110 test ! -s conftest.err
14111 } && test -s conftest.$ac_objext; then
14112 ac_lo=0 ac_mid=0
14113 while :; do
14114 cat >conftest.$ac_ext <<_ACEOF
14115/* confdefs.h. */
14116_ACEOF
14117cat confdefs.h >>conftest.$ac_ext
14118cat >>conftest.$ac_ext <<_ACEOF
14119/* end confdefs.h. */
14120
14121#ifdef HAVE_PTHREAD_H
14122#include <pthread.h>
14123#endif
14124
14125
14126 typedef pthread_t ac__type_sizeof_;
14127int
14128main ()
14129{
14130static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14131test_array [0] = 0
14132
14133 ;
14134 return 0;
14135}
14136_ACEOF
14137rm -f conftest.$ac_objext
14138if { (ac_try="$ac_compile"
14139case "(($ac_try" in
14140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14141 *) ac_try_echo=$ac_try;;
14142esac
14143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14144 (eval "$ac_compile") 2>conftest.er1
14145 ac_status=$?
14146 grep -v '^ *+' conftest.er1 >conftest.err
14147 rm -f conftest.er1
14148 cat conftest.err >&5
14149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14150 (exit $ac_status); } && {
14151 test -z "$ac_c_werror_flag" ||
14152 test ! -s conftest.err
14153 } && test -s conftest.$ac_objext; then
14154 ac_hi=$ac_mid; break
14155else
14156 echo "$as_me: failed program was:" >&5
14157sed 's/^/| /' conftest.$ac_ext >&5
14158
14159 ac_lo=`expr $ac_mid + 1`
14160 if test $ac_lo -le $ac_mid; then
14161 ac_lo= ac_hi=
14162 break
14163 fi
14164 ac_mid=`expr 2 '*' $ac_mid + 1`
14165fi
14166
14167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14168 done
14169else
14170 echo "$as_me: failed program was:" >&5
14171sed 's/^/| /' conftest.$ac_ext >&5
14172
14173 cat >conftest.$ac_ext <<_ACEOF
14174/* confdefs.h. */
14175_ACEOF
14176cat confdefs.h >>conftest.$ac_ext
14177cat >>conftest.$ac_ext <<_ACEOF
14178/* end confdefs.h. */
14179
14180#ifdef HAVE_PTHREAD_H
14181#include <pthread.h>
14182#endif
14183
14184
14185 typedef pthread_t ac__type_sizeof_;
14186int
14187main ()
14188{
14189static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
14190test_array [0] = 0
14191
14192 ;
14193 return 0;
14194}
14195_ACEOF
14196rm -f conftest.$ac_objext
14197if { (ac_try="$ac_compile"
14198case "(($ac_try" in
14199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14200 *) ac_try_echo=$ac_try;;
14201esac
14202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14203 (eval "$ac_compile") 2>conftest.er1
14204 ac_status=$?
14205 grep -v '^ *+' conftest.er1 >conftest.err
14206 rm -f conftest.er1
14207 cat conftest.err >&5
14208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14209 (exit $ac_status); } && {
14210 test -z "$ac_c_werror_flag" ||
14211 test ! -s conftest.err
14212 } && test -s conftest.$ac_objext; then
14213 ac_hi=-1 ac_mid=-1
14214 while :; do
14215 cat >conftest.$ac_ext <<_ACEOF
14216/* confdefs.h. */
14217_ACEOF
14218cat confdefs.h >>conftest.$ac_ext
14219cat >>conftest.$ac_ext <<_ACEOF
14220/* end confdefs.h. */
14221
14222#ifdef HAVE_PTHREAD_H
14223#include <pthread.h>
14224#endif
14225
14226
14227 typedef pthread_t ac__type_sizeof_;
14228int
14229main ()
14230{
14231static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
14232test_array [0] = 0
14233
14234 ;
14235 return 0;
14236}
14237_ACEOF
14238rm -f conftest.$ac_objext
14239if { (ac_try="$ac_compile"
14240case "(($ac_try" in
14241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14242 *) ac_try_echo=$ac_try;;
14243esac
14244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14245 (eval "$ac_compile") 2>conftest.er1
14246 ac_status=$?
14247 grep -v '^ *+' conftest.er1 >conftest.err
14248 rm -f conftest.er1
14249 cat conftest.err >&5
14250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14251 (exit $ac_status); } && {
14252 test -z "$ac_c_werror_flag" ||
14253 test ! -s conftest.err
14254 } && test -s conftest.$ac_objext; then
14255 ac_lo=$ac_mid; break
14256else
14257 echo "$as_me: failed program was:" >&5
14258sed 's/^/| /' conftest.$ac_ext >&5
14259
14260 ac_hi=`expr '(' $ac_mid ')' - 1`
14261 if test $ac_mid -le $ac_hi; then
14262 ac_lo= ac_hi=
14263 break
14264 fi
14265 ac_mid=`expr 2 '*' $ac_mid`
14266fi
14267
14268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14269 done
14270else
14271 echo "$as_me: failed program was:" >&5
14272sed 's/^/| /' conftest.$ac_ext >&5
14273
14274 ac_lo= ac_hi=
14275fi
14276
14277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14278fi
14279
14280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14281# Binary search between lo and hi bounds.
14282while test "x$ac_lo" != "x$ac_hi"; do
14283 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14284 cat >conftest.$ac_ext <<_ACEOF
14285/* confdefs.h. */
14286_ACEOF
14287cat confdefs.h >>conftest.$ac_ext
14288cat >>conftest.$ac_ext <<_ACEOF
14289/* end confdefs.h. */
14290
14291#ifdef HAVE_PTHREAD_H
14292#include <pthread.h>
14293#endif
14294
14295
14296 typedef pthread_t ac__type_sizeof_;
14297int
14298main ()
14299{
14300static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14301test_array [0] = 0
14302
14303 ;
14304 return 0;
14305}
14306_ACEOF
14307rm -f conftest.$ac_objext
14308if { (ac_try="$ac_compile"
14309case "(($ac_try" in
14310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14311 *) ac_try_echo=$ac_try;;
14312esac
14313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14314 (eval "$ac_compile") 2>conftest.er1
14315 ac_status=$?
14316 grep -v '^ *+' conftest.er1 >conftest.err
14317 rm -f conftest.er1
14318 cat conftest.err >&5
14319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14320 (exit $ac_status); } && {
14321 test -z "$ac_c_werror_flag" ||
14322 test ! -s conftest.err
14323 } && test -s conftest.$ac_objext; then
14324 ac_hi=$ac_mid
14325else
14326 echo "$as_me: failed program was:" >&5
14327sed 's/^/| /' conftest.$ac_ext >&5
14328
14329 ac_lo=`expr '(' $ac_mid ')' + 1`
14330fi
14331
14332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14333done
14334case $ac_lo in
14335?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14336'') if test "$ac_cv_type_pthread_t" = yes; then
14337 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14338See \`config.log' for more details." >&5
14339echo "$as_me: error: cannot compute sizeof (pthread_t)
14340See \`config.log' for more details." >&2;}
14341 { (exit 77); exit 77; }; }
14342 else
14343 ac_cv_sizeof_pthread_t=0
14344 fi ;;
14345esac
14346else
14347 cat >conftest.$ac_ext <<_ACEOF
14348/* confdefs.h. */
14349_ACEOF
14350cat confdefs.h >>conftest.$ac_ext
14351cat >>conftest.$ac_ext <<_ACEOF
14352/* end confdefs.h. */
14353
14354#ifdef HAVE_PTHREAD_H
14355#include <pthread.h>
14356#endif
14357
14358
14359 typedef pthread_t ac__type_sizeof_;
14360static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14361static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
14362#include <stdio.h>
14363#include <stdlib.h>
14364int
14365main ()
14366{
14367
14368 FILE *f = fopen ("conftest.val", "w");
14369 if (! f)
14370 return 1;
14371 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
14372 {
14373 long int i = longval ();
14374 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14375 return 1;
14376 fprintf (f, "%ld\n", i);
14377 }
14378 else
14379 {
14380 unsigned long int i = ulongval ();
14381 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14382 return 1;
14383 fprintf (f, "%lu\n", i);
14384 }
14385 return ferror (f) || fclose (f) != 0;
14386
14387 ;
14388 return 0;
14389}
Martin v. Löwis11437992002-04-12 09:54:03 +000014390_ACEOF
14391rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014392if { (ac_try="$ac_link"
14393case "(($ac_try" in
14394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14395 *) ac_try_echo=$ac_try;;
14396esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014398 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014399 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014401 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014402 { (case "(($ac_try" in
14403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14404 *) ac_try_echo=$ac_try;;
14405esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014407 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014408 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014410 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014411 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014412else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014413 echo "$as_me: program exited with status $ac_status" >&5
14414echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014415sed 's/^/| /' conftest.$ac_ext >&5
14416
Martin v. Löwis11437992002-04-12 09:54:03 +000014417( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014418if test "$ac_cv_type_pthread_t" = yes; then
14419 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14420See \`config.log' for more details." >&5
14421echo "$as_me: error: cannot compute sizeof (pthread_t)
14422See \`config.log' for more details." >&2;}
14423 { (exit 77); exit 77; }; }
14424 else
14425 ac_cv_sizeof_pthread_t=0
14426 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014427fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014428rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +000014429fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014430rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014431fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014432{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014433echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014434
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014435
14436
Martin v. Löwis11437992002-04-12 09:54:03 +000014437cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014438#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014439_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014440
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014441
Trent Mick635f6fb2000-08-23 21:33:05 +000014442fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014443CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014444
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014445{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
14446echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014447# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000014448if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014449 enableval=$enable_toolbox_glue;
14450fi
Jack Jansene578a632001-08-15 01:27:14 +000014451
14452
14453if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000014454then
Jack Jansene578a632001-08-15 01:27:14 +000014455 case $ac_sys_system/$ac_sys_release in
14456 Darwin/*)
14457 enable_toolbox_glue="yes";;
14458 *)
14459 enable_toolbox_glue="no";;
14460 esac
14461fi
14462case "$enable_toolbox_glue" in
14463yes)
Jack Jansene578a632001-08-15 01:27:14 +000014464 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014465 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000014466
14467cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014468#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014469_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014470
14471 ;;
14472*)
Jack Jansene578a632001-08-15 01:27:14 +000014473 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000014474 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000014475 ;;
14476esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014477{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
14478echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014479
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014480
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014481
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014482case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014483 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014484 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14485 ;;
14486 Darwin/*)
14487 OTHER_LIBTOOL_OPT=""
14488 ;;
14489esac
14490
14491
Ronald Oussoren25967582009-09-06 10:00:26 +000014492ARCH_RUN_32BIT=""
14493
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014494case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014495 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000014496 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14497 if test "${enable_universalsdk}"; then
14498 :
14499 else
Ronald Oussoren25967582009-09-06 10:00:26 +000014500 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014501 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014502 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014503 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014504 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014505 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
14506 if test ${gcc_version} '<' 4.0
14507 then
14508 LIBTOOL_CRUFT="-lcc_dynamic"
14509 else
14510 LIBTOOL_CRUFT=""
14511 fi
Ronald Oussoren25967582009-09-06 10:00:26 +000014512 if test "$cross_compiling" = yes; then
Ronald Oussoren23d92532009-09-07 06:12:00 +000014513 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +000014514else
14515 cat >conftest.$ac_ext <<_ACEOF
14516/* confdefs.h. */
14517_ACEOF
14518cat confdefs.h >>conftest.$ac_ext
14519cat >>conftest.$ac_ext <<_ACEOF
14520/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +000014521
Ronald Oussoren25967582009-09-06 10:00:26 +000014522 #include <unistd.h>
14523 int main(int argc, char*argv[])
14524 {
14525 if (sizeof(long) == 4) {
14526 return 0;
14527 } else {
14528 return 1;
14529 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +000014530 }
Ronald Oussoren23d92532009-09-07 06:12:00 +000014531
Ronald Oussoren25967582009-09-06 10:00:26 +000014532_ACEOF
14533rm -f conftest$ac_exeext
14534if { (ac_try="$ac_link"
14535case "(($ac_try" in
14536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14537 *) ac_try_echo=$ac_try;;
14538esac
14539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14540 (eval "$ac_link") 2>&5
14541 ac_status=$?
14542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14543 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14544 { (case "(($ac_try" in
14545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14546 *) ac_try_echo=$ac_try;;
14547esac
14548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14549 (eval "$ac_try") 2>&5
14550 ac_status=$?
14551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14552 (exit $ac_status); }; }; then
14553 ac_osx_32bit=yes
14554else
14555 echo "$as_me: program exited with status $ac_status" >&5
14556echo "$as_me: failed program was:" >&5
14557sed 's/^/| /' conftest.$ac_ext >&5
14558
14559( exit $ac_status )
14560ac_osx_32bit=no
14561fi
14562rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14563fi
14564
14565
14566
14567 if test "${ac_osx_32bit}" = "yes"; then
14568 case `arch` in
14569 i386)
14570 MACOSX_DEFAULT_ARCH="i386"
14571 ;;
14572 ppc)
14573 MACOSX_DEFAULT_ARCH="ppc"
14574 ;;
14575 *)
14576 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14577echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14578 { (exit 1); exit 1; }; }
14579 ;;
14580 esac
14581 else
14582 case `arch` in
14583 i386)
14584 MACOSX_DEFAULT_ARCH="x86_64"
14585 ;;
14586 ppc)
14587 MACOSX_DEFAULT_ARCH="ppc64"
14588 ;;
14589 *)
14590 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14591echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14592 { (exit 1); exit 1; }; }
14593 ;;
14594 esac
14595
14596 #ARCH_RUN_32BIT="true"
14597 fi
14598
14599 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014600 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014601 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014602esac
14603
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014604{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14605echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014606if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014607then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014608 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014609 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014610 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014611
Martin v. Löwis11437992002-04-12 09:54:03 +000014612cat >>confdefs.h <<\_ACEOF
14613#define WITH_NEXT_FRAMEWORK 1
14614_ACEOF
14615
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014616 { echo "$as_me:$LINENO: result: yes" >&5
14617echo "${ECHO_T}yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +000014618 if test $enable_shared = "yes"
14619 then
Ronald Oussoren9ebd2422009-09-29 13:00:44 +000014620 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." >&5
14621echo "$as_me: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." >&2;}
Ronald Oussoren450d5612009-06-08 21:12:41 +000014622 { (exit 1); exit 1; }; }
14623 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014624else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014625 { echo "$as_me:$LINENO: result: no" >&5
14626echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014627fi
14628
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014629{ echo "$as_me:$LINENO: checking for dyld" >&5
14630echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014631case $ac_sys_system/$ac_sys_release in
14632 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014633
Martin v. Löwis11437992002-04-12 09:54:03 +000014634cat >>confdefs.h <<\_ACEOF
14635#define WITH_DYLD 1
14636_ACEOF
14637
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014638 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14639echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014640 ;;
14641 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014642 { echo "$as_me:$LINENO: result: no" >&5
14643echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014644 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014645esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014646
Guido van Rossum0a516c91994-09-12 10:58:40 +000014647# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014648
Michael W. Hudson54241132001-12-07 15:38:26 +000014649
14650
14651
14652
Guido van Rossum0a516c91994-09-12 10:58:40 +000014653# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014654# -- usually .so, .sl on HP-UX, .dll on Cygwin
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014655{ echo "$as_me:$LINENO: checking SO" >&5
14656echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014657if test -z "$SO"
14658then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014659 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000014660 hp*|HP*)
14661 case `uname -m` in
14662 ia64) SO=.so;;
14663 *) SO=.sl;;
14664 esac
14665 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014666 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014667 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014668 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014669else
14670 # this might also be a termcap variable, see #610332
14671 echo
14672 echo '====================================================================='
14673 echo '+ +'
14674 echo '+ WARNING: You have set SO in your environment. +'
14675 echo '+ Do you really mean to change the extension for shared libraries? +'
14676 echo '+ Continuing in 10 seconds to let you to ponder. +'
14677 echo '+ +'
14678 echo '====================================================================='
14679 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014680fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014681{ echo "$as_me:$LINENO: result: $SO" >&5
14682echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000014683
Ronald Oussoren79f90492009-01-02 10:44:46 +000014684
Neal Norwitz58e28882006-05-19 07:00:58 +000014685cat >>confdefs.h <<_ACEOF
14686#define SHLIB_EXT "$SO"
14687_ACEOF
14688
Guido van Rossum0a516c91994-09-12 10:58:40 +000014689# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014690# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014691# (Shared libraries in this instance are shared modules to be loaded into
14692# Python, as opposed to building Python itself as a shared library.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014693{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14694echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014695if test -z "$LDSHARED"
14696then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014697 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014698 AIX*)
14699 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014700 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014701 ;;
14702 BeOS*)
14703 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000014704 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014705 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014706 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014707 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014708 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000014709 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014710 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014711 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000014712 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000014713 hp*|HP*)
14714 if test "$GCC" = "yes"
14715 then LDSHARED='$(CC) -shared'
14716 else LDSHARED='ld -b';
14717 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014718 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014719 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014720 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14721 if test "$enable_framework" ; then
14722 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014723 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14724 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014725 else
14726 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014727 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014728 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014729 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014730 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14731 if test "$enable_framework" ; then
14732 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014733 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14734 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014735 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014736 # No framework, use the Python app as bundle-loader
14737 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014738 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014739 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014740 Darwin/*)
14741 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14742 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000014743
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014744 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014745 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000014746 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014747 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014748 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014749 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14750 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014751 else
14752 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14753 if test "$enable_framework" ; then
14754 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014755 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14756 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014757 else
14758 # No framework, use the Python app as bundle-loader
14759 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14760 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14761 fi
14762 fi
14763 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014764 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014765 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014766 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014767 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014768 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014769 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014770 else
14771 LDSHARED="ld -Bshareable ${LDFLAGS}"
14772 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014773 OpenBSD*)
14774 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14775 then
14776 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14777 else
14778 case `uname -r` in
14779 [01].* | 2.[0-7] | 2.[0-7].*)
14780 LDSHARED="ld -Bshareable ${LDFLAGS}"
14781 ;;
14782 *)
14783 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14784 ;;
14785 esac
14786 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014787 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014788 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014789 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014790 then LDSHARED='$(CC) -shared'
14791 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014792 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014793 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014794 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014795 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014796 *) LDSHARED="ld";;
14797 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014798fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014799{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14800echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014801BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014802# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014803# library (module) -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014804{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14805echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014806if test -z "$CCSHARED"
14807then
Guido van Rossum07397971997-04-29 21:49:50 +000014808 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014809 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000014810 then CCSHARED="-fPIC";
14811 elif test `uname -p` = sparc;
14812 then CCSHARED="-xcode=pic32";
14813 else CCSHARED="-Kpic";
14814 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014815 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014816 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014817 else CCSHARED="+z";
14818 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014819 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014820 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014821 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014822 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014823 if test "$GCC" = "yes"
14824 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014825 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014826 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014827 SCO_SV*)
14828 if test "$GCC" = "yes"
14829 then CCSHARED="-fPIC"
14830 else CCSHARED="-Kpic -belf"
14831 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014832 IRIX*/6*) case $CC in
14833 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014834 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014835 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014836 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014837 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014838fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014839{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14840echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014841# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014842# the python executable -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014843{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14844echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014845if test -z "$LINKFORSHARED"
14846then
Guido van Rossum07397971997-04-29 21:49:50 +000014847 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014848 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014849 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014850 LINKFORSHARED="-Wl,-E -Wl,+s";;
14851# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014852 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014853 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014854 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014855 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014856 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
14857 # which is
Jack Jansene578a632001-08-15 01:27:14 +000014858 # not used by the core itself but which needs to be in the core so
14859 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000014860 # -prebind is no longer used, because it actually seems to give a
14861 # slowdown in stead of a speedup, maybe due to the large number of
14862 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014863
14864 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000014865 if test "$enable_framework"
14866 then
Jack Jansenda49e192005-01-07 13:08:22 +000014867 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014868 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014869 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014870 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014871 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014872 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014873 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014874 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14875 then
14876 LINKFORSHARED="-Wl,--export-dynamic"
14877 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014878 SunOS/5*) case $CC in
14879 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014880 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014881 then
14882 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014883 fi;;
14884 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014885 CYGWIN*)
14886 if test $enable_shared = "no"
14887 then
14888 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14889 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014890 QNX*)
14891 # -Wl,-E causes the symbols to be added to the dynamic
14892 # symbol table so that they can be found when a module
14893 # is loaded. -N 2048K causes the stack size to be set
14894 # to 2048 kilobytes so that the stack doesn't overflow
14895 # when running test_compile.py.
14896 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014897 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014898fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014899{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14900echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014901
Michael W. Hudson54241132001-12-07 15:38:26 +000014902
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014903
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014904{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14905echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014906if test ! "$LIBRARY" = "$LDLIBRARY"
14907then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014908 case $ac_sys_system in
14909 CYGWIN*)
14910 # Cygwin needs CCSHARED when building extension DLLs
14911 # but not when building the interpreter DLL.
14912 CFLAGSFORSHARED='';;
14913 *)
14914 CFLAGSFORSHARED='$(CCSHARED)'
14915 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014916fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014917{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14918echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014919
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014920# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14921# library (with --enable-shared).
14922# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014923# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14924# if it is not required, since it creates a dependency of the shared library
14925# to LIBS. This, in turn, means that applications linking the shared libpython
14926# don't need to link LIBS explicitly. The default should be only changed
14927# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014928
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014929{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14930echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014931case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014932 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014933 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014934esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014935{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14936echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014937
14938
Guido van Rossum627b2d71993-12-24 10:39:16 +000014939# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014940
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014941{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14942echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014943if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014944 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014945else
Martin v. Löwis11437992002-04-12 09:54:03 +000014946 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014947LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014948cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014949/* confdefs.h. */
14950_ACEOF
14951cat confdefs.h >>conftest.$ac_ext
14952cat >>conftest.$ac_ext <<_ACEOF
14953/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014954
Martin v. Löwiseba40652007-08-30 20:10:57 +000014955/* Override any GCC internal prototype to avoid an error.
14956 Use char because int might match the return type of a GCC
14957 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014958#ifdef __cplusplus
14959extern "C"
14960#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014961char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014962int
14963main ()
14964{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014965return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014966 ;
14967 return 0;
14968}
14969_ACEOF
14970rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014971if { (ac_try="$ac_link"
14972case "(($ac_try" in
14973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14974 *) ac_try_echo=$ac_try;;
14975esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014977 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014978 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014979 grep -v '^ *+' conftest.er1 >conftest.err
14980 rm -f conftest.er1
14981 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014983 (exit $ac_status); } && {
14984 test -z "$ac_c_werror_flag" ||
14985 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014986 } && test -s conftest$ac_exeext &&
14987 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014988 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014989else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014990 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014991sed 's/^/| /' conftest.$ac_ext >&5
14992
Martin v. Löwiseba40652007-08-30 20:10:57 +000014993 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014994fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014995
14996rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014997 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014998LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014999fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015000{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
15001echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
15002if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015003 cat >>confdefs.h <<_ACEOF
15004#define HAVE_LIBDL 1
15005_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015006
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015007 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015008
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015009fi
15010 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000015011
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015012{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
15013echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015014if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015015 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015016else
Martin v. Löwis11437992002-04-12 09:54:03 +000015017 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015018LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015019cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015020/* confdefs.h. */
15021_ACEOF
15022cat confdefs.h >>conftest.$ac_ext
15023cat >>conftest.$ac_ext <<_ACEOF
15024/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015025
Martin v. Löwiseba40652007-08-30 20:10:57 +000015026/* Override any GCC internal prototype to avoid an error.
15027 Use char because int might match the return type of a GCC
15028 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015029#ifdef __cplusplus
15030extern "C"
15031#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015032char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015033int
15034main ()
15035{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015036return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015037 ;
15038 return 0;
15039}
15040_ACEOF
15041rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015042if { (ac_try="$ac_link"
15043case "(($ac_try" in
15044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15045 *) ac_try_echo=$ac_try;;
15046esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015048 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015049 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015050 grep -v '^ *+' conftest.er1 >conftest.err
15051 rm -f conftest.er1
15052 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015054 (exit $ac_status); } && {
15055 test -z "$ac_c_werror_flag" ||
15056 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015057 } && test -s conftest$ac_exeext &&
15058 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015059 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015060else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015061 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015062sed 's/^/| /' conftest.$ac_ext >&5
15063
Martin v. Löwiseba40652007-08-30 20:10:57 +000015064 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015065fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015066
15067rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015068 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015069LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015070fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015071{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
15072echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
15073if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015074 cat >>confdefs.h <<_ACEOF
15075#define HAVE_LIBDLD 1
15076_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015077
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015078 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015079
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015080fi
15081 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000015082
Ronald Oussoren79f90492009-01-02 10:44:46 +000015083# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000015084if test "$with_threads" = "yes" -o -z "$with_threads"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015085 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
15086echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015087if test "${ac_cv_search_sem_init+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015088 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015089else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015090 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000015091cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015092/* confdefs.h. */
15093_ACEOF
15094cat confdefs.h >>conftest.$ac_ext
15095cat >>conftest.$ac_ext <<_ACEOF
15096/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015097
Martin v. Löwiseba40652007-08-30 20:10:57 +000015098/* Override any GCC internal prototype to avoid an error.
15099 Use char because int might match the return type of a GCC
15100 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015101#ifdef __cplusplus
15102extern "C"
15103#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015104char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015105int
15106main ()
15107{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015108return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015109 ;
15110 return 0;
15111}
15112_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015113for ac_lib in '' pthread rt posix4; do
15114 if test -z "$ac_lib"; then
15115 ac_res="none required"
15116 else
15117 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000015118 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015119 fi
15120 rm -f conftest.$ac_objext conftest$ac_exeext
15121if { (ac_try="$ac_link"
15122case "(($ac_try" in
15123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15124 *) ac_try_echo=$ac_try;;
15125esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015127 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000015128 ac_status=$?
15129 grep -v '^ *+' conftest.er1 >conftest.err
15130 rm -f conftest.er1
15131 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015133 (exit $ac_status); } && {
15134 test -z "$ac_c_werror_flag" ||
15135 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015136 } && test -s conftest$ac_exeext &&
15137 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015138 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000015139else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015140 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015141sed 's/^/| /' conftest.$ac_ext >&5
15142
Martin v. Löwiseba40652007-08-30 20:10:57 +000015143
Brett Cannon19fab762007-06-02 03:02:29 +000015144fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015145
15146rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15147 conftest$ac_exeext
15148 if test "${ac_cv_search_sem_init+set}" = set; then
15149 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000015150fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015151done
15152if test "${ac_cv_search_sem_init+set}" = set; then
15153 :
15154else
15155 ac_cv_search_sem_init=no
15156fi
15157rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015158LIBS=$ac_func_search_save_LIBS
15159fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015160{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15161echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015162ac_res=$ac_cv_search_sem_init
15163if test "$ac_res" != no; then
15164 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015165
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015166fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015167 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015168 # posix4 on Solaris 2.6
15169 # pthread (first!) on Linux
15170fi
15171
Martin v. Löwis19d17342003-06-14 21:03:05 +000015172# check if we need libintl for locale functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015173{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15174echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015175if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015176 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015177else
15178 ac_check_lib_save_LIBS=$LIBS
15179LIBS="-lintl $LIBS"
15180cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015181/* confdefs.h. */
15182_ACEOF
15183cat confdefs.h >>conftest.$ac_ext
15184cat >>conftest.$ac_ext <<_ACEOF
15185/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015186
Martin v. Löwiseba40652007-08-30 20:10:57 +000015187/* Override any GCC internal prototype to avoid an error.
15188 Use char because int might match the return type of a GCC
15189 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015190#ifdef __cplusplus
15191extern "C"
15192#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015193char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015194int
15195main ()
15196{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015197return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015198 ;
15199 return 0;
15200}
15201_ACEOF
15202rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015203if { (ac_try="$ac_link"
15204case "(($ac_try" in
15205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15206 *) ac_try_echo=$ac_try;;
15207esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015209 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015210 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015211 grep -v '^ *+' conftest.er1 >conftest.err
15212 rm -f conftest.er1
15213 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015215 (exit $ac_status); } && {
15216 test -z "$ac_c_werror_flag" ||
15217 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015218 } && test -s conftest$ac_exeext &&
15219 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015220 ac_cv_lib_intl_textdomain=yes
15221else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015222 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015223sed 's/^/| /' conftest.$ac_ext >&5
15224
Martin v. Löwiseba40652007-08-30 20:10:57 +000015225 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015226fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015227
15228rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015229 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015230LIBS=$ac_check_lib_save_LIBS
15231fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015232{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15233echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15234if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015235
15236cat >>confdefs.h <<\_ACEOF
15237#define WITH_LIBINTL 1
15238_ACEOF
15239
15240fi
15241
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015242
15243# checks for system dependent C++ extensions support
15244case "$ac_sys_system" in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015245 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15246echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015247 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015248/* confdefs.h. */
15249_ACEOF
15250cat confdefs.h >>conftest.$ac_ext
15251cat >>conftest.$ac_ext <<_ACEOF
15252/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015253#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015254int
15255main ()
15256{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015257loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015258 ;
15259 return 0;
15260}
15261_ACEOF
15262rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015263if { (ac_try="$ac_link"
15264case "(($ac_try" in
15265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15266 *) ac_try_echo=$ac_try;;
15267esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015269 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015270 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015271 grep -v '^ *+' conftest.er1 >conftest.err
15272 rm -f conftest.er1
15273 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015275 (exit $ac_status); } && {
15276 test -z "$ac_c_werror_flag" ||
15277 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015278 } && test -s conftest$ac_exeext &&
15279 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015280
Martin v. Löwis11437992002-04-12 09:54:03 +000015281cat >>confdefs.h <<\_ACEOF
15282#define AIX_GENUINE_CPLUSPLUS 1
15283_ACEOF
15284
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015285 { echo "$as_me:$LINENO: result: yes" >&5
15286echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015287else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015288 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015289sed 's/^/| /' conftest.$ac_ext >&5
15290
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015291 { echo "$as_me:$LINENO: result: no" >&5
15292echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015293fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015294
15295rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015296 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015297 *) ;;
15298esac
15299
Guido van Rossum70c7f481998-03-26 18:44:10 +000015300# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015301# BeOS' sockets are stashed in libnet.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015302{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15303echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015304if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015305 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015306else
Martin v. Löwis11437992002-04-12 09:54:03 +000015307 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015308LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015309cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015310/* confdefs.h. */
15311_ACEOF
15312cat confdefs.h >>conftest.$ac_ext
15313cat >>conftest.$ac_ext <<_ACEOF
15314/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015315
Martin v. Löwiseba40652007-08-30 20:10:57 +000015316/* Override any GCC internal prototype to avoid an error.
15317 Use char because int might match the return type of a GCC
15318 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015319#ifdef __cplusplus
15320extern "C"
15321#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015322char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015323int
15324main ()
15325{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015326return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015327 ;
15328 return 0;
15329}
15330_ACEOF
15331rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015332if { (ac_try="$ac_link"
15333case "(($ac_try" in
15334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15335 *) ac_try_echo=$ac_try;;
15336esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015338 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015339 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015340 grep -v '^ *+' conftest.er1 >conftest.err
15341 rm -f conftest.er1
15342 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015344 (exit $ac_status); } && {
15345 test -z "$ac_c_werror_flag" ||
15346 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015347 } && test -s conftest$ac_exeext &&
15348 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015349 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015350else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015351 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015352sed 's/^/| /' conftest.$ac_ext >&5
15353
Martin v. Löwiseba40652007-08-30 20:10:57 +000015354 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015355fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015356
15357rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015358 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015359LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015360fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015361{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15362echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15363if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015364 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015365fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015366 # SVR4
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015367{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15368echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015369if test "${ac_cv_lib_socket_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015370 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015371else
Martin v. Löwis11437992002-04-12 09:54:03 +000015372 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015373LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015374cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015375/* confdefs.h. */
15376_ACEOF
15377cat confdefs.h >>conftest.$ac_ext
15378cat >>conftest.$ac_ext <<_ACEOF
15379/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015380
Martin v. Löwiseba40652007-08-30 20:10:57 +000015381/* Override any GCC internal prototype to avoid an error.
15382 Use char because int might match the return type of a GCC
15383 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015384#ifdef __cplusplus
15385extern "C"
15386#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015387char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015388int
15389main ()
15390{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015391return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015392 ;
15393 return 0;
15394}
15395_ACEOF
15396rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015397if { (ac_try="$ac_link"
15398case "(($ac_try" in
15399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15400 *) ac_try_echo=$ac_try;;
15401esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015403 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015404 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015405 grep -v '^ *+' conftest.er1 >conftest.err
15406 rm -f conftest.er1
15407 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015409 (exit $ac_status); } && {
15410 test -z "$ac_c_werror_flag" ||
15411 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015412 } && test -s conftest$ac_exeext &&
15413 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015414 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015415else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015416 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015417sed 's/^/| /' conftest.$ac_ext >&5
15418
Martin v. Löwiseba40652007-08-30 20:10:57 +000015419 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015420fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015421
15422rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015423 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015424LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015425fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015426{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15427echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15428if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015429 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015430fi
15431 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015432
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000015433case "$ac_sys_system" in
15434BeOS*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015435{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
15436echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015437if test "${ac_cv_lib_net_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015438 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015439else
Martin v. Löwis11437992002-04-12 09:54:03 +000015440 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015441LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015442cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015443/* confdefs.h. */
15444_ACEOF
15445cat confdefs.h >>conftest.$ac_ext
15446cat >>conftest.$ac_ext <<_ACEOF
15447/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015448
Martin v. Löwiseba40652007-08-30 20:10:57 +000015449/* Override any GCC internal prototype to avoid an error.
15450 Use char because int might match the return type of a GCC
15451 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015452#ifdef __cplusplus
15453extern "C"
15454#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015455char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015456int
15457main ()
15458{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015459return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015460 ;
15461 return 0;
15462}
15463_ACEOF
15464rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015465if { (ac_try="$ac_link"
15466case "(($ac_try" in
15467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15468 *) ac_try_echo=$ac_try;;
15469esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015470eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015471 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015472 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015473 grep -v '^ *+' conftest.er1 >conftest.err
15474 rm -f conftest.er1
15475 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015477 (exit $ac_status); } && {
15478 test -z "$ac_c_werror_flag" ||
15479 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015480 } && test -s conftest$ac_exeext &&
15481 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015482 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015483else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015484 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015485sed 's/^/| /' conftest.$ac_ext >&5
15486
Martin v. Löwiseba40652007-08-30 20:10:57 +000015487 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000015488fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015489
15490rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015491 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015492LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015493fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015494{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
15495echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
15496if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015497 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015498fi
15499 # BeOS
15500;;
15501esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000015502
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015503{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15504echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015505
Martin v. Löwiseba40652007-08-30 20:10:57 +000015506# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015507if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015508 withval=$with_libs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015509{ echo "$as_me:$LINENO: result: $withval" >&5
15510echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015511LIBS="$withval $LIBS"
15512
15513else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015514 { echo "$as_me:$LINENO: result: no" >&5
15515echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015516fi
15517
Guido van Rossum7f43da71994-08-01 12:15:30 +000015518
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015519# Check for use of the system libffi library
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015520{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15521echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015522
Martin v. Löwiseba40652007-08-30 20:10:57 +000015523# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015524if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015525 withval=$with_system_ffi;
15526fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015527
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015528
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015529{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15530echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015531
Benjamin Peterson867475c2009-04-29 20:36:25 +000015532# Check for --with-dbmliborder
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015533{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15534echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015535
15536# Check whether --with-dbmliborder was given.
15537if test "${with_dbmliborder+set}" = set; then
15538 withval=$with_dbmliborder;
15539if test x$with_dbmliborder = xyes
15540then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015541{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15542echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015543 { (exit 1); exit 1; }; }
15544else
15545 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15546 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15547 then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015548 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15549echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015550 { (exit 1); exit 1; }; }
15551 fi
15552 done
15553fi
15554fi
15555
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015556{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15557echo "${ECHO_T}$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015558
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015559# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015560
15561
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015562{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15563echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015564
Martin v. Löwiseba40652007-08-30 20:10:57 +000015565# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015566if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015567 withval=$with_signal_module;
15568fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015569
15570
15571if test -z "$with_signal_module"
15572then with_signal_module="yes"
15573fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015574{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15575echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015576
15577if test "${with_signal_module}" = "yes"; then
15578 USE_SIGNAL_MODULE=""
15579 SIGNAL_OBJS=""
15580else
15581 USE_SIGNAL_MODULE="#"
15582 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15583fi
15584
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015585# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015586
Barry Warsawc0d24d82000-06-29 16:12:00 +000015587USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015588
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015589{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15590echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015591
Guido van Rossumec2f0731997-01-22 20:54:01 +000015592
Martin v. Löwiseba40652007-08-30 20:10:57 +000015593# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015594if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015595 withval=$with_dec_threads;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015596{ echo "$as_me:$LINENO: result: $withval" >&5
15597echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015598LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015599if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015600 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015601fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015602else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015603 { echo "$as_me:$LINENO: result: no" >&5
15604echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015605fi
15606
Martin v. Löwis11437992002-04-12 09:54:03 +000015607
15608# Templates for things AC_DEFINEd more than once.
15609# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015610
15611
Martin v. Löwis11437992002-04-12 09:54:03 +000015612
15613
15614
15615
15616
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015617{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15618echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015619
Martin v. Löwiseba40652007-08-30 20:10:57 +000015620# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015621if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015622 withval=$with_threads;
15623fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015624
15625
Barry Warsawc0d24d82000-06-29 16:12:00 +000015626# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015627
Martin v. Löwiseba40652007-08-30 20:10:57 +000015628# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015629if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015630 withval=$with_thread; with_threads=$with_thread
15631fi
15632
Barry Warsawc0d24d82000-06-29 16:12:00 +000015633
15634if test -z "$with_threads"
15635then with_threads="yes"
15636fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015637{ echo "$as_me:$LINENO: result: $with_threads" >&5
15638echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000015639
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015640
Barry Warsawc0d24d82000-06-29 16:12:00 +000015641if test "$with_threads" = "no"
15642then
15643 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015644elif test "$ac_cv_pthread_is_default" = yes
15645then
Martin v. Löwis11437992002-04-12 09:54:03 +000015646 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015647#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015648_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015649
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015650 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015651 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015652#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015653_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015654
15655 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015656 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015657elif test "$ac_cv_kpthread" = "yes"
15658then
15659 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015660 if test "$ac_cv_cxx_thread" = "yes"; then
15661 CXX="$CXX -Kpthread"
15662 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015663 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015664#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015665_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015666
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015667 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015668 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015669elif test "$ac_cv_kthread" = "yes"
15670then
15671 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015672 if test "$ac_cv_cxx_thread" = "yes"; then
15673 CXX="$CXX -Kthread"
15674 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015675 cat >>confdefs.h <<\_ACEOF
15676#define WITH_THREAD 1
15677_ACEOF
15678
15679 posix_threads=yes
15680 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015681elif test "$ac_cv_pthread" = "yes"
15682then
15683 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015684 if test "$ac_cv_cxx_thread" = "yes"; then
15685 CXX="$CXX -pthread"
15686 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015687 cat >>confdefs.h <<\_ACEOF
15688#define WITH_THREAD 1
15689_ACEOF
15690
15691 posix_threads=yes
15692 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015693else
15694 if test ! -z "$with_threads" -a -d "$with_threads"
15695 then LDFLAGS="$LDFLAGS -L$with_threads"
15696 fi
15697 if test ! -z "$withval" -a -d "$withval"
15698 then LDFLAGS="$LDFLAGS -L$withval"
15699 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015700
15701 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015702 # define _POSIX_THREADS in unistd.h. Some apparently don't
15703 # (e.g. gnu pth with pthread emulation)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015704 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15705echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015706 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015707/* confdefs.h. */
15708_ACEOF
15709cat confdefs.h >>conftest.$ac_ext
15710cat >>conftest.$ac_ext <<_ACEOF
15711/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015712
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015713#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015714#ifdef _POSIX_THREADS
15715yes
15716#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015717
15718_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015719if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015720 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015721 unistd_defines_pthreads=yes
15722else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015723 unistd_defines_pthreads=no
15724fi
Mark Dickinsonab442262009-11-20 19:27:43 +000015725rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015726
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015727 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15728echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015729
Martin v. Löwis11437992002-04-12 09:54:03 +000015730 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015731#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015732_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015733
Martin v. Löwis11437992002-04-12 09:54:03 +000015734 if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015735 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15736echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015737if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015738 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015739fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015740{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15741echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015742else
Martin v. Löwis11437992002-04-12 09:54:03 +000015743 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015744{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15745echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015746cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015747/* confdefs.h. */
15748_ACEOF
15749cat confdefs.h >>conftest.$ac_ext
15750cat >>conftest.$ac_ext <<_ACEOF
15751/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015752$ac_includes_default
15753#include <cthreads.h>
15754_ACEOF
15755rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015756if { (ac_try="$ac_compile"
15757case "(($ac_try" in
15758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15759 *) ac_try_echo=$ac_try;;
15760esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015762 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015763 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015764 grep -v '^ *+' conftest.er1 >conftest.err
15765 rm -f conftest.er1
15766 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015768 (exit $ac_status); } && {
15769 test -z "$ac_c_werror_flag" ||
15770 test ! -s conftest.err
15771 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015772 ac_header_compiler=yes
15773else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015775sed 's/^/| /' conftest.$ac_ext >&5
15776
Martin v. Löwiseba40652007-08-30 20:10:57 +000015777 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015778fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015779
15780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015781{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15782echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015783
15784# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015785{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15786echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015787cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015788/* confdefs.h. */
15789_ACEOF
15790cat confdefs.h >>conftest.$ac_ext
15791cat >>conftest.$ac_ext <<_ACEOF
15792/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015793#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015794_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015795if { (ac_try="$ac_cpp conftest.$ac_ext"
15796case "(($ac_try" in
15797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15798 *) ac_try_echo=$ac_try;;
15799esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015801 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015802 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015803 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015804 rm -f conftest.er1
15805 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015807 (exit $ac_status); } >/dev/null && {
15808 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15809 test ! -s conftest.err
15810 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015811 ac_header_preproc=yes
15812else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015813 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015814sed 's/^/| /' conftest.$ac_ext >&5
15815
Martin v. Löwis11437992002-04-12 09:54:03 +000015816 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015817fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015818
Martin v. Löwis11437992002-04-12 09:54:03 +000015819rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015820{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15821echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015822
15823# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015824case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15825 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015826 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15827echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15828 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15829echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015830 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015831 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015832 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015833 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15834echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15835 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15836echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15837 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15838echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15839 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15840echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15841 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15842echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15843 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15844echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015845 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000015846## -------------------------------------- ##
15847## Report this to http://bugs.python.org/ ##
15848## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015849_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015850 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015851 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015852esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015853{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15854echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015855if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015856 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015857else
15858 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015859fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015860{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15861echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015862
15863fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015864if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015865 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015866#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015867_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015868
Martin v. Löwis11437992002-04-12 09:54:03 +000015869 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015870#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015871_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015872
Martin v. Löwis11437992002-04-12 09:54:03 +000015873
15874cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015875#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015876_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015877
15878 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015879 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015880else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015881
Martin v. Löwis11437992002-04-12 09:54:03 +000015882 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015883 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15884echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015885if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015886 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015887fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015888{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15889echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015890else
Martin v. Löwis11437992002-04-12 09:54:03 +000015891 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015892{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15893echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015894cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015895/* confdefs.h. */
15896_ACEOF
15897cat confdefs.h >>conftest.$ac_ext
15898cat >>conftest.$ac_ext <<_ACEOF
15899/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015900$ac_includes_default
15901#include <mach/cthreads.h>
15902_ACEOF
15903rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015904if { (ac_try="$ac_compile"
15905case "(($ac_try" in
15906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15907 *) ac_try_echo=$ac_try;;
15908esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015910 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015911 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015912 grep -v '^ *+' conftest.er1 >conftest.err
15913 rm -f conftest.er1
15914 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015916 (exit $ac_status); } && {
15917 test -z "$ac_c_werror_flag" ||
15918 test ! -s conftest.err
15919 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015920 ac_header_compiler=yes
15921else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015922 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015923sed 's/^/| /' conftest.$ac_ext >&5
15924
Martin v. Löwiseba40652007-08-30 20:10:57 +000015925 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015926fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015927
15928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015929{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15930echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015931
15932# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015933{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15934echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015935cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015936/* confdefs.h. */
15937_ACEOF
15938cat confdefs.h >>conftest.$ac_ext
15939cat >>conftest.$ac_ext <<_ACEOF
15940/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015941#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015942_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015943if { (ac_try="$ac_cpp conftest.$ac_ext"
15944case "(($ac_try" in
15945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15946 *) ac_try_echo=$ac_try;;
15947esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015949 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015950 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015951 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015952 rm -f conftest.er1
15953 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015955 (exit $ac_status); } >/dev/null && {
15956 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15957 test ! -s conftest.err
15958 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015959 ac_header_preproc=yes
15960else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015961 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015962sed 's/^/| /' conftest.$ac_ext >&5
15963
Martin v. Löwis11437992002-04-12 09:54:03 +000015964 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015965fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015966
Martin v. Löwis11437992002-04-12 09:54:03 +000015967rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015968{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15969echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015970
15971# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015972case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15973 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015974 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15975echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15976 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15977echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015978 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015979 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015980 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015981 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15982echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15983 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15984echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15985 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15986echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15987 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15988echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15989 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
15990echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
15991 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
15992echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015993 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000015994## -------------------------------------- ##
15995## Report this to http://bugs.python.org/ ##
15996## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015997_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015998 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015999 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016000esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016001{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16002echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016003if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016004 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016005else
16006 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016007fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016008{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16009echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016010
16011fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016012if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016013 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016014#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016015_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016016
Martin v. Löwis11437992002-04-12 09:54:03 +000016017 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016018#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016019_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016020
Martin v. Löwis11437992002-04-12 09:54:03 +000016021
16022cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016023#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016024_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016025
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016026 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016027else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016028
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016029 { echo "$as_me:$LINENO: checking for --with-pth" >&5
16030echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016031
Martin v. Löwiseba40652007-08-30 20:10:57 +000016032# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016033if test "${with_pth+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016034 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
16035echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016036 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016037#define WITH_THREAD 1
16038_ACEOF
16039
16040
16041cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016042#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016043_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016044
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016045 LIBS="-lpth $LIBS"
16046 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016047else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016048 { echo "$as_me:$LINENO: result: no" >&5
16049echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016050
16051 # Just looking for pthread_create in libpthread is not enough:
16052 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
16053 # So we really have to include pthread.h, and then link.
16054 _libs=$LIBS
16055 LIBS="$LIBS -lpthread"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016056 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16057echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016058 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016059/* confdefs.h. */
16060_ACEOF
16061cat confdefs.h >>conftest.$ac_ext
16062cat >>conftest.$ac_ext <<_ACEOF
16063/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016064#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000016065
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016066void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000016067int
16068main ()
16069{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016070
16071pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000016072 ;
16073 return 0;
16074}
16075_ACEOF
16076rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016077if { (ac_try="$ac_link"
16078case "(($ac_try" in
16079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16080 *) ac_try_echo=$ac_try;;
16081esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016083 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016084 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016085 grep -v '^ *+' conftest.er1 >conftest.err
16086 rm -f conftest.er1
16087 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016089 (exit $ac_status); } && {
16090 test -z "$ac_c_werror_flag" ||
16091 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016092 } && test -s conftest$ac_exeext &&
16093 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016094
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016095 { echo "$as_me:$LINENO: result: yes" >&5
16096echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016097 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016098#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016099_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016100
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016101 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016102 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016103else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016104 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016105sed 's/^/| /' conftest.$ac_ext >&5
16106
Martin v. Löwis11437992002-04-12 09:54:03 +000016107
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016108 LIBS=$_libs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016109 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
16110echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016111if test "${ac_cv_func_pthread_detach+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016112 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016113else
Martin v. Löwis11437992002-04-12 09:54:03 +000016114 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016115/* confdefs.h. */
16116_ACEOF
16117cat confdefs.h >>conftest.$ac_ext
16118cat >>conftest.$ac_ext <<_ACEOF
16119/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016120/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16121 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16122#define pthread_detach innocuous_pthread_detach
16123
Guido van Rossumad678af1998-10-02 14:42:15 +000016124/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016125 which can conflict with char pthread_detach (); below.
16126 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016127 <limits.h> exists even on freestanding compilers. */
16128
16129#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016130# include <limits.h>
16131#else
16132# include <assert.h>
16133#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016134
16135#undef pthread_detach
16136
Martin v. Löwiseba40652007-08-30 20:10:57 +000016137/* Override any GCC internal prototype to avoid an error.
16138 Use char because int might match the return type of a GCC
16139 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016140#ifdef __cplusplus
16141extern "C"
16142#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016143char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016144/* The GNU C library defines this for functions which it implements
16145 to always fail with ENOSYS. Some functions are actually named
16146 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016147#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016148choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016149#endif
16150
Skip Montanaro6dead952003-09-25 14:50:04 +000016151int
16152main ()
16153{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016154return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016155 ;
16156 return 0;
16157}
16158_ACEOF
16159rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016160if { (ac_try="$ac_link"
16161case "(($ac_try" in
16162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16163 *) ac_try_echo=$ac_try;;
16164esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016166 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016167 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016168 grep -v '^ *+' conftest.er1 >conftest.err
16169 rm -f conftest.er1
16170 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016172 (exit $ac_status); } && {
16173 test -z "$ac_c_werror_flag" ||
16174 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016175 } && test -s conftest$ac_exeext &&
16176 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016177 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016178else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016179 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016180sed 's/^/| /' conftest.$ac_ext >&5
16181
Martin v. Löwiseba40652007-08-30 20:10:57 +000016182 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016183fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016184
16185rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016186 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016187fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016188{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16189echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16190if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016191 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016192#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016193_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016194
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016195 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016196 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016197else
Guido van Rossumad678af1998-10-02 14:42:15 +000016198
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016199 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016200 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16201echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016202if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016203 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016204fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016205{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16206echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016207else
16208 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016209{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
16210echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016211cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016212/* confdefs.h. */
16213_ACEOF
16214cat confdefs.h >>conftest.$ac_ext
16215cat >>conftest.$ac_ext <<_ACEOF
16216/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016217$ac_includes_default
16218#include <atheos/threads.h>
16219_ACEOF
16220rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016221if { (ac_try="$ac_compile"
16222case "(($ac_try" in
16223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16224 *) ac_try_echo=$ac_try;;
16225esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016227 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016228 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016229 grep -v '^ *+' conftest.er1 >conftest.err
16230 rm -f conftest.er1
16231 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016233 (exit $ac_status); } && {
16234 test -z "$ac_c_werror_flag" ||
16235 test ! -s conftest.err
16236 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016237 ac_header_compiler=yes
16238else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016239 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016240sed 's/^/| /' conftest.$ac_ext >&5
16241
Martin v. Löwiseba40652007-08-30 20:10:57 +000016242 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016243fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016244
16245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016246{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16247echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016248
16249# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016250{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
16251echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016252cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016253/* confdefs.h. */
16254_ACEOF
16255cat confdefs.h >>conftest.$ac_ext
16256cat >>conftest.$ac_ext <<_ACEOF
16257/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016258#include <atheos/threads.h>
16259_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016260if { (ac_try="$ac_cpp conftest.$ac_ext"
16261case "(($ac_try" in
16262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16263 *) ac_try_echo=$ac_try;;
16264esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016266 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016267 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016268 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016269 rm -f conftest.er1
16270 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016272 (exit $ac_status); } >/dev/null && {
16273 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16274 test ! -s conftest.err
16275 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016276 ac_header_preproc=yes
16277else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016278 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016279sed 's/^/| /' conftest.$ac_ext >&5
16280
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016281 ac_header_preproc=no
16282fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016283
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016284rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016285{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16286echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016287
16288# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016289case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16290 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016291 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16292echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16293 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
16294echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016295 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016296 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016297 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016298 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
16299echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
16300 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
16301echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
16302 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
16303echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
16304 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
16305echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16306 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
16307echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
16308 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
16309echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016310 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016311## -------------------------------------- ##
16312## Report this to http://bugs.python.org/ ##
16313## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016314_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016315 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016316 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016317esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016318{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16319echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016320if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016321 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016322else
16323 ac_cv_header_atheos_threads_h=$ac_header_preproc
16324fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016325{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16326echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016327
16328fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016329if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016330 cat >>confdefs.h <<\_ACEOF
16331#define WITH_THREAD 1
16332_ACEOF
16333
16334
16335cat >>confdefs.h <<\_ACEOF
16336#define ATHEOS_THREADS 1
16337_ACEOF
16338
16339 THREADOBJ="Python/thread.o"
16340else
16341
Martin v. Löwis11437992002-04-12 09:54:03 +000016342 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016343 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16344echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016345if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016346 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016347fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016348{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16349echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016350else
Martin v. Löwis11437992002-04-12 09:54:03 +000016351 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016352{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
16353echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016354cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016355/* confdefs.h. */
16356_ACEOF
16357cat confdefs.h >>conftest.$ac_ext
16358cat >>conftest.$ac_ext <<_ACEOF
16359/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016360$ac_includes_default
16361#include <kernel/OS.h>
16362_ACEOF
16363rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016364if { (ac_try="$ac_compile"
16365case "(($ac_try" in
16366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16367 *) ac_try_echo=$ac_try;;
16368esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016370 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016371 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016372 grep -v '^ *+' conftest.er1 >conftest.err
16373 rm -f conftest.er1
16374 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016376 (exit $ac_status); } && {
16377 test -z "$ac_c_werror_flag" ||
16378 test ! -s conftest.err
16379 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016380 ac_header_compiler=yes
16381else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016382 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016383sed 's/^/| /' conftest.$ac_ext >&5
16384
Martin v. Löwiseba40652007-08-30 20:10:57 +000016385 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016386fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016387
16388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016389{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16390echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016391
16392# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016393{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
16394echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016395cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016396/* confdefs.h. */
16397_ACEOF
16398cat confdefs.h >>conftest.$ac_ext
16399cat >>conftest.$ac_ext <<_ACEOF
16400/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016401#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016402_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016403if { (ac_try="$ac_cpp conftest.$ac_ext"
16404case "(($ac_try" in
16405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16406 *) ac_try_echo=$ac_try;;
16407esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016409 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016410 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016411 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016412 rm -f conftest.er1
16413 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016415 (exit $ac_status); } >/dev/null && {
16416 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16417 test ! -s conftest.err
16418 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016419 ac_header_preproc=yes
16420else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016421 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016422sed 's/^/| /' conftest.$ac_ext >&5
16423
Martin v. Löwis11437992002-04-12 09:54:03 +000016424 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016425fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016426
Martin v. Löwis11437992002-04-12 09:54:03 +000016427rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016428{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16429echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016430
Martin v. Löwis11437992002-04-12 09:54:03 +000016431# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016432case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16433 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016434 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
16435echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16436 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
16437echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016438 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016439 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016440 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016441 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
16442echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
16443 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
16444echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
16445 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
16446echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
16447 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
16448echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
16449 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
16450echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
16451 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
16452echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016453 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016454## -------------------------------------- ##
16455## Report this to http://bugs.python.org/ ##
16456## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016457_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016458 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016459 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016460esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016461{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16462echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016463if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016464 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016465else
16466 ac_cv_header_kernel_OS_h=$ac_header_preproc
16467fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016468{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16469echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016470
16471fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016472if test $ac_cv_header_kernel_OS_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016473 cat >>confdefs.h <<\_ACEOF
16474#define WITH_THREAD 1
16475_ACEOF
16476
16477
16478cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016479#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016480_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016481
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016482 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016483else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016484
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016485 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16486echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016487if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016488 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016489else
Martin v. Löwis11437992002-04-12 09:54:03 +000016490 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016491LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016492cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016493/* confdefs.h. */
16494_ACEOF
16495cat confdefs.h >>conftest.$ac_ext
16496cat >>conftest.$ac_ext <<_ACEOF
16497/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016498
Martin v. Löwiseba40652007-08-30 20:10:57 +000016499/* Override any GCC internal prototype to avoid an error.
16500 Use char because int might match the return type of a GCC
16501 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016502#ifdef __cplusplus
16503extern "C"
16504#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016505char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016506int
16507main ()
16508{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016509return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016510 ;
16511 return 0;
16512}
16513_ACEOF
16514rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016515if { (ac_try="$ac_link"
16516case "(($ac_try" in
16517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16518 *) ac_try_echo=$ac_try;;
16519esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016521 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016522 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016523 grep -v '^ *+' conftest.er1 >conftest.err
16524 rm -f conftest.er1
16525 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016527 (exit $ac_status); } && {
16528 test -z "$ac_c_werror_flag" ||
16529 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016530 } && test -s conftest$ac_exeext &&
16531 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016532 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016533else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016534 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016535sed 's/^/| /' conftest.$ac_ext >&5
16536
Martin v. Löwiseba40652007-08-30 20:10:57 +000016537 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016539
16540rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016541 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016542LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016543fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016544{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16545echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16546if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016547 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016548#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016549_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016550
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016551 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016552 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016553 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016554else
Greg Steinadf63d62000-07-05 10:38:09 +000016555
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016556 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16557echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016558if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016559 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016560else
Martin v. Löwis11437992002-04-12 09:54:03 +000016561 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016562LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016563cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016564/* confdefs.h. */
16565_ACEOF
16566cat confdefs.h >>conftest.$ac_ext
16567cat >>conftest.$ac_ext <<_ACEOF
16568/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016569
Martin v. Löwiseba40652007-08-30 20:10:57 +000016570/* Override any GCC internal prototype to avoid an error.
16571 Use char because int might match the return type of a GCC
16572 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016573#ifdef __cplusplus
16574extern "C"
16575#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016576char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016577int
16578main ()
16579{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016580return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016581 ;
16582 return 0;
16583}
16584_ACEOF
16585rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016586if { (ac_try="$ac_link"
16587case "(($ac_try" in
16588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16589 *) ac_try_echo=$ac_try;;
16590esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016592 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016593 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016594 grep -v '^ *+' conftest.er1 >conftest.err
16595 rm -f conftest.er1
16596 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016598 (exit $ac_status); } && {
16599 test -z "$ac_c_werror_flag" ||
16600 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016601 } && test -s conftest$ac_exeext &&
16602 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016603 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016604else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016605 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016606sed 's/^/| /' conftest.$ac_ext >&5
16607
Martin v. Löwiseba40652007-08-30 20:10:57 +000016608 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016609fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016610
16611rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016612 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016613LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016614fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016615{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16616echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16617if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016618 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016619#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016620_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016621
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016622 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016623 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016624 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016625else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016626
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016627 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16628echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016629if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016630 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016631else
Martin v. Löwis11437992002-04-12 09:54:03 +000016632 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016633LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016634cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016635/* confdefs.h. */
16636_ACEOF
16637cat confdefs.h >>conftest.$ac_ext
16638cat >>conftest.$ac_ext <<_ACEOF
16639/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016640
Martin v. Löwiseba40652007-08-30 20:10:57 +000016641/* Override any GCC internal prototype to avoid an error.
16642 Use char because int might match the return type of a GCC
16643 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016644#ifdef __cplusplus
16645extern "C"
16646#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016647char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016648int
16649main ()
16650{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016651return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016652 ;
16653 return 0;
16654}
16655_ACEOF
16656rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016657if { (ac_try="$ac_link"
16658case "(($ac_try" in
16659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16660 *) ac_try_echo=$ac_try;;
16661esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016663 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016664 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016665 grep -v '^ *+' conftest.er1 >conftest.err
16666 rm -f conftest.er1
16667 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016669 (exit $ac_status); } && {
16670 test -z "$ac_c_werror_flag" ||
16671 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016672 } && test -s conftest$ac_exeext &&
16673 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016674 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016675else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016676 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016677sed 's/^/| /' conftest.$ac_ext >&5
16678
Martin v. Löwiseba40652007-08-30 20:10:57 +000016679 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016680fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016681
16682rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016683 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016684LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016685fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016686{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16687echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16688if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016689 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016690#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016691_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016692
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016693 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016694 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016695 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016696else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016697
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016698 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16699echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016700if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016701 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016702else
Martin v. Löwis11437992002-04-12 09:54:03 +000016703 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016704LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016705cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016706/* confdefs.h. */
16707_ACEOF
16708cat confdefs.h >>conftest.$ac_ext
16709cat >>conftest.$ac_ext <<_ACEOF
16710/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016711
Martin v. Löwiseba40652007-08-30 20:10:57 +000016712/* Override any GCC internal prototype to avoid an error.
16713 Use char because int might match the return type of a GCC
16714 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016715#ifdef __cplusplus
16716extern "C"
16717#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016718char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016719int
16720main ()
16721{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016722return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016723 ;
16724 return 0;
16725}
16726_ACEOF
16727rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016728if { (ac_try="$ac_link"
16729case "(($ac_try" in
16730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16731 *) ac_try_echo=$ac_try;;
16732esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016734 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016735 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016736 grep -v '^ *+' conftest.er1 >conftest.err
16737 rm -f conftest.er1
16738 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016740 (exit $ac_status); } && {
16741 test -z "$ac_c_werror_flag" ||
16742 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016743 } && test -s conftest$ac_exeext &&
16744 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016745 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016746else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016748sed 's/^/| /' conftest.$ac_ext >&5
16749
Martin v. Löwiseba40652007-08-30 20:10:57 +000016750 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016751fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016752
16753rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016754 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016755LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016756fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016757{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16758echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16759if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016760 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016761#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016762_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016763
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016764 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016765 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016766 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016767else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016768
Martin v. Löwis130fb172001-07-19 11:00:41 +000016769 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016770fi
16771
Guido van Rossum627b2d71993-12-24 10:39:16 +000016772
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016773fi
16774
Guido van Rossum0be3e491997-05-22 20:33:33 +000016775fi
16776
Guido van Rossum49545951997-12-02 19:28:29 +000016777fi
16778
Guido van Rossumb93a8621998-05-07 13:27:32 +000016779fi
16780
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016781
Michael W. Hudson54241132001-12-07 15:38:26 +000016782fi
16783
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016784
16785fi
16786
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016787fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016788
16789rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016790 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016791fi
16792
Martin v. Löwis11437992002-04-12 09:54:03 +000016793fi
16794
16795
16796fi
16797
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016798
Michael W. Hudson54241132001-12-07 15:38:26 +000016799
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016800 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16801echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016802if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016803 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016804else
Martin v. Löwis11437992002-04-12 09:54:03 +000016805 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016806LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016807cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016808/* confdefs.h. */
16809_ACEOF
16810cat confdefs.h >>conftest.$ac_ext
16811cat >>conftest.$ac_ext <<_ACEOF
16812/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016813
Martin v. Löwiseba40652007-08-30 20:10:57 +000016814/* Override any GCC internal prototype to avoid an error.
16815 Use char because int might match the return type of a GCC
16816 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016817#ifdef __cplusplus
16818extern "C"
16819#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016820char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016821int
16822main ()
16823{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016824return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016825 ;
16826 return 0;
16827}
16828_ACEOF
16829rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016830if { (ac_try="$ac_link"
16831case "(($ac_try" in
16832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16833 *) ac_try_echo=$ac_try;;
16834esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016836 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016837 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016838 grep -v '^ *+' conftest.er1 >conftest.err
16839 rm -f conftest.er1
16840 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016842 (exit $ac_status); } && {
16843 test -z "$ac_c_werror_flag" ||
16844 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016845 } && test -s conftest$ac_exeext &&
16846 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016847 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016848else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016849 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016850sed 's/^/| /' conftest.$ac_ext >&5
16851
Martin v. Löwiseba40652007-08-30 20:10:57 +000016852 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016853fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016854
16855rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016856 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016857LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016858fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016859{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16860echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16861if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016862 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016863#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016864_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016865
Martin v. Löwis130fb172001-07-19 11:00:41 +000016866 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016867 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016868 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016869fi
16870
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016871
Neal Norwitza978ab02002-11-02 16:58:05 +000016872 if test "$posix_threads" != "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016873 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16874echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016875if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016876 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016877else
Martin v. Löwis11437992002-04-12 09:54:03 +000016878 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016879LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016880cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016881/* confdefs.h. */
16882_ACEOF
16883cat confdefs.h >>conftest.$ac_ext
16884cat >>conftest.$ac_ext <<_ACEOF
16885/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016886
Martin v. Löwiseba40652007-08-30 20:10:57 +000016887/* Override any GCC internal prototype to avoid an error.
16888 Use char because int might match the return type of a GCC
16889 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016890#ifdef __cplusplus
16891extern "C"
16892#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016893char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016894int
16895main ()
16896{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016897return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016898 ;
16899 return 0;
16900}
16901_ACEOF
16902rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016903if { (ac_try="$ac_link"
16904case "(($ac_try" in
16905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16906 *) ac_try_echo=$ac_try;;
16907esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016909 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016910 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016911 grep -v '^ *+' conftest.er1 >conftest.err
16912 rm -f conftest.er1
16913 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016915 (exit $ac_status); } && {
16916 test -z "$ac_c_werror_flag" ||
16917 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016918 } && test -s conftest$ac_exeext &&
16919 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016920 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016921else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016922 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016923sed 's/^/| /' conftest.$ac_ext >&5
16924
Martin v. Löwiseba40652007-08-30 20:10:57 +000016925 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016926fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016927
16928rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016929 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016930LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016931fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016932{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16933echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16934if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016935 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016936#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016937_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016938
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016939 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016940 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016941 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016942fi
16943
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016944 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016945
Martin v. Löwis130fb172001-07-19 11:00:41 +000016946 if test "$USE_THREAD_MODULE" != "#"
16947 then
16948 # If the above checks didn't disable threads, (at least) OSF1
16949 # needs this '-threads' argument during linking.
16950 case $ac_sys_system in
16951 OSF1) LDLAST=-threads;;
16952 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016953 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016954fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016955
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016956if test "$posix_threads" = "yes"; then
16957 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016958
16959cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016960#define _POSIX_THREADS 1
16961_ACEOF
16962
16963 fi
16964
16965 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16966 case $ac_sys_system/$ac_sys_release in
16967 SunOS/5.6)
16968cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016969#define HAVE_PTHREAD_DESTRUCTOR 1
16970_ACEOF
16971
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016972 ;;
16973 SunOS/5.8)
16974cat >>confdefs.h <<\_ACEOF
16975#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16976_ACEOF
16977
16978 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000016979 AIX/5)
16980cat >>confdefs.h <<\_ACEOF
16981#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16982_ACEOF
16983
16984 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016985 esac
16986
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016987 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16988echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016989 if test "${ac_cv_pthread_system_supported+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016990 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016991else
16992 if test "$cross_compiling" = yes; then
16993 ac_cv_pthread_system_supported=no
16994else
16995 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016996/* confdefs.h. */
16997_ACEOF
16998cat confdefs.h >>conftest.$ac_ext
16999cat >>conftest.$ac_ext <<_ACEOF
17000/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017001#include <pthread.h>
17002 void *foo(void *parm) {
17003 return NULL;
17004 }
17005 main() {
17006 pthread_attr_t attr;
17007 pthread_t id;
17008 if (pthread_attr_init(&attr)) exit(-1);
17009 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
17010 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
17011 exit(0);
17012 }
17013_ACEOF
17014rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017015if { (ac_try="$ac_link"
17016case "(($ac_try" in
17017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17018 *) ac_try_echo=$ac_try;;
17019esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017021 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017022 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017024 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017025 { (case "(($ac_try" in
17026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17027 *) ac_try_echo=$ac_try;;
17028esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017030 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017031 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017033 (exit $ac_status); }; }; then
17034 ac_cv_pthread_system_supported=yes
17035else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017036 echo "$as_me: program exited with status $ac_status" >&5
17037echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017038sed 's/^/| /' conftest.$ac_ext >&5
17039
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017040( exit $ac_status )
17041ac_cv_pthread_system_supported=no
17042fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017043rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017044fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017045
Martin v. Löwiseba40652007-08-30 20:10:57 +000017046
17047
Guido van Rossum627b2d71993-12-24 10:39:16 +000017048fi
17049
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017050 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
17051echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017052 if test "$ac_cv_pthread_system_supported" = "yes"; then
17053
17054cat >>confdefs.h <<\_ACEOF
17055#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
17056_ACEOF
17057
17058 fi
17059
17060for ac_func in pthread_sigmask
17061do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017062as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17063{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17064echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017065if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017066 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017067else
17068 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017069/* confdefs.h. */
17070_ACEOF
17071cat confdefs.h >>conftest.$ac_ext
17072cat >>conftest.$ac_ext <<_ACEOF
17073/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017074/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17075 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17076#define $ac_func innocuous_$ac_func
17077
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017078/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017079 which can conflict with char $ac_func (); below.
17080 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017081 <limits.h> exists even on freestanding compilers. */
17082
17083#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017084# include <limits.h>
17085#else
17086# include <assert.h>
17087#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017088
17089#undef $ac_func
17090
Martin v. Löwiseba40652007-08-30 20:10:57 +000017091/* Override any GCC internal prototype to avoid an error.
17092 Use char because int might match the return type of a GCC
17093 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017094#ifdef __cplusplus
17095extern "C"
17096#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017097char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017098/* The GNU C library defines this for functions which it implements
17099 to always fail with ENOSYS. Some functions are actually named
17100 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017101#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017102choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017103#endif
17104
Skip Montanaro6dead952003-09-25 14:50:04 +000017105int
17106main ()
17107{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017108return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017109 ;
17110 return 0;
17111}
17112_ACEOF
17113rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017114if { (ac_try="$ac_link"
17115case "(($ac_try" in
17116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17117 *) ac_try_echo=$ac_try;;
17118esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017120 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017121 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017122 grep -v '^ *+' conftest.er1 >conftest.err
17123 rm -f conftest.er1
17124 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017126 (exit $ac_status); } && {
17127 test -z "$ac_c_werror_flag" ||
17128 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017129 } && test -s conftest$ac_exeext &&
17130 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017131 eval "$as_ac_var=yes"
17132else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017133 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017134sed 's/^/| /' conftest.$ac_ext >&5
17135
Martin v. Löwiseba40652007-08-30 20:10:57 +000017136 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017137fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017138
17139rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017140 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017141fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017142ac_res=`eval echo '${'$as_ac_var'}'`
17143 { echo "$as_me:$LINENO: result: $ac_res" >&5
17144echo "${ECHO_T}$ac_res" >&6; }
17145if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017146 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017147#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017148_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000017149 case $ac_sys_system in
17150 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017151
Jason Tishlerfac083d2003-07-22 15:20:49 +000017152cat >>confdefs.h <<\_ACEOF
17153#define HAVE_BROKEN_PTHREAD_SIGMASK 1
17154_ACEOF
17155
17156 ;;
17157 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017158fi
17159done
17160
17161fi
17162
17163
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017164# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000017165
17166
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017167{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
17168echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017169# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017170if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017171 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017172 no)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017173 { echo "$as_me:$LINENO: result: no" >&5
17174echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017175 ipv6=no
17176 ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017177 *) { echo "$as_me:$LINENO: result: yes" >&5
17178echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017179 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017180#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017181_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017182
17183 ipv6=yes
17184 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017185 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017186else
Martin v. Löwis11437992002-04-12 09:54:03 +000017187
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017188 if test "$cross_compiling" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017189 { echo "$as_me:$LINENO: result: no" >&5
17190echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017191 ipv6=no
17192
17193else
Martin v. Löwis11437992002-04-12 09:54:03 +000017194 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017195/* confdefs.h. */
17196_ACEOF
17197cat confdefs.h >>conftest.$ac_ext
17198cat >>conftest.$ac_ext <<_ACEOF
17199/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017200 /* AF_INET6 available check */
17201#include <sys/types.h>
17202#include <sys/socket.h>
17203main()
17204{
17205 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
17206 exit(1);
17207 else
17208 exit(0);
17209}
17210
Martin v. Löwis11437992002-04-12 09:54:03 +000017211_ACEOF
17212rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017213if { (ac_try="$ac_link"
17214case "(($ac_try" in
17215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17216 *) ac_try_echo=$ac_try;;
17217esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017219 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017220 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017222 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017223 { (case "(($ac_try" in
17224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17225 *) ac_try_echo=$ac_try;;
17226esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017228 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017229 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017231 (exit $ac_status); }; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017232 { echo "$as_me:$LINENO: result: yes" >&5
17233echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017234 ipv6=yes
17235else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017236 echo "$as_me: program exited with status $ac_status" >&5
17237echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017238sed 's/^/| /' conftest.$ac_ext >&5
17239
Martin v. Löwis11437992002-04-12 09:54:03 +000017240( exit $ac_status )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017241{ echo "$as_me:$LINENO: result: no" >&5
17242echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017243 ipv6=no
17244fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017245rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017246fi
17247
Martin v. Löwiseba40652007-08-30 20:10:57 +000017248
17249
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017250if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017251 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
17252echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017253 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017254/* confdefs.h. */
17255_ACEOF
17256cat confdefs.h >>conftest.$ac_ext
17257cat >>conftest.$ac_ext <<_ACEOF
17258/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017259#include <sys/types.h>
17260#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017261int
17262main ()
17263{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017264struct sockaddr_in6 x;
17265x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000017266 ;
17267 return 0;
17268}
17269_ACEOF
17270rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017271if { (ac_try="$ac_compile"
17272case "(($ac_try" in
17273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17274 *) ac_try_echo=$ac_try;;
17275esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017277 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017278 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017279 grep -v '^ *+' conftest.er1 >conftest.err
17280 rm -f conftest.er1
17281 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017283 (exit $ac_status); } && {
17284 test -z "$ac_c_werror_flag" ||
17285 test ! -s conftest.err
17286 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017287 { echo "$as_me:$LINENO: result: yes" >&5
17288echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017289 ipv6=yes
17290else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017291 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017292sed 's/^/| /' conftest.$ac_ext >&5
17293
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017294 { echo "$as_me:$LINENO: result: no" >&5
17295echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017296 ipv6=no
17297fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017298
17299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017300fi
17301
17302if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017303 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017304#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017305_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017306
17307fi
17308
Martin v. Löwiseba40652007-08-30 20:10:57 +000017309fi
17310
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017311
17312ipv6type=unknown
17313ipv6lib=none
17314ipv6trylibc=no
17315
17316if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017317 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17318echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017319 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17320 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017321 case $i in
17322 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017323 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017324/* confdefs.h. */
17325_ACEOF
17326cat confdefs.h >>conftest.$ac_ext
17327cat >>conftest.$ac_ext <<_ACEOF
17328/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017329
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017330#include <netinet/in.h>
17331#ifdef IPV6_INRIA_VERSION
17332yes
17333#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017334_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017335if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017336 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017337 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017338fi
Mark Dickinsonab442262009-11-20 19:27:43 +000017339rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017340
17341 ;;
17342 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017343 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017344/* confdefs.h. */
17345_ACEOF
17346cat confdefs.h >>conftest.$ac_ext
17347cat >>conftest.$ac_ext <<_ACEOF
17348/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017349
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017350#include <netinet/in.h>
17351#ifdef __KAME__
17352yes
17353#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017354_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017355if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017356 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017357 ipv6type=$i;
17358 ipv6lib=inet6
17359 ipv6libdir=/usr/local/v6/lib
17360 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017361fi
Mark Dickinsonab442262009-11-20 19:27:43 +000017362rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017363
17364 ;;
17365 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017366 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017367/* confdefs.h. */
17368_ACEOF
17369cat confdefs.h >>conftest.$ac_ext
17370cat >>conftest.$ac_ext <<_ACEOF
17371/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017372
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017373#include <features.h>
17374#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17375yes
17376#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017377_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017378if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017379 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017380 ipv6type=$i;
17381 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017382fi
Mark Dickinsonab442262009-11-20 19:27:43 +000017383rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017384
17385 ;;
17386 linux-inet6)
17387 if test -d /usr/inet6; then
17388 ipv6type=$i
17389 ipv6lib=inet6
17390 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017391 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017392 fi
17393 ;;
17394 solaris)
17395 if test -f /etc/netconfig; then
17396 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17397 ipv6type=$i
17398 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017399 fi
17400 fi
17401 ;;
17402 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017403 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017404/* confdefs.h. */
17405_ACEOF
17406cat confdefs.h >>conftest.$ac_ext
17407cat >>conftest.$ac_ext <<_ACEOF
17408/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017409
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017410#include <sys/param.h>
17411#ifdef _TOSHIBA_INET6
17412yes
17413#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017414_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017415if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017416 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017417 ipv6type=$i;
17418 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017419 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017420fi
Mark Dickinsonab442262009-11-20 19:27:43 +000017421rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017422
17423 ;;
17424 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017425 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017426/* confdefs.h. */
17427_ACEOF
17428cat confdefs.h >>conftest.$ac_ext
17429cat >>conftest.$ac_ext <<_ACEOF
17430/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017431
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017432#include </usr/local/v6/include/sys/v6config.h>
17433#ifdef __V6D__
17434yes
17435#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017436_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017437if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017438 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017439 ipv6type=$i;
17440 ipv6lib=v6;
17441 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017442 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017443fi
Mark Dickinsonab442262009-11-20 19:27:43 +000017444rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017445
17446 ;;
17447 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017448 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017449/* confdefs.h. */
17450_ACEOF
17451cat confdefs.h >>conftest.$ac_ext
17452cat >>conftest.$ac_ext <<_ACEOF
17453/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017454
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017455#include <sys/param.h>
17456#ifdef _ZETA_MINAMI_INET6
17457yes
17458#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017459_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017460if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017461 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017462 ipv6type=$i;
17463 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017464 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017465fi
Mark Dickinsonab442262009-11-20 19:27:43 +000017466rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017467
17468 ;;
17469 esac
17470 if test "$ipv6type" != "unknown"; then
17471 break
17472 fi
17473 done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017474 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17475echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017476fi
17477
17478if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17479 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17480 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17481 echo "using lib$ipv6lib"
17482 else
17483 if test $ipv6trylibc = "yes"; then
17484 echo "using libc"
17485 else
17486 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17487 echo "You need to fetch lib$ipv6lib.a from appropriate"
17488 echo 'ipv6 kit and compile beforehand.'
17489 exit 1
17490 fi
17491 fi
17492fi
17493
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017494{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17495echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017496cat >conftest.$ac_ext <<_ACEOF
17497/* confdefs.h. */
17498_ACEOF
17499cat confdefs.h >>conftest.$ac_ext
17500cat >>conftest.$ac_ext <<_ACEOF
17501/* end confdefs.h. */
17502#include <Carbon/Carbon.h>
17503int
17504main ()
17505{
17506FSIORefNum fRef = 0
17507 ;
17508 return 0;
17509}
17510_ACEOF
17511rm -f conftest.$ac_objext
17512if { (ac_try="$ac_compile"
17513case "(($ac_try" in
17514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17515 *) ac_try_echo=$ac_try;;
17516esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017518 (eval "$ac_compile") 2>conftest.er1
17519 ac_status=$?
17520 grep -v '^ *+' conftest.er1 >conftest.err
17521 rm -f conftest.er1
17522 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017524 (exit $ac_status); } && {
17525 test -z "$ac_c_werror_flag" ||
17526 test ! -s conftest.err
17527 } && test -s conftest.$ac_objext; then
17528
17529cat >>confdefs.h <<\_ACEOF
17530#define HAVE_OSX105_SDK 1
17531_ACEOF
17532
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017533 { echo "$as_me:$LINENO: result: yes" >&5
17534echo "${ECHO_T}yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017535else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017536 echo "$as_me: failed program was:" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017537sed 's/^/| /' conftest.$ac_ext >&5
17538
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017539 { echo "$as_me:$LINENO: result: no" >&5
17540echo "${ECHO_T}no" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017541
17542fi
17543
17544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17545
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017546# Check for --with-doc-strings
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017547{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17548echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017549
Martin v. Löwiseba40652007-08-30 20:10:57 +000017550# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017551if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017552 withval=$with_doc_strings;
17553fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017554
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017555
17556if test -z "$with_doc_strings"
17557then with_doc_strings="yes"
17558fi
17559if test "$with_doc_strings" != "no"
17560then
17561
17562cat >>confdefs.h <<\_ACEOF
17563#define WITH_DOC_STRINGS 1
17564_ACEOF
17565
17566fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017567{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17568echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017569
Neil Schemenauera35c6882001-02-27 04:45:05 +000017570# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017571{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17572echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017573
Martin v. Löwiseba40652007-08-30 20:10:57 +000017574# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017575if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017576 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017577if test "$withval" != no
17578then
17579
17580cat >>confdefs.h <<\_ACEOF
17581#define WITH_TSC 1
17582_ACEOF
17583
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017584 { echo "$as_me:$LINENO: result: yes" >&5
17585echo "${ECHO_T}yes" >&6; }
17586else { echo "$as_me:$LINENO: result: no" >&5
17587echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017588fi
17589else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017590 { echo "$as_me:$LINENO: result: no" >&5
17591echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017592fi
17593
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017594
17595# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017596{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17597echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017598
Martin v. Löwiseba40652007-08-30 20:10:57 +000017599# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017600if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017601 withval=$with_pymalloc;
17602fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017603
Neil Schemenauera35c6882001-02-27 04:45:05 +000017604
Neil Schemenauer16c22972002-03-22 15:34:49 +000017605if test -z "$with_pymalloc"
17606then with_pymalloc="yes"
17607fi
17608if test "$with_pymalloc" != "no"
17609then
Martin v. Löwis11437992002-04-12 09:54:03 +000017610
17611cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017612#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017613_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017614
17615fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017616{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17617echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017618
Barry Warsawef82cd72000-06-30 16:21:01 +000017619# Check for --with-wctype-functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017620{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17621echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017622
Martin v. Löwiseba40652007-08-30 20:10:57 +000017623# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017624if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017625 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017626if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017627then
17628
17629cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017630#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017631_ACEOF
17632
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017633 { echo "$as_me:$LINENO: result: yes" >&5
17634echo "${ECHO_T}yes" >&6; }
17635else { echo "$as_me:$LINENO: result: no" >&5
17636echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017637fi
17638else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017639 { echo "$as_me:$LINENO: result: no" >&5
17640echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017641fi
17642
Barry Warsawef82cd72000-06-30 16:21:01 +000017643
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017644# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017645
Guido van Rossum98935bf2001-09-05 19:13:16 +000017646DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017647
Guido van Rossume97ee181999-12-20 21:27:22 +000017648# the dlopen() function means we might want to use dynload_shlib.o. some
17649# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017650
Thomas Wouters3a584202000-08-05 23:28:51 +000017651for ac_func in dlopen
17652do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017653as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17654{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17655echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017656if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017657 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017658else
Martin v. Löwis11437992002-04-12 09:54:03 +000017659 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017660/* confdefs.h. */
17661_ACEOF
17662cat confdefs.h >>conftest.$ac_ext
17663cat >>conftest.$ac_ext <<_ACEOF
17664/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017665/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17666 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17667#define $ac_func innocuous_$ac_func
17668
Guido van Rossume97ee181999-12-20 21:27:22 +000017669/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017670 which can conflict with char $ac_func (); below.
17671 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017672 <limits.h> exists even on freestanding compilers. */
17673
17674#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017675# include <limits.h>
17676#else
17677# include <assert.h>
17678#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017679
17680#undef $ac_func
17681
Martin v. Löwiseba40652007-08-30 20:10:57 +000017682/* Override any GCC internal prototype to avoid an error.
17683 Use char because int might match the return type of a GCC
17684 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017685#ifdef __cplusplus
17686extern "C"
17687#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017688char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017689/* The GNU C library defines this for functions which it implements
17690 to always fail with ENOSYS. Some functions are actually named
17691 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017692#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017693choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017694#endif
17695
Skip Montanaro6dead952003-09-25 14:50:04 +000017696int
17697main ()
17698{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017699return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017700 ;
17701 return 0;
17702}
17703_ACEOF
17704rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017705if { (ac_try="$ac_link"
17706case "(($ac_try" in
17707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17708 *) ac_try_echo=$ac_try;;
17709esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017710eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017711 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017712 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017713 grep -v '^ *+' conftest.er1 >conftest.err
17714 rm -f conftest.er1
17715 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017717 (exit $ac_status); } && {
17718 test -z "$ac_c_werror_flag" ||
17719 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017720 } && test -s conftest$ac_exeext &&
17721 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017722 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017723else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017724 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017725sed 's/^/| /' conftest.$ac_ext >&5
17726
Martin v. Löwiseba40652007-08-30 20:10:57 +000017727 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017728fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017729
17730rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017731 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017732fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017733ac_res=`eval echo '${'$as_ac_var'}'`
17734 { echo "$as_me:$LINENO: result: $ac_res" >&5
17735echo "${ECHO_T}$ac_res" >&6; }
17736if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017737 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017738#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017739_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017740
Guido van Rossume97ee181999-12-20 21:27:22 +000017741fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017742done
Guido van Rossume97ee181999-12-20 21:27:22 +000017743
Michael W. Hudson54241132001-12-07 15:38:26 +000017744
Guido van Rossume97ee181999-12-20 21:27:22 +000017745# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17746# loading of modules.
17747
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017748{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17749echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017750if test -z "$DYNLOADFILE"
17751then
17752 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017753 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17754 if test "$ac_cv_func_dlopen" = yes
17755 then DYNLOADFILE="dynload_shlib.o"
17756 else DYNLOADFILE="dynload_aix.o"
17757 fi
17758 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017759 BeOS*) DYNLOADFILE="dynload_beos.o";;
17760 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000017761 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17762 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017763 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017764 *)
17765 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17766 # out any dynamic loading
17767 if test "$ac_cv_func_dlopen" = yes
17768 then DYNLOADFILE="dynload_shlib.o"
17769 else DYNLOADFILE="dynload_stub.o"
17770 fi
17771 ;;
17772 esac
17773fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017774{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17775echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017776if test "$DYNLOADFILE" != "dynload_stub.o"
17777then
Martin v. Löwis11437992002-04-12 09:54:03 +000017778
17779cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017780#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017781_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017782
17783fi
17784
Neil Schemenauer4e425612001-06-19 15:44:15 +000017785# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17786
Michael W. Hudson54241132001-12-07 15:38:26 +000017787
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017788{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17789echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017790if test -z "$MACHDEP_OBJS"
17791then
Jack Jansene578a632001-08-15 01:27:14 +000017792 MACHDEP_OBJS=$extra_machdep_objs
17793else
17794 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017795fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017796{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17797echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017798
Guido van Rossum627b2d71993-12-24 10:39:16 +000017799# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017800
17801
17802
17803
17804
17805
17806
17807
17808
17809
17810
17811
17812
17813
17814
17815
17816
17817
17818
17819
17820
17821
17822
17823
17824
17825
17826
17827
17828
17829
17830
17831
17832
17833
17834
17835
17836
17837
17838
17839
17840
17841
17842
17843
17844
17845
17846
17847
17848
17849
17850
17851
17852
17853
17854
17855
17856
17857
17858
17859
17860
17861
17862
17863
17864
17865
17866
17867
17868
17869
17870
Martin v. Löwisd6320502004-08-12 13:45:08 +000017871
Martin v. Löwisc3001752005-01-23 09:27:24 +000017872
17873
Neal Norwitz05a45592006-03-20 06:30:08 +000017874
17875
Martin v. Löwis382abef2007-02-19 10:55:19 +000017876
17877
Christian Heimes36281872007-11-30 21:11:28 +000017878
Martin v. Löwisaef18b12008-03-24 13:31:16 +000017879
17880
Jesse Noller355b1262009-04-02 00:03:28 +000017881
17882
17883
17884
Martin v. Löwis50ea4562009-11-27 13:56:01 +000017885
17886
17887
17888
17889
17890
17891
17892
17893
17894
17895
17896
17897
Martin v. Löwisaef18b12008-03-24 13:31:16 +000017898for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
17899 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000017900 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000017901 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017902 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017903 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000017904 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000017905 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
17906 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000017907 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000017908 setlocale setregid setreuid setresuid setresgid \
17909 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000017910 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000017911 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000017912 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000017913do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017914as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17915{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17916echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017917if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017918 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017919else
Martin v. Löwis11437992002-04-12 09:54:03 +000017920 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017921/* confdefs.h. */
17922_ACEOF
17923cat confdefs.h >>conftest.$ac_ext
17924cat >>conftest.$ac_ext <<_ACEOF
17925/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017926/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17927 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17928#define $ac_func innocuous_$ac_func
17929
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017930/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017931 which can conflict with char $ac_func (); below.
17932 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017933 <limits.h> exists even on freestanding compilers. */
17934
17935#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017936# include <limits.h>
17937#else
17938# include <assert.h>
17939#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017940
17941#undef $ac_func
17942
Martin v. Löwiseba40652007-08-30 20:10:57 +000017943/* Override any GCC internal prototype to avoid an error.
17944 Use char because int might match the return type of a GCC
17945 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017946#ifdef __cplusplus
17947extern "C"
17948#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017949char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017950/* The GNU C library defines this for functions which it implements
17951 to always fail with ENOSYS. Some functions are actually named
17952 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017953#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017954choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017955#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017956
Skip Montanaro6dead952003-09-25 14:50:04 +000017957int
17958main ()
17959{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017960return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017961 ;
17962 return 0;
17963}
17964_ACEOF
17965rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017966if { (ac_try="$ac_link"
17967case "(($ac_try" in
17968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17969 *) ac_try_echo=$ac_try;;
17970esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017972 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017973 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017974 grep -v '^ *+' conftest.er1 >conftest.err
17975 rm -f conftest.er1
17976 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017978 (exit $ac_status); } && {
17979 test -z "$ac_c_werror_flag" ||
17980 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017981 } && test -s conftest$ac_exeext &&
17982 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017983 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017984else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017985 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017986sed 's/^/| /' conftest.$ac_ext >&5
17987
Martin v. Löwiseba40652007-08-30 20:10:57 +000017988 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017989fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017990
17991rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017992 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017993fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017994ac_res=`eval echo '${'$as_ac_var'}'`
17995 { echo "$as_me:$LINENO: result: $ac_res" >&5
17996echo "${ECHO_T}$ac_res" >&6; }
17997if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017998 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017999#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018000_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018001
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018002fi
18003done
18004
Michael W. Hudson54241132001-12-07 15:38:26 +000018005
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018006# For some functions, having a definition is not sufficient, since
18007# we want to take their address.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018008{ echo "$as_me:$LINENO: checking for chroot" >&5
18009echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018010cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018011/* confdefs.h. */
18012_ACEOF
18013cat confdefs.h >>conftest.$ac_ext
18014cat >>conftest.$ac_ext <<_ACEOF
18015/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018016#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018017int
18018main ()
18019{
18020void *x=chroot
18021 ;
18022 return 0;
18023}
18024_ACEOF
18025rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018026if { (ac_try="$ac_compile"
18027case "(($ac_try" in
18028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18029 *) ac_try_echo=$ac_try;;
18030esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018032 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018033 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018034 grep -v '^ *+' conftest.er1 >conftest.err
18035 rm -f conftest.er1
18036 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018038 (exit $ac_status); } && {
18039 test -z "$ac_c_werror_flag" ||
18040 test ! -s conftest.err
18041 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018042
18043cat >>confdefs.h <<\_ACEOF
18044#define HAVE_CHROOT 1
18045_ACEOF
18046
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018047 { echo "$as_me:$LINENO: result: yes" >&5
18048echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018049else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018050 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018051sed 's/^/| /' conftest.$ac_ext >&5
18052
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018053 { echo "$as_me:$LINENO: result: no" >&5
18054echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018055
18056fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018057
18058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018059{ echo "$as_me:$LINENO: checking for link" >&5
18060echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018061cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018062/* confdefs.h. */
18063_ACEOF
18064cat confdefs.h >>conftest.$ac_ext
18065cat >>conftest.$ac_ext <<_ACEOF
18066/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018067#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018068int
18069main ()
18070{
18071void *x=link
18072 ;
18073 return 0;
18074}
18075_ACEOF
18076rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018077if { (ac_try="$ac_compile"
18078case "(($ac_try" in
18079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18080 *) ac_try_echo=$ac_try;;
18081esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018083 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018084 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018085 grep -v '^ *+' conftest.er1 >conftest.err
18086 rm -f conftest.er1
18087 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018089 (exit $ac_status); } && {
18090 test -z "$ac_c_werror_flag" ||
18091 test ! -s conftest.err
18092 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018093
18094cat >>confdefs.h <<\_ACEOF
18095#define HAVE_LINK 1
18096_ACEOF
18097
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018098 { echo "$as_me:$LINENO: result: yes" >&5
18099echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018100else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018101 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018102sed 's/^/| /' conftest.$ac_ext >&5
18103
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018104 { echo "$as_me:$LINENO: result: no" >&5
18105echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018106
18107fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018108
18109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018110{ echo "$as_me:$LINENO: checking for symlink" >&5
18111echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018112cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018113/* confdefs.h. */
18114_ACEOF
18115cat confdefs.h >>conftest.$ac_ext
18116cat >>conftest.$ac_ext <<_ACEOF
18117/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018118#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018119int
18120main ()
18121{
18122void *x=symlink
18123 ;
18124 return 0;
18125}
18126_ACEOF
18127rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018128if { (ac_try="$ac_compile"
18129case "(($ac_try" in
18130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18131 *) ac_try_echo=$ac_try;;
18132esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018134 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018135 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018136 grep -v '^ *+' conftest.er1 >conftest.err
18137 rm -f conftest.er1
18138 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018140 (exit $ac_status); } && {
18141 test -z "$ac_c_werror_flag" ||
18142 test ! -s conftest.err
18143 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018144
18145cat >>confdefs.h <<\_ACEOF
18146#define HAVE_SYMLINK 1
18147_ACEOF
18148
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018149 { echo "$as_me:$LINENO: result: yes" >&5
18150echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018151else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018152 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018153sed 's/^/| /' conftest.$ac_ext >&5
18154
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018155 { echo "$as_me:$LINENO: result: no" >&5
18156echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018157
18158fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018159
18160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018161{ echo "$as_me:$LINENO: checking for fchdir" >&5
18162echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018163cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018164/* confdefs.h. */
18165_ACEOF
18166cat confdefs.h >>conftest.$ac_ext
18167cat >>conftest.$ac_ext <<_ACEOF
18168/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018169#include <unistd.h>
18170int
18171main ()
18172{
18173void *x=fchdir
18174 ;
18175 return 0;
18176}
18177_ACEOF
18178rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018179if { (ac_try="$ac_compile"
18180case "(($ac_try" in
18181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18182 *) ac_try_echo=$ac_try;;
18183esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018185 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018186 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018187 grep -v '^ *+' conftest.er1 >conftest.err
18188 rm -f conftest.er1
18189 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018191 (exit $ac_status); } && {
18192 test -z "$ac_c_werror_flag" ||
18193 test ! -s conftest.err
18194 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018195
18196cat >>confdefs.h <<\_ACEOF
18197#define HAVE_FCHDIR 1
18198_ACEOF
18199
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018200 { echo "$as_me:$LINENO: result: yes" >&5
18201echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018202else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018203 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018204sed 's/^/| /' conftest.$ac_ext >&5
18205
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018206 { echo "$as_me:$LINENO: result: no" >&5
18207echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018208
18209fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018210
18211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018212{ echo "$as_me:$LINENO: checking for fsync" >&5
18213echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018214cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018215/* confdefs.h. */
18216_ACEOF
18217cat confdefs.h >>conftest.$ac_ext
18218cat >>conftest.$ac_ext <<_ACEOF
18219/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018220#include <unistd.h>
18221int
18222main ()
18223{
18224void *x=fsync
18225 ;
18226 return 0;
18227}
18228_ACEOF
18229rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018230if { (ac_try="$ac_compile"
18231case "(($ac_try" in
18232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18233 *) ac_try_echo=$ac_try;;
18234esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018236 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018237 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018238 grep -v '^ *+' conftest.er1 >conftest.err
18239 rm -f conftest.er1
18240 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018242 (exit $ac_status); } && {
18243 test -z "$ac_c_werror_flag" ||
18244 test ! -s conftest.err
18245 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018246
18247cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018248#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018249_ACEOF
18250
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018251 { echo "$as_me:$LINENO: result: yes" >&5
18252echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018253else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018254 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018255sed 's/^/| /' conftest.$ac_ext >&5
18256
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018257 { echo "$as_me:$LINENO: result: no" >&5
18258echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018259
18260fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018261
18262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018263{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18264echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018265cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018266/* confdefs.h. */
18267_ACEOF
18268cat confdefs.h >>conftest.$ac_ext
18269cat >>conftest.$ac_ext <<_ACEOF
18270/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018271#include <unistd.h>
18272int
18273main ()
18274{
18275void *x=fdatasync
18276 ;
18277 return 0;
18278}
18279_ACEOF
18280rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018281if { (ac_try="$ac_compile"
18282case "(($ac_try" in
18283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18284 *) ac_try_echo=$ac_try;;
18285esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018286eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018287 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018288 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018289 grep -v '^ *+' conftest.er1 >conftest.err
18290 rm -f conftest.er1
18291 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018293 (exit $ac_status); } && {
18294 test -z "$ac_c_werror_flag" ||
18295 test ! -s conftest.err
18296 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018297
18298cat >>confdefs.h <<\_ACEOF
18299#define HAVE_FDATASYNC 1
18300_ACEOF
18301
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018302 { echo "$as_me:$LINENO: result: yes" >&5
18303echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018304else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018305 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018306sed 's/^/| /' conftest.$ac_ext >&5
18307
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018308 { echo "$as_me:$LINENO: result: no" >&5
18309echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018310
18311fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018312
18313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018314{ echo "$as_me:$LINENO: checking for epoll" >&5
18315echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018316cat >conftest.$ac_ext <<_ACEOF
18317/* confdefs.h. */
18318_ACEOF
18319cat confdefs.h >>conftest.$ac_ext
18320cat >>conftest.$ac_ext <<_ACEOF
18321/* end confdefs.h. */
18322#include <sys/epoll.h>
18323int
18324main ()
18325{
18326void *x=epoll_create
18327 ;
18328 return 0;
18329}
18330_ACEOF
18331rm -f conftest.$ac_objext
18332if { (ac_try="$ac_compile"
18333case "(($ac_try" in
18334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18335 *) ac_try_echo=$ac_try;;
18336esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018338 (eval "$ac_compile") 2>conftest.er1
18339 ac_status=$?
18340 grep -v '^ *+' conftest.er1 >conftest.err
18341 rm -f conftest.er1
18342 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018344 (exit $ac_status); } && {
18345 test -z "$ac_c_werror_flag" ||
18346 test ! -s conftest.err
18347 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018348
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018349cat >>confdefs.h <<\_ACEOF
18350#define HAVE_EPOLL 1
18351_ACEOF
18352
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018353 { echo "$as_me:$LINENO: result: yes" >&5
18354echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018355else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018356 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018357sed 's/^/| /' conftest.$ac_ext >&5
18358
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018359 { echo "$as_me:$LINENO: result: no" >&5
18360echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018361
18362fi
18363
18364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018365{ echo "$as_me:$LINENO: checking for kqueue" >&5
18366echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018367cat >conftest.$ac_ext <<_ACEOF
18368/* confdefs.h. */
18369_ACEOF
18370cat confdefs.h >>conftest.$ac_ext
18371cat >>conftest.$ac_ext <<_ACEOF
18372/* end confdefs.h. */
18373
18374#include <sys/types.h>
18375#include <sys/event.h>
18376
18377int
18378main ()
18379{
18380int x=kqueue()
18381 ;
18382 return 0;
18383}
18384_ACEOF
18385rm -f conftest.$ac_objext
18386if { (ac_try="$ac_compile"
18387case "(($ac_try" in
18388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18389 *) ac_try_echo=$ac_try;;
18390esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018392 (eval "$ac_compile") 2>conftest.er1
18393 ac_status=$?
18394 grep -v '^ *+' conftest.er1 >conftest.err
18395 rm -f conftest.er1
18396 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018398 (exit $ac_status); } && {
18399 test -z "$ac_c_werror_flag" ||
18400 test ! -s conftest.err
18401 } && test -s conftest.$ac_objext; then
18402
18403cat >>confdefs.h <<\_ACEOF
18404#define HAVE_KQUEUE 1
18405_ACEOF
18406
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018407 { echo "$as_me:$LINENO: result: yes" >&5
18408echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018409else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018410 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018411sed 's/^/| /' conftest.$ac_ext >&5
18412
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018413 { echo "$as_me:$LINENO: result: no" >&5
18414echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018415
18416fi
18417
18418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018419# On some systems (eg. FreeBSD 5), we would find a definition of the
18420# functions ctermid_r, setgroups in the library, but no prototype
18421# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18422# address to avoid compiler warnings and potential miscompilations
18423# because of the missing prototypes.
18424
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018425{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18426echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018427cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018428/* confdefs.h. */
18429_ACEOF
18430cat confdefs.h >>conftest.$ac_ext
18431cat >>conftest.$ac_ext <<_ACEOF
18432/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018433
18434#include "confdefs.h"
18435#include <stdio.h>
18436
Martin v. Löwisd5843682002-11-21 20:41:28 +000018437int
18438main ()
18439{
18440void* p = ctermid_r
18441 ;
18442 return 0;
18443}
18444_ACEOF
18445rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018446if { (ac_try="$ac_compile"
18447case "(($ac_try" in
18448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18449 *) ac_try_echo=$ac_try;;
18450esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018452 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018453 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018454 grep -v '^ *+' conftest.er1 >conftest.err
18455 rm -f conftest.er1
18456 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018458 (exit $ac_status); } && {
18459 test -z "$ac_c_werror_flag" ||
18460 test ! -s conftest.err
18461 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018462
18463cat >>confdefs.h <<\_ACEOF
18464#define HAVE_CTERMID_R 1
18465_ACEOF
18466
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018467 { echo "$as_me:$LINENO: result: yes" >&5
18468echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018469else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018470 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018471sed 's/^/| /' conftest.$ac_ext >&5
18472
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018473 { echo "$as_me:$LINENO: result: no" >&5
18474echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018475
18476fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000018477
Martin v. Löwiseba40652007-08-30 20:10:57 +000018478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18479
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018480{ echo "$as_me:$LINENO: checking for flock" >&5
18481echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018482cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018483/* confdefs.h. */
18484_ACEOF
18485cat confdefs.h >>conftest.$ac_ext
18486cat >>conftest.$ac_ext <<_ACEOF
18487/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018488
18489#include "confdefs.h"
18490#include <sys/file.h>
18491
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018492int
18493main ()
18494{
18495void* p = flock
18496 ;
18497 return 0;
18498}
18499_ACEOF
18500rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018501if { (ac_try="$ac_compile"
18502case "(($ac_try" in
18503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18504 *) ac_try_echo=$ac_try;;
18505esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018507 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018508 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018509 grep -v '^ *+' conftest.er1 >conftest.err
18510 rm -f conftest.er1
18511 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018513 (exit $ac_status); } && {
18514 test -z "$ac_c_werror_flag" ||
18515 test ! -s conftest.err
18516 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018517
18518cat >>confdefs.h <<\_ACEOF
18519#define HAVE_FLOCK 1
18520_ACEOF
18521
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018522 { echo "$as_me:$LINENO: result: yes" >&5
18523echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018524else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018525 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018526sed 's/^/| /' conftest.$ac_ext >&5
18527
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018528 { echo "$as_me:$LINENO: result: no" >&5
18529echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018530
18531fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018532
Martin v. Löwiseba40652007-08-30 20:10:57 +000018533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18534
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018535{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18536echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018537cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018538/* confdefs.h. */
18539_ACEOF
18540cat confdefs.h >>conftest.$ac_ext
18541cat >>conftest.$ac_ext <<_ACEOF
18542/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018543
18544#include "confdefs.h"
18545#include <unistd.h>
18546
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018547int
18548main ()
18549{
18550void* p = getpagesize
18551 ;
18552 return 0;
18553}
18554_ACEOF
18555rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018556if { (ac_try="$ac_compile"
18557case "(($ac_try" in
18558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18559 *) ac_try_echo=$ac_try;;
18560esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018562 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018563 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018564 grep -v '^ *+' conftest.er1 >conftest.err
18565 rm -f conftest.er1
18566 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018568 (exit $ac_status); } && {
18569 test -z "$ac_c_werror_flag" ||
18570 test ! -s conftest.err
18571 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018572
18573cat >>confdefs.h <<\_ACEOF
18574#define HAVE_GETPAGESIZE 1
18575_ACEOF
18576
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018577 { echo "$as_me:$LINENO: result: yes" >&5
18578echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018579else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018580 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018581sed 's/^/| /' conftest.$ac_ext >&5
18582
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018583 { echo "$as_me:$LINENO: result: no" >&5
18584echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018585
18586fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018587
18588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018589
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018590for ac_prog in true
18591do
18592 # Extract the first word of "$ac_prog", so it can be a program name with args.
18593set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018594{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18595echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018596if test "${ac_cv_prog_TRUE+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018597 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018598else
18599 if test -n "$TRUE"; then
18600 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18601else
18602as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18603for as_dir in $PATH
18604do
18605 IFS=$as_save_IFS
18606 test -z "$as_dir" && as_dir=.
18607 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000018608 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 +000018609 ac_cv_prog_TRUE="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018610 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018611 break 2
18612 fi
18613done
18614done
Martin v. Löwiseba40652007-08-30 20:10:57 +000018615IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018616
18617fi
18618fi
18619TRUE=$ac_cv_prog_TRUE
18620if test -n "$TRUE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018621 { echo "$as_me:$LINENO: result: $TRUE" >&5
18622echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018623else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018624 { echo "$as_me:$LINENO: result: no" >&5
18625echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018626fi
18627
Martin v. Löwiseba40652007-08-30 20:10:57 +000018628
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018629 test -n "$TRUE" && break
18630done
18631test -n "$TRUE" || TRUE="/bin/true"
18632
18633
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018634{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18635echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018636if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018637 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018638else
18639 ac_check_lib_save_LIBS=$LIBS
18640LIBS="-lc $LIBS"
18641cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018642/* confdefs.h. */
18643_ACEOF
18644cat confdefs.h >>conftest.$ac_ext
18645cat >>conftest.$ac_ext <<_ACEOF
18646/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018647
Martin v. Löwiseba40652007-08-30 20:10:57 +000018648/* Override any GCC internal prototype to avoid an error.
18649 Use char because int might match the return type of a GCC
18650 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018651#ifdef __cplusplus
18652extern "C"
18653#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018654char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018655int
18656main ()
18657{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018658return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018659 ;
18660 return 0;
18661}
18662_ACEOF
18663rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018664if { (ac_try="$ac_link"
18665case "(($ac_try" in
18666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18667 *) ac_try_echo=$ac_try;;
18668esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018670 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018671 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018672 grep -v '^ *+' conftest.er1 >conftest.err
18673 rm -f conftest.er1
18674 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018676 (exit $ac_status); } && {
18677 test -z "$ac_c_werror_flag" ||
18678 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018679 } && test -s conftest$ac_exeext &&
18680 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018681 ac_cv_lib_c_inet_aton=yes
18682else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018683 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018684sed 's/^/| /' conftest.$ac_ext >&5
18685
Martin v. Löwiseba40652007-08-30 20:10:57 +000018686 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018687fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018688
18689rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018690 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018691LIBS=$ac_check_lib_save_LIBS
18692fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018693{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18694echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18695if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018696 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018697else
18698
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018699{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18700echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018701if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018702 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018703else
18704 ac_check_lib_save_LIBS=$LIBS
18705LIBS="-lresolv $LIBS"
18706cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018707/* confdefs.h. */
18708_ACEOF
18709cat confdefs.h >>conftest.$ac_ext
18710cat >>conftest.$ac_ext <<_ACEOF
18711/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018712
Martin v. Löwiseba40652007-08-30 20:10:57 +000018713/* Override any GCC internal prototype to avoid an error.
18714 Use char because int might match the return type of a GCC
18715 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018716#ifdef __cplusplus
18717extern "C"
18718#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018719char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018720int
18721main ()
18722{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018723return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018724 ;
18725 return 0;
18726}
18727_ACEOF
18728rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018729if { (ac_try="$ac_link"
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_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +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
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018744 } && test -s conftest$ac_exeext &&
18745 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018746 ac_cv_lib_resolv_inet_aton=yes
18747else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018748 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018749sed 's/^/| /' conftest.$ac_ext >&5
18750
Martin v. Löwiseba40652007-08-30 20:10:57 +000018751 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018752fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018753
18754rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018755 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018756LIBS=$ac_check_lib_save_LIBS
18757fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018758{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18759echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18760if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018761 cat >>confdefs.h <<_ACEOF
18762#define HAVE_LIBRESOLV 1
18763_ACEOF
18764
18765 LIBS="-lresolv $LIBS"
18766
18767fi
18768
18769
18770fi
18771
18772
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018773# On Tru64, chflags seems to be present, but calling it will
18774# exit Python
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018775{ echo "$as_me:$LINENO: checking for chflags" >&5
18776echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018777if test "${ac_cv_have_chflags+set}" = set; then
18778 echo $ECHO_N "(cached) $ECHO_C" >&6
18779else
18780 if test "$cross_compiling" = yes; then
Gregory P. Smith49437c22009-11-02 01:38:35 +000018781 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018782else
18783 cat >conftest.$ac_ext <<_ACEOF
18784/* confdefs.h. */
18785_ACEOF
18786cat confdefs.h >>conftest.$ac_ext
18787cat >>conftest.$ac_ext <<_ACEOF
18788/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000018789[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018790#include <sys/stat.h>
18791#include <unistd.h>
18792int main(int argc, char*argv[])
18793{
18794 if(chflags(argv[0], 0) != 0)
18795 return 1;
18796 return 0;
18797}
Gregory P. Smith49437c22009-11-02 01:38:35 +000018798]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018799_ACEOF
18800rm -f conftest$ac_exeext
18801if { (ac_try="$ac_link"
18802case "(($ac_try" in
18803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18804 *) ac_try_echo=$ac_try;;
18805esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018807 (eval "$ac_link") 2>&5
18808 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018810 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18811 { (case "(($ac_try" in
18812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18813 *) ac_try_echo=$ac_try;;
18814esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018816 (eval "$ac_try") 2>&5
18817 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018819 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018820 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018821else
18822 echo "$as_me: program exited with status $ac_status" >&5
18823echo "$as_me: failed program was:" >&5
18824sed 's/^/| /' conftest.$ac_ext >&5
18825
18826( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018827ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018828fi
18829rm -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 +000018830fi
18831
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018832
18833
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018834fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018835{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18836echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000018837if test "$ac_cv_have_chflags" = cross ; then
18838 { echo "$as_me:$LINENO: checking for chflags" >&5
18839echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
18840if test "${ac_cv_func_chflags+set}" = set; then
18841 echo $ECHO_N "(cached) $ECHO_C" >&6
18842else
18843 cat >conftest.$ac_ext <<_ACEOF
18844/* confdefs.h. */
18845_ACEOF
18846cat confdefs.h >>conftest.$ac_ext
18847cat >>conftest.$ac_ext <<_ACEOF
18848/* end confdefs.h. */
18849/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
18850 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18851#define chflags innocuous_chflags
18852
18853/* System header to define __stub macros and hopefully few prototypes,
18854 which can conflict with char chflags (); below.
18855 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18856 <limits.h> exists even on freestanding compilers. */
18857
18858#ifdef __STDC__
18859# include <limits.h>
18860#else
18861# include <assert.h>
18862#endif
18863
18864#undef chflags
18865
18866/* Override any GCC internal prototype to avoid an error.
18867 Use char because int might match the return type of a GCC
18868 builtin and then its argument prototype would still apply. */
18869#ifdef __cplusplus
18870extern "C"
18871#endif
18872char chflags ();
18873/* The GNU C library defines this for functions which it implements
18874 to always fail with ENOSYS. Some functions are actually named
18875 something starting with __ and the normal name is an alias. */
18876#if defined __stub_chflags || defined __stub___chflags
18877choke me
18878#endif
18879
18880int
18881main ()
18882{
18883return chflags ();
18884 ;
18885 return 0;
18886}
18887_ACEOF
18888rm -f conftest.$ac_objext conftest$ac_exeext
18889if { (ac_try="$ac_link"
18890case "(($ac_try" in
18891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18892 *) ac_try_echo=$ac_try;;
18893esac
18894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18895 (eval "$ac_link") 2>conftest.er1
18896 ac_status=$?
18897 grep -v '^ *+' conftest.er1 >conftest.err
18898 rm -f conftest.er1
18899 cat conftest.err >&5
18900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18901 (exit $ac_status); } && {
18902 test -z "$ac_c_werror_flag" ||
18903 test ! -s conftest.err
18904 } && test -s conftest$ac_exeext &&
18905 $as_test_x conftest$ac_exeext; then
18906 ac_cv_func_chflags=yes
18907else
18908 echo "$as_me: failed program was:" >&5
18909sed 's/^/| /' conftest.$ac_ext >&5
18910
18911 ac_cv_func_chflags=no
18912fi
18913
18914rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18915 conftest$ac_exeext conftest.$ac_ext
18916fi
18917{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
18918echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
18919if test $ac_cv_func_chflags = yes; then
18920 ac_cv_have_chflags="yes"
18921else
18922 ac_cv_have_chflags="no"
18923fi
18924
18925fi
18926if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018927
18928cat >>confdefs.h <<\_ACEOF
18929#define HAVE_CHFLAGS 1
18930_ACEOF
18931
18932fi
18933
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018934{ echo "$as_me:$LINENO: checking for lchflags" >&5
18935echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018936if test "${ac_cv_have_lchflags+set}" = set; then
18937 echo $ECHO_N "(cached) $ECHO_C" >&6
18938else
18939 if test "$cross_compiling" = yes; then
Gregory P. Smith49437c22009-11-02 01:38:35 +000018940 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018941else
18942 cat >conftest.$ac_ext <<_ACEOF
18943/* confdefs.h. */
18944_ACEOF
18945cat confdefs.h >>conftest.$ac_ext
18946cat >>conftest.$ac_ext <<_ACEOF
18947/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000018948[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018949#include <sys/stat.h>
18950#include <unistd.h>
18951int main(int argc, char*argv[])
18952{
18953 if(lchflags(argv[0], 0) != 0)
18954 return 1;
18955 return 0;
18956}
Gregory P. Smith49437c22009-11-02 01:38:35 +000018957]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018958_ACEOF
18959rm -f conftest$ac_exeext
18960if { (ac_try="$ac_link"
18961case "(($ac_try" in
18962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18963 *) ac_try_echo=$ac_try;;
18964esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018966 (eval "$ac_link") 2>&5
18967 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018969 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18970 { (case "(($ac_try" in
18971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18972 *) ac_try_echo=$ac_try;;
18973esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018975 (eval "$ac_try") 2>&5
18976 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018978 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018979 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018980else
18981 echo "$as_me: program exited with status $ac_status" >&5
18982echo "$as_me: failed program was:" >&5
18983sed 's/^/| /' conftest.$ac_ext >&5
18984
18985( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018986ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018987fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018988rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18989fi
18990
18991
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018992
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018993fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018994{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
18995echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000018996if test "$ac_cv_have_lchflags" = cross ; then
18997 { echo "$as_me:$LINENO: checking for lchflags" >&5
18998echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
18999if test "${ac_cv_func_lchflags+set}" = set; then
19000 echo $ECHO_N "(cached) $ECHO_C" >&6
19001else
19002 cat >conftest.$ac_ext <<_ACEOF
19003/* confdefs.h. */
19004_ACEOF
19005cat confdefs.h >>conftest.$ac_ext
19006cat >>conftest.$ac_ext <<_ACEOF
19007/* end confdefs.h. */
19008/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
19009 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19010#define lchflags innocuous_lchflags
19011
19012/* System header to define __stub macros and hopefully few prototypes,
19013 which can conflict with char lchflags (); below.
19014 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19015 <limits.h> exists even on freestanding compilers. */
19016
19017#ifdef __STDC__
19018# include <limits.h>
19019#else
19020# include <assert.h>
19021#endif
19022
19023#undef lchflags
19024
19025/* Override any GCC internal prototype to avoid an error.
19026 Use char because int might match the return type of a GCC
19027 builtin and then its argument prototype would still apply. */
19028#ifdef __cplusplus
19029extern "C"
19030#endif
19031char lchflags ();
19032/* The GNU C library defines this for functions which it implements
19033 to always fail with ENOSYS. Some functions are actually named
19034 something starting with __ and the normal name is an alias. */
19035#if defined __stub_lchflags || defined __stub___lchflags
19036choke me
19037#endif
19038
19039int
19040main ()
19041{
19042return lchflags ();
19043 ;
19044 return 0;
19045}
19046_ACEOF
19047rm -f conftest.$ac_objext conftest$ac_exeext
19048if { (ac_try="$ac_link"
19049case "(($ac_try" in
19050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19051 *) ac_try_echo=$ac_try;;
19052esac
19053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19054 (eval "$ac_link") 2>conftest.er1
19055 ac_status=$?
19056 grep -v '^ *+' conftest.er1 >conftest.err
19057 rm -f conftest.er1
19058 cat conftest.err >&5
19059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19060 (exit $ac_status); } && {
19061 test -z "$ac_c_werror_flag" ||
19062 test ! -s conftest.err
19063 } && test -s conftest$ac_exeext &&
19064 $as_test_x conftest$ac_exeext; then
19065 ac_cv_func_lchflags=yes
19066else
19067 echo "$as_me: failed program was:" >&5
19068sed 's/^/| /' conftest.$ac_ext >&5
19069
19070 ac_cv_func_lchflags=no
19071fi
19072
19073rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19074 conftest$ac_exeext conftest.$ac_ext
19075fi
19076{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
19077echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
19078if test $ac_cv_func_lchflags = yes; then
19079 ac_cv_have_lchflags="yes"
19080else
19081 ac_cv_have_lchflags="no"
19082fi
19083
19084fi
19085if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019086
19087cat >>confdefs.h <<\_ACEOF
19088#define HAVE_LCHFLAGS 1
19089_ACEOF
19090
19091fi
19092
Ronald Oussorenf8752642006-07-06 10:13:35 +000019093case $ac_sys_system/$ac_sys_release in
19094Darwin/*)
19095 _CUR_CFLAGS="${CFLAGS}"
19096 _CUR_LDFLAGS="${LDFLAGS}"
19097 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
19098 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
19099 ;;
19100esac
19101
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019102{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
19103echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019104if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019105 echo $ECHO_N "(cached) $ECHO_C" >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019106else
19107 ac_check_lib_save_LIBS=$LIBS
19108LIBS="-lz $LIBS"
19109cat >conftest.$ac_ext <<_ACEOF
19110/* confdefs.h. */
19111_ACEOF
19112cat confdefs.h >>conftest.$ac_ext
19113cat >>conftest.$ac_ext <<_ACEOF
19114/* end confdefs.h. */
19115
Martin v. Löwiseba40652007-08-30 20:10:57 +000019116/* Override any GCC internal prototype to avoid an error.
19117 Use char because int might match the return type of a GCC
19118 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019119#ifdef __cplusplus
19120extern "C"
19121#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019122char inflateCopy ();
19123int
19124main ()
19125{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019126return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019127 ;
19128 return 0;
19129}
19130_ACEOF
19131rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019132if { (ac_try="$ac_link"
19133case "(($ac_try" in
19134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19135 *) ac_try_echo=$ac_try;;
19136esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019138 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019139 ac_status=$?
19140 grep -v '^ *+' conftest.er1 >conftest.err
19141 rm -f conftest.er1
19142 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019144 (exit $ac_status); } && {
19145 test -z "$ac_c_werror_flag" ||
19146 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019147 } && test -s conftest$ac_exeext &&
19148 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019149 ac_cv_lib_z_inflateCopy=yes
19150else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019151 echo "$as_me: failed program was:" >&5
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019152sed 's/^/| /' conftest.$ac_ext >&5
19153
Martin v. Löwiseba40652007-08-30 20:10:57 +000019154 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019155fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019156
19157rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019158 conftest$ac_exeext conftest.$ac_ext
19159LIBS=$ac_check_lib_save_LIBS
19160fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019161{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
19162echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
19163if test $ac_cv_lib_z_inflateCopy = yes; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019164
19165cat >>confdefs.h <<\_ACEOF
19166#define HAVE_ZLIB_COPY 1
19167_ACEOF
19168
19169fi
19170
19171
Ronald Oussorenf8752642006-07-06 10:13:35 +000019172case $ac_sys_system/$ac_sys_release in
19173Darwin/*)
19174 CFLAGS="${_CUR_CFLAGS}"
19175 LDFLAGS="${_CUR_LDFLAGS}"
19176 ;;
19177esac
19178
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019179{ echo "$as_me:$LINENO: checking for hstrerror" >&5
19180echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019181cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019182/* confdefs.h. */
19183_ACEOF
19184cat confdefs.h >>conftest.$ac_ext
19185cat >>conftest.$ac_ext <<_ACEOF
19186/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019187
19188#include "confdefs.h"
19189#include <netdb.h>
19190
Martin v. Löwise9416172003-05-03 10:12:45 +000019191int
19192main ()
19193{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019194void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019195 ;
19196 return 0;
19197}
19198_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019199rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019200if { (ac_try="$ac_link"
19201case "(($ac_try" in
19202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19203 *) ac_try_echo=$ac_try;;
19204esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019206 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019207 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019208 grep -v '^ *+' conftest.er1 >conftest.err
19209 rm -f conftest.er1
19210 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019212 (exit $ac_status); } && {
19213 test -z "$ac_c_werror_flag" ||
19214 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019215 } && test -s conftest$ac_exeext &&
19216 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019217
19218cat >>confdefs.h <<\_ACEOF
19219#define HAVE_HSTRERROR 1
19220_ACEOF
19221
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019222 { echo "$as_me:$LINENO: result: yes" >&5
19223echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019224else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019225 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019226sed 's/^/| /' conftest.$ac_ext >&5
19227
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019228 { echo "$as_me:$LINENO: result: no" >&5
19229echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019230
19231fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019232
19233rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019234 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019235
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019236{ echo "$as_me:$LINENO: checking for inet_aton" >&5
19237echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019238cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019239/* confdefs.h. */
19240_ACEOF
19241cat confdefs.h >>conftest.$ac_ext
19242cat >>conftest.$ac_ext <<_ACEOF
19243/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019244
19245#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000019246#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019247#include <sys/socket.h>
19248#include <netinet/in.h>
19249#include <arpa/inet.h>
19250
Martin v. Löwise9416172003-05-03 10:12:45 +000019251int
19252main ()
19253{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019254void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019255 ;
19256 return 0;
19257}
19258_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019259rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019260if { (ac_try="$ac_link"
19261case "(($ac_try" in
19262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19263 *) ac_try_echo=$ac_try;;
19264esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019266 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019267 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019268 grep -v '^ *+' conftest.er1 >conftest.err
19269 rm -f conftest.er1
19270 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019272 (exit $ac_status); } && {
19273 test -z "$ac_c_werror_flag" ||
19274 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019275 } && test -s conftest$ac_exeext &&
19276 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019277
19278cat >>confdefs.h <<\_ACEOF
19279#define HAVE_INET_ATON 1
19280_ACEOF
19281
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019282 { echo "$as_me:$LINENO: result: yes" >&5
19283echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019284else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019285 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019286sed 's/^/| /' conftest.$ac_ext >&5
19287
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019288 { echo "$as_me:$LINENO: result: no" >&5
19289echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019290
19291fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019292
19293rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019294 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019295
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019296{ echo "$as_me:$LINENO: checking for inet_pton" >&5
19297echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019298cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019299/* confdefs.h. */
19300_ACEOF
19301cat confdefs.h >>conftest.$ac_ext
19302cat >>conftest.$ac_ext <<_ACEOF
19303/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019304
19305#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019306#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019307#include <sys/socket.h>
19308#include <netinet/in.h>
19309#include <arpa/inet.h>
19310
Martin v. Löwise9416172003-05-03 10:12:45 +000019311int
19312main ()
19313{
19314void* p = inet_pton
19315 ;
19316 return 0;
19317}
19318_ACEOF
19319rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019320if { (ac_try="$ac_compile"
19321case "(($ac_try" in
19322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19323 *) ac_try_echo=$ac_try;;
19324esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019326 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019327 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019328 grep -v '^ *+' conftest.er1 >conftest.err
19329 rm -f conftest.er1
19330 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019332 (exit $ac_status); } && {
19333 test -z "$ac_c_werror_flag" ||
19334 test ! -s conftest.err
19335 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019336
19337cat >>confdefs.h <<\_ACEOF
19338#define HAVE_INET_PTON 1
19339_ACEOF
19340
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019341 { echo "$as_me:$LINENO: result: yes" >&5
19342echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019343else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019344 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019345sed 's/^/| /' conftest.$ac_ext >&5
19346
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019347 { echo "$as_me:$LINENO: result: no" >&5
19348echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019349
19350fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019351
19352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019353
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019354# On some systems, setgroups is in unistd.h, on others, in grp.h
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019355{ echo "$as_me:$LINENO: checking for setgroups" >&5
19356echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019357cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019358/* confdefs.h. */
19359_ACEOF
19360cat confdefs.h >>conftest.$ac_ext
19361cat >>conftest.$ac_ext <<_ACEOF
19362/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019363
19364#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019365#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019366#ifdef HAVE_GRP_H
19367#include <grp.h>
19368#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019369
Martin v. Löwisd5843682002-11-21 20:41:28 +000019370int
19371main ()
19372{
19373void* p = setgroups
19374 ;
19375 return 0;
19376}
19377_ACEOF
19378rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019379if { (ac_try="$ac_compile"
19380case "(($ac_try" in
19381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19382 *) ac_try_echo=$ac_try;;
19383esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019384eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019385 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019386 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019387 grep -v '^ *+' conftest.er1 >conftest.err
19388 rm -f conftest.er1
19389 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019391 (exit $ac_status); } && {
19392 test -z "$ac_c_werror_flag" ||
19393 test ! -s conftest.err
19394 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019395
19396cat >>confdefs.h <<\_ACEOF
19397#define HAVE_SETGROUPS 1
19398_ACEOF
19399
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019400 { echo "$as_me:$LINENO: result: yes" >&5
19401echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019402else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019403 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019404sed 's/^/| /' conftest.$ac_ext >&5
19405
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019406 { echo "$as_me:$LINENO: result: no" >&5
19407echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019408
19409fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019410
19411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019412
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019413# check for openpty and forkpty
19414
Martin v. Löwis11437992002-04-12 09:54:03 +000019415
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019416for ac_func in openpty
19417do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019418as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19419{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19420echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019421if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019422 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019423else
Martin v. Löwis11437992002-04-12 09:54:03 +000019424 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019425/* confdefs.h. */
19426_ACEOF
19427cat confdefs.h >>conftest.$ac_ext
19428cat >>conftest.$ac_ext <<_ACEOF
19429/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019430/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19431 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19432#define $ac_func innocuous_$ac_func
19433
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019434/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019435 which can conflict with char $ac_func (); below.
19436 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019437 <limits.h> exists even on freestanding compilers. */
19438
19439#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019440# include <limits.h>
19441#else
19442# include <assert.h>
19443#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019444
19445#undef $ac_func
19446
Martin v. Löwiseba40652007-08-30 20:10:57 +000019447/* Override any GCC internal prototype to avoid an error.
19448 Use char because int might match the return type of a GCC
19449 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019450#ifdef __cplusplus
19451extern "C"
19452#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019453char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019454/* The GNU C library defines this for functions which it implements
19455 to always fail with ENOSYS. Some functions are actually named
19456 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019457#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019458choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019459#endif
19460
Skip Montanaro6dead952003-09-25 14:50:04 +000019461int
19462main ()
19463{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019464return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019465 ;
19466 return 0;
19467}
19468_ACEOF
19469rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019470if { (ac_try="$ac_link"
19471case "(($ac_try" in
19472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19473 *) ac_try_echo=$ac_try;;
19474esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019475eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019476 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019477 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019478 grep -v '^ *+' conftest.er1 >conftest.err
19479 rm -f conftest.er1
19480 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019482 (exit $ac_status); } && {
19483 test -z "$ac_c_werror_flag" ||
19484 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019485 } && test -s conftest$ac_exeext &&
19486 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019487 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019488else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019489 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019490sed 's/^/| /' conftest.$ac_ext >&5
19491
Martin v. Löwiseba40652007-08-30 20:10:57 +000019492 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019493fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019494
19495rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019496 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019497fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019498ac_res=`eval echo '${'$as_ac_var'}'`
19499 { echo "$as_me:$LINENO: result: $ac_res" >&5
19500echo "${ECHO_T}$ac_res" >&6; }
19501if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019502 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019503#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019504_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019505
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019506else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019507 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19508echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019509if test "${ac_cv_lib_util_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019510 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019511else
Martin v. Löwis11437992002-04-12 09:54:03 +000019512 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019513LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019514cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019515/* confdefs.h. */
19516_ACEOF
19517cat confdefs.h >>conftest.$ac_ext
19518cat >>conftest.$ac_ext <<_ACEOF
19519/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019520
Martin v. Löwiseba40652007-08-30 20:10:57 +000019521/* Override any GCC internal prototype to avoid an error.
19522 Use char because int might match the return type of a GCC
19523 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019524#ifdef __cplusplus
19525extern "C"
19526#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019527char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019528int
19529main ()
19530{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019531return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019532 ;
19533 return 0;
19534}
19535_ACEOF
19536rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019537if { (ac_try="$ac_link"
19538case "(($ac_try" in
19539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19540 *) ac_try_echo=$ac_try;;
19541esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019543 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019544 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019545 grep -v '^ *+' conftest.er1 >conftest.err
19546 rm -f conftest.er1
19547 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019549 (exit $ac_status); } && {
19550 test -z "$ac_c_werror_flag" ||
19551 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019552 } && test -s conftest$ac_exeext &&
19553 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019554 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019555else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019556 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019557sed 's/^/| /' conftest.$ac_ext >&5
19558
Martin v. Löwiseba40652007-08-30 20:10:57 +000019559 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019560fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019561
19562rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019563 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019564LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019565fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019566{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19567echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19568if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019569 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019570#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019571_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019572 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019573else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019574 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19575echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019576if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019577 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019578else
19579 ac_check_lib_save_LIBS=$LIBS
19580LIBS="-lbsd $LIBS"
19581cat >conftest.$ac_ext <<_ACEOF
19582/* confdefs.h. */
19583_ACEOF
19584cat confdefs.h >>conftest.$ac_ext
19585cat >>conftest.$ac_ext <<_ACEOF
19586/* end confdefs.h. */
19587
Martin v. Löwiseba40652007-08-30 20:10:57 +000019588/* Override any GCC internal prototype to avoid an error.
19589 Use char because int might match the return type of a GCC
19590 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019591#ifdef __cplusplus
19592extern "C"
19593#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019594char openpty ();
19595int
19596main ()
19597{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019598return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019599 ;
19600 return 0;
19601}
19602_ACEOF
19603rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019604if { (ac_try="$ac_link"
19605case "(($ac_try" in
19606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19607 *) ac_try_echo=$ac_try;;
19608esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019610 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019611 ac_status=$?
19612 grep -v '^ *+' conftest.er1 >conftest.err
19613 rm -f conftest.er1
19614 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019616 (exit $ac_status); } && {
19617 test -z "$ac_c_werror_flag" ||
19618 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019619 } && test -s conftest$ac_exeext &&
19620 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019621 ac_cv_lib_bsd_openpty=yes
19622else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019623 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019624sed 's/^/| /' conftest.$ac_ext >&5
19625
Martin v. Löwiseba40652007-08-30 20:10:57 +000019626 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019627fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019628
19629rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019630 conftest$ac_exeext conftest.$ac_ext
19631LIBS=$ac_check_lib_save_LIBS
19632fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019633{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19634echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
19635if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019636 cat >>confdefs.h <<\_ACEOF
19637#define HAVE_OPENPTY 1
19638_ACEOF
19639 LIBS="$LIBS -lbsd"
19640fi
19641
19642
19643fi
19644
Fred Drake8cef4cf2000-06-28 16:40:38 +000019645
19646fi
19647done
19648
Martin v. Löwis11437992002-04-12 09:54:03 +000019649
Fred Drake8cef4cf2000-06-28 16:40:38 +000019650for ac_func in forkpty
19651do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019652as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19653{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19654echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019655if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019656 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019657else
Martin v. Löwis11437992002-04-12 09:54:03 +000019658 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019659/* confdefs.h. */
19660_ACEOF
19661cat confdefs.h >>conftest.$ac_ext
19662cat >>conftest.$ac_ext <<_ACEOF
19663/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019664/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19665 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19666#define $ac_func innocuous_$ac_func
19667
Fred Drake8cef4cf2000-06-28 16:40:38 +000019668/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019669 which can conflict with char $ac_func (); below.
19670 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019671 <limits.h> exists even on freestanding compilers. */
19672
19673#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019674# include <limits.h>
19675#else
19676# include <assert.h>
19677#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019678
19679#undef $ac_func
19680
Martin v. Löwiseba40652007-08-30 20:10:57 +000019681/* Override any GCC internal prototype to avoid an error.
19682 Use char because int might match the return type of a GCC
19683 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019684#ifdef __cplusplus
19685extern "C"
19686#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019687char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019688/* The GNU C library defines this for functions which it implements
19689 to always fail with ENOSYS. Some functions are actually named
19690 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019691#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019692choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019693#endif
19694
Skip Montanaro6dead952003-09-25 14:50:04 +000019695int
19696main ()
19697{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019698return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019699 ;
19700 return 0;
19701}
19702_ACEOF
19703rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019704if { (ac_try="$ac_link"
19705case "(($ac_try" in
19706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19707 *) ac_try_echo=$ac_try;;
19708esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019710 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019711 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019712 grep -v '^ *+' conftest.er1 >conftest.err
19713 rm -f conftest.er1
19714 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019716 (exit $ac_status); } && {
19717 test -z "$ac_c_werror_flag" ||
19718 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019719 } && test -s conftest$ac_exeext &&
19720 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019721 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019722else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019723 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019724sed 's/^/| /' conftest.$ac_ext >&5
19725
Martin v. Löwiseba40652007-08-30 20:10:57 +000019726 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019727fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019728
19729rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019730 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019731fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019732ac_res=`eval echo '${'$as_ac_var'}'`
19733 { echo "$as_me:$LINENO: result: $ac_res" >&5
19734echo "${ECHO_T}$ac_res" >&6; }
19735if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019736 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019737#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019738_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019739
Fred Drake8cef4cf2000-06-28 16:40:38 +000019740else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019741 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19742echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019743if test "${ac_cv_lib_util_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019744 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019745else
Martin v. Löwis11437992002-04-12 09:54:03 +000019746 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019747LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019748cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019749/* confdefs.h. */
19750_ACEOF
19751cat confdefs.h >>conftest.$ac_ext
19752cat >>conftest.$ac_ext <<_ACEOF
19753/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019754
Martin v. Löwiseba40652007-08-30 20:10:57 +000019755/* Override any GCC internal prototype to avoid an error.
19756 Use char because int might match the return type of a GCC
19757 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019758#ifdef __cplusplus
19759extern "C"
19760#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019761char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019762int
19763main ()
19764{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019765return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019766 ;
19767 return 0;
19768}
19769_ACEOF
19770rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019771if { (ac_try="$ac_link"
19772case "(($ac_try" in
19773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19774 *) ac_try_echo=$ac_try;;
19775esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019777 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019778 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019779 grep -v '^ *+' conftest.er1 >conftest.err
19780 rm -f conftest.er1
19781 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019783 (exit $ac_status); } && {
19784 test -z "$ac_c_werror_flag" ||
19785 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019786 } && test -s conftest$ac_exeext &&
19787 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019788 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019789else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019790 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019791sed 's/^/| /' conftest.$ac_ext >&5
19792
Martin v. Löwiseba40652007-08-30 20:10:57 +000019793 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019794fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019795
19796rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019797 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019798LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019799fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019800{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19801echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19802if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019803 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019804#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019805_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019806 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019807else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019808 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19809echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019810if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019811 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019812else
19813 ac_check_lib_save_LIBS=$LIBS
19814LIBS="-lbsd $LIBS"
19815cat >conftest.$ac_ext <<_ACEOF
19816/* confdefs.h. */
19817_ACEOF
19818cat confdefs.h >>conftest.$ac_ext
19819cat >>conftest.$ac_ext <<_ACEOF
19820/* end confdefs.h. */
19821
Martin v. Löwiseba40652007-08-30 20:10:57 +000019822/* Override any GCC internal prototype to avoid an error.
19823 Use char because int might match the return type of a GCC
19824 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019825#ifdef __cplusplus
19826extern "C"
19827#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019828char forkpty ();
19829int
19830main ()
19831{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019832return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019833 ;
19834 return 0;
19835}
19836_ACEOF
19837rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019838if { (ac_try="$ac_link"
19839case "(($ac_try" in
19840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19841 *) ac_try_echo=$ac_try;;
19842esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019844 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019845 ac_status=$?
19846 grep -v '^ *+' conftest.er1 >conftest.err
19847 rm -f conftest.er1
19848 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019850 (exit $ac_status); } && {
19851 test -z "$ac_c_werror_flag" ||
19852 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019853 } && test -s conftest$ac_exeext &&
19854 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019855 ac_cv_lib_bsd_forkpty=yes
19856else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019857 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019858sed 's/^/| /' conftest.$ac_ext >&5
19859
Martin v. Löwiseba40652007-08-30 20:10:57 +000019860 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019861fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019862
19863rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019864 conftest$ac_exeext conftest.$ac_ext
19865LIBS=$ac_check_lib_save_LIBS
19866fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019867{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
19868echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
19869if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019870 cat >>confdefs.h <<\_ACEOF
19871#define HAVE_FORKPTY 1
19872_ACEOF
19873 LIBS="$LIBS -lbsd"
19874fi
19875
19876
19877fi
19878
Fred Drake8cef4cf2000-06-28 16:40:38 +000019879
19880fi
19881done
19882
Jack Jansendd19cf82001-12-06 22:36:17 +000019883
Brett Cannonaa5778d2008-03-18 04:09:00 +000019884# Stuff for expat.
19885
19886for ac_func in memmove
19887do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019888as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19889{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19890echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Brett Cannonaa5778d2008-03-18 04:09:00 +000019891if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019892 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannonaa5778d2008-03-18 04:09:00 +000019893else
19894 cat >conftest.$ac_ext <<_ACEOF
19895/* confdefs.h. */
19896_ACEOF
19897cat confdefs.h >>conftest.$ac_ext
19898cat >>conftest.$ac_ext <<_ACEOF
19899/* end confdefs.h. */
19900/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19901 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19902#define $ac_func innocuous_$ac_func
19903
19904/* System header to define __stub macros and hopefully few prototypes,
19905 which can conflict with char $ac_func (); below.
19906 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19907 <limits.h> exists even on freestanding compilers. */
19908
19909#ifdef __STDC__
19910# include <limits.h>
19911#else
19912# include <assert.h>
19913#endif
19914
19915#undef $ac_func
19916
19917/* Override any GCC internal prototype to avoid an error.
19918 Use char because int might match the return type of a GCC
19919 builtin and then its argument prototype would still apply. */
19920#ifdef __cplusplus
19921extern "C"
19922#endif
19923char $ac_func ();
19924/* The GNU C library defines this for functions which it implements
19925 to always fail with ENOSYS. Some functions are actually named
19926 something starting with __ and the normal name is an alias. */
19927#if defined __stub_$ac_func || defined __stub___$ac_func
19928choke me
19929#endif
19930
19931int
19932main ()
19933{
19934return $ac_func ();
19935 ;
19936 return 0;
19937}
19938_ACEOF
19939rm -f conftest.$ac_objext conftest$ac_exeext
19940if { (ac_try="$ac_link"
19941case "(($ac_try" in
19942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19943 *) ac_try_echo=$ac_try;;
19944esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000019946 (eval "$ac_link") 2>conftest.er1
19947 ac_status=$?
19948 grep -v '^ *+' conftest.er1 >conftest.err
19949 rm -f conftest.er1
19950 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000019952 (exit $ac_status); } && {
19953 test -z "$ac_c_werror_flag" ||
19954 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019955 } && test -s conftest$ac_exeext &&
19956 $as_test_x conftest$ac_exeext; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000019957 eval "$as_ac_var=yes"
19958else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019959 echo "$as_me: failed program was:" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000019960sed 's/^/| /' conftest.$ac_ext >&5
19961
19962 eval "$as_ac_var=no"
19963fi
19964
19965rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19966 conftest$ac_exeext conftest.$ac_ext
19967fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019968ac_res=`eval echo '${'$as_ac_var'}'`
19969 { echo "$as_me:$LINENO: result: $ac_res" >&5
19970echo "${ECHO_T}$ac_res" >&6; }
19971if test `eval echo '${'$as_ac_var'}'` = yes; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000019972 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019973#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000019974_ACEOF
19975
19976fi
19977done
19978
19979
Michael W. Hudson54241132001-12-07 15:38:26 +000019980# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019981
19982
19983
19984
19985
19986
Fred Drake8cef4cf2000-06-28 16:40:38 +000019987for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19988do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019989as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19990{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19991echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019992if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019993 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019994else
Martin v. Löwis11437992002-04-12 09:54:03 +000019995 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019996/* confdefs.h. */
19997_ACEOF
19998cat confdefs.h >>conftest.$ac_ext
19999cat >>conftest.$ac_ext <<_ACEOF
20000/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020001/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20002 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20003#define $ac_func innocuous_$ac_func
20004
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020005/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020006 which can conflict with char $ac_func (); below.
20007 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020008 <limits.h> exists even on freestanding compilers. */
20009
20010#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020011# include <limits.h>
20012#else
20013# include <assert.h>
20014#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020015
20016#undef $ac_func
20017
Martin v. Löwiseba40652007-08-30 20:10:57 +000020018/* Override any GCC internal prototype to avoid an error.
20019 Use char because int might match the return type of a GCC
20020 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020021#ifdef __cplusplus
20022extern "C"
20023#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020024char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020025/* The GNU C library defines this for functions which it implements
20026 to always fail with ENOSYS. Some functions are actually named
20027 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020028#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020029choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020030#endif
20031
Skip Montanaro6dead952003-09-25 14:50:04 +000020032int
20033main ()
20034{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020035return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020036 ;
20037 return 0;
20038}
20039_ACEOF
20040rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020041if { (ac_try="$ac_link"
20042case "(($ac_try" in
20043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20044 *) ac_try_echo=$ac_try;;
20045esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020047 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020048 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020049 grep -v '^ *+' conftest.er1 >conftest.err
20050 rm -f conftest.er1
20051 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020053 (exit $ac_status); } && {
20054 test -z "$ac_c_werror_flag" ||
20055 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020056 } && test -s conftest$ac_exeext &&
20057 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020058 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020059else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020060 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020061sed 's/^/| /' conftest.$ac_ext >&5
20062
Martin v. Löwiseba40652007-08-30 20:10:57 +000020063 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020064fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020065
20066rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020067 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020068fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020069ac_res=`eval echo '${'$as_ac_var'}'`
20070 { echo "$as_me:$LINENO: result: $ac_res" >&5
20071echo "${ECHO_T}$ac_res" >&6; }
20072if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020073 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020074#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020075_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000020076
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020077fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000020078done
20079
Michael W. Hudson54241132001-12-07 15:38:26 +000020080
Martin v. Löwis11437992002-04-12 09:54:03 +000020081
20082
20083
Brett Cannonaa5778d2008-03-18 04:09:00 +000020084for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000020085do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020086as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20087{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20088echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020089if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020090 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020091else
Martin v. Löwis11437992002-04-12 09:54:03 +000020092 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020093/* confdefs.h. */
20094_ACEOF
20095cat confdefs.h >>conftest.$ac_ext
20096cat >>conftest.$ac_ext <<_ACEOF
20097/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020098/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20099 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20100#define $ac_func innocuous_$ac_func
20101
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020102/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020103 which can conflict with char $ac_func (); below.
20104 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020105 <limits.h> exists even on freestanding compilers. */
20106
20107#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020108# include <limits.h>
20109#else
20110# include <assert.h>
20111#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020112
20113#undef $ac_func
20114
Martin v. Löwiseba40652007-08-30 20:10:57 +000020115/* Override any GCC internal prototype to avoid an error.
20116 Use char because int might match the return type of a GCC
20117 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020118#ifdef __cplusplus
20119extern "C"
20120#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020121char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000020122/* The GNU C library defines this for functions which it implements
20123 to always fail with ENOSYS. Some functions are actually named
20124 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020125#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000020126choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000020127#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020128
Skip Montanaro6dead952003-09-25 14:50:04 +000020129int
20130main ()
20131{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020132return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020133 ;
20134 return 0;
20135}
20136_ACEOF
20137rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020138if { (ac_try="$ac_link"
20139case "(($ac_try" in
20140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20141 *) ac_try_echo=$ac_try;;
20142esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020144 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020145 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020146 grep -v '^ *+' conftest.er1 >conftest.err
20147 rm -f conftest.er1
20148 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020150 (exit $ac_status); } && {
20151 test -z "$ac_c_werror_flag" ||
20152 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020153 } && test -s conftest$ac_exeext &&
20154 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020155 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020156else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020157 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020158sed 's/^/| /' conftest.$ac_ext >&5
20159
Martin v. Löwiseba40652007-08-30 20:10:57 +000020160 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020161fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020162
20163rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020164 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000020165fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020166ac_res=`eval echo '${'$as_ac_var'}'`
20167 { echo "$as_me:$LINENO: result: $ac_res" >&5
20168echo "${ECHO_T}$ac_res" >&6; }
20169if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020170 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020171#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020172_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000020173
Martin v. Löwis1142de32002-03-29 16:28:31 +000020174else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020175 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020176 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020177 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20178 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020179esac
20180
Martin v. Löwis1142de32002-03-29 16:28:31 +000020181fi
20182done
20183
20184
Martin v. Löwis11437992002-04-12 09:54:03 +000020185
Martin v. Löwis1142de32002-03-29 16:28:31 +000020186for ac_func in getpgrp
20187do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020188as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20189{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20190echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020191if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020192 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000020193else
Martin v. Löwis11437992002-04-12 09:54:03 +000020194 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020195/* confdefs.h. */
20196_ACEOF
20197cat confdefs.h >>conftest.$ac_ext
20198cat >>conftest.$ac_ext <<_ACEOF
20199/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020200/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20201 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20202#define $ac_func innocuous_$ac_func
20203
Martin v. Löwis1142de32002-03-29 16:28:31 +000020204/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020205 which can conflict with char $ac_func (); below.
20206 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020207 <limits.h> exists even on freestanding compilers. */
20208
20209#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020210# include <limits.h>
20211#else
20212# include <assert.h>
20213#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020214
20215#undef $ac_func
20216
Martin v. Löwiseba40652007-08-30 20:10:57 +000020217/* Override any GCC internal prototype to avoid an error.
20218 Use char because int might match the return type of a GCC
20219 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020220#ifdef __cplusplus
20221extern "C"
20222#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020223char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000020224/* The GNU C library defines this for functions which it implements
20225 to always fail with ENOSYS. Some functions are actually named
20226 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020227#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000020228choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000020229#endif
20230
Skip Montanaro6dead952003-09-25 14:50:04 +000020231int
20232main ()
20233{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020234return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020235 ;
20236 return 0;
20237}
20238_ACEOF
20239rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020240if { (ac_try="$ac_link"
20241case "(($ac_try" in
20242 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20243 *) ac_try_echo=$ac_try;;
20244esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020245eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020246 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020247 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020248 grep -v '^ *+' conftest.er1 >conftest.err
20249 rm -f conftest.er1
20250 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020252 (exit $ac_status); } && {
20253 test -z "$ac_c_werror_flag" ||
20254 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020255 } && test -s conftest$ac_exeext &&
20256 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020257 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020258else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020259 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020260sed 's/^/| /' conftest.$ac_ext >&5
20261
Martin v. Löwiseba40652007-08-30 20:10:57 +000020262 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020263fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020264
20265rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020266 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020267fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020268ac_res=`eval echo '${'$as_ac_var'}'`
20269 { echo "$as_me:$LINENO: result: $ac_res" >&5
20270echo "${ECHO_T}$ac_res" >&6; }
20271if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020272 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020273#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020274_ACEOF
20275 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020276/* confdefs.h. */
20277_ACEOF
20278cat confdefs.h >>conftest.$ac_ext
20279cat >>conftest.$ac_ext <<_ACEOF
20280/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020281#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020282int
20283main ()
20284{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020285getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020286 ;
20287 return 0;
20288}
20289_ACEOF
20290rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020291if { (ac_try="$ac_compile"
20292case "(($ac_try" in
20293 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20294 *) ac_try_echo=$ac_try;;
20295esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020296eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020297 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020298 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020299 grep -v '^ *+' conftest.er1 >conftest.err
20300 rm -f conftest.er1
20301 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020303 (exit $ac_status); } && {
20304 test -z "$ac_c_werror_flag" ||
20305 test ! -s conftest.err
20306 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020307
20308cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020309#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020310_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020311
Martin v. Löwis11437992002-04-12 09:54:03 +000020312
Guido van Rossumf78abae1997-01-21 22:02:36 +000020313else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020314 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020315sed 's/^/| /' conftest.$ac_ext >&5
20316
Martin v. Löwiseba40652007-08-30 20:10:57 +000020317
Guido van Rossum627b2d71993-12-24 10:39:16 +000020318fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020319
20320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020321
Guido van Rossum627b2d71993-12-24 10:39:16 +000020322fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020323done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020324
Jack Jansen150753c2003-03-29 22:07:47 +000020325
20326for ac_func in setpgrp
20327do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020328as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20329{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20330echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020331if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020332 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020333else
Martin v. Löwis11437992002-04-12 09:54:03 +000020334 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020335/* confdefs.h. */
20336_ACEOF
20337cat confdefs.h >>conftest.$ac_ext
20338cat >>conftest.$ac_ext <<_ACEOF
20339/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020340/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20341 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20342#define $ac_func innocuous_$ac_func
20343
Jack Jansen150753c2003-03-29 22:07:47 +000020344/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020345 which can conflict with char $ac_func (); below.
20346 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020347 <limits.h> exists even on freestanding compilers. */
20348
20349#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020350# include <limits.h>
20351#else
20352# include <assert.h>
20353#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020354
20355#undef $ac_func
20356
Martin v. Löwiseba40652007-08-30 20:10:57 +000020357/* Override any GCC internal prototype to avoid an error.
20358 Use char because int might match the return type of a GCC
20359 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020360#ifdef __cplusplus
20361extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020362#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020363char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020364/* The GNU C library defines this for functions which it implements
20365 to always fail with ENOSYS. Some functions are actually named
20366 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020367#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020368choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020369#endif
20370
Skip Montanaro6dead952003-09-25 14:50:04 +000020371int
20372main ()
20373{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020374return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020375 ;
20376 return 0;
20377}
20378_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020379rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020380if { (ac_try="$ac_link"
20381case "(($ac_try" in
20382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20383 *) ac_try_echo=$ac_try;;
20384esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020386 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020387 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020388 grep -v '^ *+' conftest.er1 >conftest.err
20389 rm -f conftest.er1
20390 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020392 (exit $ac_status); } && {
20393 test -z "$ac_c_werror_flag" ||
20394 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020395 } && test -s conftest$ac_exeext &&
20396 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000020397 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020398else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020399 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020400sed 's/^/| /' conftest.$ac_ext >&5
20401
Martin v. Löwiseba40652007-08-30 20:10:57 +000020402 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020403fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020404
20405rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020406 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020407fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020408ac_res=`eval echo '${'$as_ac_var'}'`
20409 { echo "$as_me:$LINENO: result: $ac_res" >&5
20410echo "${ECHO_T}$ac_res" >&6; }
20411if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020412 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020413#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020414_ACEOF
20415 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020416/* confdefs.h. */
20417_ACEOF
20418cat confdefs.h >>conftest.$ac_ext
20419cat >>conftest.$ac_ext <<_ACEOF
20420/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020421#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020422int
20423main ()
20424{
20425setpgrp(0,0);
20426 ;
20427 return 0;
20428}
20429_ACEOF
20430rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020431if { (ac_try="$ac_compile"
20432case "(($ac_try" in
20433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20434 *) ac_try_echo=$ac_try;;
20435esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020437 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020438 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020439 grep -v '^ *+' conftest.er1 >conftest.err
20440 rm -f conftest.er1
20441 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020443 (exit $ac_status); } && {
20444 test -z "$ac_c_werror_flag" ||
20445 test ! -s conftest.err
20446 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020447
20448cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020449#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020450_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020451
Jack Jansen150753c2003-03-29 22:07:47 +000020452
20453else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020454 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020455sed 's/^/| /' conftest.$ac_ext >&5
20456
Martin v. Löwiseba40652007-08-30 20:10:57 +000020457
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020458fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020459
20460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020461
20462fi
20463done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020464
Martin v. Löwis11437992002-04-12 09:54:03 +000020465
Thomas Wouters3a584202000-08-05 23:28:51 +000020466for ac_func in gettimeofday
20467do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020468as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20469{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20470echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020471if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020472 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020473else
Martin v. Löwis11437992002-04-12 09:54:03 +000020474 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020475/* confdefs.h. */
20476_ACEOF
20477cat confdefs.h >>conftest.$ac_ext
20478cat >>conftest.$ac_ext <<_ACEOF
20479/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020480/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20481 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20482#define $ac_func innocuous_$ac_func
20483
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020484/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020485 which can conflict with char $ac_func (); below.
20486 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020487 <limits.h> exists even on freestanding compilers. */
20488
20489#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020490# include <limits.h>
20491#else
20492# include <assert.h>
20493#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020494
20495#undef $ac_func
20496
Martin v. Löwiseba40652007-08-30 20:10:57 +000020497/* Override any GCC internal prototype to avoid an error.
20498 Use char because int might match the return type of a GCC
20499 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020500#ifdef __cplusplus
20501extern "C"
20502#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020503char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020504/* The GNU C library defines this for functions which it implements
20505 to always fail with ENOSYS. Some functions are actually named
20506 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020507#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020508choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020509#endif
20510
Skip Montanaro6dead952003-09-25 14:50:04 +000020511int
20512main ()
20513{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020514return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020515 ;
20516 return 0;
20517}
20518_ACEOF
20519rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020520if { (ac_try="$ac_link"
20521case "(($ac_try" in
20522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20523 *) ac_try_echo=$ac_try;;
20524esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020526 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020527 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020528 grep -v '^ *+' conftest.er1 >conftest.err
20529 rm -f conftest.er1
20530 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020532 (exit $ac_status); } && {
20533 test -z "$ac_c_werror_flag" ||
20534 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020535 } && test -s conftest$ac_exeext &&
20536 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020537 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020538else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020539 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020540sed 's/^/| /' conftest.$ac_ext >&5
20541
Martin v. Löwiseba40652007-08-30 20:10:57 +000020542 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020543fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020544
20545rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020546 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020547fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020548ac_res=`eval echo '${'$as_ac_var'}'`
20549 { echo "$as_me:$LINENO: result: $ac_res" >&5
20550echo "${ECHO_T}$ac_res" >&6; }
20551if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020552 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020553#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020554_ACEOF
20555 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020556/* confdefs.h. */
20557_ACEOF
20558cat confdefs.h >>conftest.$ac_ext
20559cat >>conftest.$ac_ext <<_ACEOF
20560/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020561#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020562int
20563main ()
20564{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020565gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020566 ;
20567 return 0;
20568}
20569_ACEOF
20570rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020571if { (ac_try="$ac_compile"
20572case "(($ac_try" in
20573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20574 *) ac_try_echo=$ac_try;;
20575esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020577 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020578 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020579 grep -v '^ *+' conftest.er1 >conftest.err
20580 rm -f conftest.er1
20581 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020583 (exit $ac_status); } && {
20584 test -z "$ac_c_werror_flag" ||
20585 test ! -s conftest.err
20586 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020587 :
20588else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020589 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020590sed 's/^/| /' conftest.$ac_ext >&5
20591
Martin v. Löwis11437992002-04-12 09:54:03 +000020592
20593cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020594#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020595_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020596
Martin v. Löwis11437992002-04-12 09:54:03 +000020597
Guido van Rossum627b2d71993-12-24 10:39:16 +000020598fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020599
20600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020601
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020602fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020603done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020604
Michael W. Hudson54241132001-12-07 15:38:26 +000020605
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020606{ echo "$as_me:$LINENO: checking for major" >&5
20607echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020608cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020609/* confdefs.h. */
20610_ACEOF
20611cat confdefs.h >>conftest.$ac_ext
20612cat >>conftest.$ac_ext <<_ACEOF
20613/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020614
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020615#if defined(MAJOR_IN_MKDEV)
20616#include <sys/mkdev.h>
20617#elif defined(MAJOR_IN_SYSMACROS)
20618#include <sys/sysmacros.h>
20619#else
20620#include <sys/types.h>
20621#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020622
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020623int
20624main ()
20625{
20626
20627 makedev(major(0),minor(0));
20628
20629 ;
20630 return 0;
20631}
20632_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020633rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020634if { (ac_try="$ac_link"
20635case "(($ac_try" in
20636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20637 *) ac_try_echo=$ac_try;;
20638esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020640 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020641 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020642 grep -v '^ *+' conftest.er1 >conftest.err
20643 rm -f conftest.er1
20644 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020646 (exit $ac_status); } && {
20647 test -z "$ac_c_werror_flag" ||
20648 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020649 } && test -s conftest$ac_exeext &&
20650 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020651
20652
20653cat >>confdefs.h <<\_ACEOF
20654#define HAVE_DEVICE_MACROS 1
20655_ACEOF
20656
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020657 { echo "$as_me:$LINENO: result: yes" >&5
20658echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020659
20660else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020661 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020662sed 's/^/| /' conftest.$ac_ext >&5
20663
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020664
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020665 { echo "$as_me:$LINENO: result: no" >&5
20666echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020667
20668fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020669
20670rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020671 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020672
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020673# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020674# for [no]getaddrinfo in netdb.h.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020675{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20676echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020677cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020678/* confdefs.h. */
20679_ACEOF
20680cat confdefs.h >>conftest.$ac_ext
20681cat >>conftest.$ac_ext <<_ACEOF
20682/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020683
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020684#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020685#include <sys/socket.h>
20686#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020687#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020688
Martin v. Löwis11437992002-04-12 09:54:03 +000020689int
20690main ()
20691{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020692getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020693 ;
20694 return 0;
20695}
20696_ACEOF
20697rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020698if { (ac_try="$ac_link"
20699case "(($ac_try" in
20700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20701 *) ac_try_echo=$ac_try;;
20702esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020704 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020705 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020706 grep -v '^ *+' conftest.er1 >conftest.err
20707 rm -f conftest.er1
20708 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020710 (exit $ac_status); } && {
20711 test -z "$ac_c_werror_flag" ||
20712 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020713 } && test -s conftest$ac_exeext &&
20714 $as_test_x conftest$ac_exeext; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020715 have_getaddrinfo=yes
20716else
20717 echo "$as_me: failed program was:" >&5
20718sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020719
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020720 have_getaddrinfo=no
20721fi
20722
20723rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20724 conftest$ac_exeext conftest.$ac_ext
20725{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20726echo "${ECHO_T}$have_getaddrinfo" >&6; }
20727if test $have_getaddrinfo = yes
20728then
20729 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020730echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020731 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
20732 echo $ECHO_N "(cached) $ECHO_C" >&6
20733else
20734 if test "$cross_compiling" = yes; then
20735 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020736else
Martin v. Löwis11437992002-04-12 09:54:03 +000020737 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020738/* confdefs.h. */
20739_ACEOF
20740cat confdefs.h >>conftest.$ac_ext
20741cat >>conftest.$ac_ext <<_ACEOF
20742/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020743
20744#include <sys/types.h>
20745#include <netdb.h>
20746#include <string.h>
20747#include <sys/socket.h>
20748#include <netinet/in.h>
20749
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020750int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020751{
20752 int passive, gaierr, inet4 = 0, inet6 = 0;
20753 struct addrinfo hints, *ai, *aitop;
20754 char straddr[INET6_ADDRSTRLEN], strport[16];
20755
20756 for (passive = 0; passive <= 1; passive++) {
20757 memset(&hints, 0, sizeof(hints));
20758 hints.ai_family = AF_UNSPEC;
20759 hints.ai_flags = passive ? AI_PASSIVE : 0;
20760 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020761 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020762 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20763 (void)gai_strerror(gaierr);
20764 goto bad;
20765 }
20766 for (ai = aitop; ai; ai = ai->ai_next) {
20767 if (ai->ai_addr == NULL ||
20768 ai->ai_addrlen == 0 ||
20769 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20770 straddr, sizeof(straddr), strport, sizeof(strport),
20771 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20772 goto bad;
20773 }
20774 switch (ai->ai_family) {
20775 case AF_INET:
20776 if (strcmp(strport, "54321") != 0) {
20777 goto bad;
20778 }
20779 if (passive) {
20780 if (strcmp(straddr, "0.0.0.0") != 0) {
20781 goto bad;
20782 }
20783 } else {
20784 if (strcmp(straddr, "127.0.0.1") != 0) {
20785 goto bad;
20786 }
20787 }
20788 inet4++;
20789 break;
20790 case AF_INET6:
20791 if (strcmp(strport, "54321") != 0) {
20792 goto bad;
20793 }
20794 if (passive) {
20795 if (strcmp(straddr, "::") != 0) {
20796 goto bad;
20797 }
20798 } else {
20799 if (strcmp(straddr, "::1") != 0) {
20800 goto bad;
20801 }
20802 }
20803 inet6++;
20804 break;
20805 case AF_UNSPEC:
20806 goto bad;
20807 break;
20808 default:
20809 /* another family support? */
20810 break;
20811 }
20812 }
20813 }
20814
20815 if (!(inet4 == 0 || inet4 == 2))
20816 goto bad;
20817 if (!(inet6 == 0 || inet6 == 2))
20818 goto bad;
20819
20820 if (aitop)
20821 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020822 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020823
20824 bad:
20825 if (aitop)
20826 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020827 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020828}
20829
Martin v. Löwis11437992002-04-12 09:54:03 +000020830_ACEOF
20831rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020832if { (ac_try="$ac_link"
20833case "(($ac_try" in
20834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20835 *) ac_try_echo=$ac_try;;
20836esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020838 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020839 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020841 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000020842 { (case "(($ac_try" in
20843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20844 *) ac_try_echo=$ac_try;;
20845esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020847 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020848 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020850 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020851 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020852else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020853 echo "$as_me: program exited with status $ac_status" >&5
20854echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020855sed 's/^/| /' conftest.$ac_ext >&5
20856
Martin v. Löwis11437992002-04-12 09:54:03 +000020857( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020858ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020859fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020860rm -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 +000020861fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020862
20863
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020864fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020865
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020866fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020867
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020868if test $have_getaddrinfo = no -o $ac_cv_buggy_getaddrinfo = yes
20869then
20870 if test $ipv6 = yes
20871 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020872 echo 'Fatal: You must get working getaddrinfo() function.'
20873 echo ' or you can specify "--disable-ipv6"'.
20874 exit 1
20875 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020876else
Martin v. Löwis11437992002-04-12 09:54:03 +000020877
20878cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020879#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020880_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020881
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020882fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020883
Jack Jansen9a66b6d2001-08-08 13:56:14 +000020884for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020885do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020886as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20887{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20888echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020889if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020890 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020891else
Martin v. Löwis11437992002-04-12 09:54:03 +000020892 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020893/* confdefs.h. */
20894_ACEOF
20895cat confdefs.h >>conftest.$ac_ext
20896cat >>conftest.$ac_ext <<_ACEOF
20897/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020898/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20899 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20900#define $ac_func innocuous_$ac_func
20901
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020902/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020903 which can conflict with char $ac_func (); below.
20904 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020905 <limits.h> exists even on freestanding compilers. */
20906
20907#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020908# include <limits.h>
20909#else
20910# include <assert.h>
20911#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020912
20913#undef $ac_func
20914
Martin v. Löwiseba40652007-08-30 20:10:57 +000020915/* Override any GCC internal prototype to avoid an error.
20916 Use char because int might match the return type of a GCC
20917 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020918#ifdef __cplusplus
20919extern "C"
20920#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020921char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020922/* The GNU C library defines this for functions which it implements
20923 to always fail with ENOSYS. Some functions are actually named
20924 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020925#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020926choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020927#endif
20928
Skip Montanaro6dead952003-09-25 14:50:04 +000020929int
20930main ()
20931{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020932return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020933 ;
20934 return 0;
20935}
20936_ACEOF
20937rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020938if { (ac_try="$ac_link"
20939case "(($ac_try" in
20940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20941 *) ac_try_echo=$ac_try;;
20942esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020943eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020944 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020945 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020946 grep -v '^ *+' conftest.er1 >conftest.err
20947 rm -f conftest.er1
20948 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020950 (exit $ac_status); } && {
20951 test -z "$ac_c_werror_flag" ||
20952 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020953 } && test -s conftest$ac_exeext &&
20954 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020955 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020956else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020957 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020958sed 's/^/| /' conftest.$ac_ext >&5
20959
Martin v. Löwiseba40652007-08-30 20:10:57 +000020960 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020961fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020962
20963rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020964 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020965fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020966ac_res=`eval echo '${'$as_ac_var'}'`
20967 { echo "$as_me:$LINENO: result: $ac_res" >&5
20968echo "${ECHO_T}$ac_res" >&6; }
20969if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020970 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020971#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020972_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020973
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020974fi
20975done
20976
Michael W. Hudson54241132001-12-07 15:38:26 +000020977
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020978# checks for structures
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020979{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20980echo $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 +000020981if test "${ac_cv_header_time+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020982 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020983else
Martin v. Löwis11437992002-04-12 09:54:03 +000020984 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020985/* confdefs.h. */
20986_ACEOF
20987cat confdefs.h >>conftest.$ac_ext
20988cat >>conftest.$ac_ext <<_ACEOF
20989/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020990#include <sys/types.h>
20991#include <sys/time.h>
20992#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020993
Martin v. Löwis11437992002-04-12 09:54:03 +000020994int
20995main ()
20996{
20997if ((struct tm *) 0)
20998return 0;
20999 ;
21000 return 0;
21001}
21002_ACEOF
21003rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021004if { (ac_try="$ac_compile"
21005case "(($ac_try" in
21006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21007 *) ac_try_echo=$ac_try;;
21008esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021010 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021011 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021012 grep -v '^ *+' conftest.er1 >conftest.err
21013 rm -f conftest.er1
21014 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021016 (exit $ac_status); } && {
21017 test -z "$ac_c_werror_flag" ||
21018 test ! -s conftest.err
21019 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021020 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021021else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021022 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021023sed 's/^/| /' conftest.$ac_ext >&5
21024
Martin v. Löwiseba40652007-08-30 20:10:57 +000021025 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021026fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021027
21028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021029fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021030{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
21031echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021032if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021033
21034cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021035#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021036_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021037
21038fi
21039
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021040{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
21041echo $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 +000021042if test "${ac_cv_struct_tm+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021043 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021044else
Martin v. Löwis11437992002-04-12 09:54:03 +000021045 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021046/* confdefs.h. */
21047_ACEOF
21048cat confdefs.h >>conftest.$ac_ext
21049cat >>conftest.$ac_ext <<_ACEOF
21050/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021051#include <sys/types.h>
21052#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021053
Martin v. Löwis11437992002-04-12 09:54:03 +000021054int
21055main ()
21056{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021057struct tm tm;
21058 int *p = &tm.tm_sec;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021059 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000021060 ;
21061 return 0;
21062}
21063_ACEOF
21064rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021065if { (ac_try="$ac_compile"
21066case "(($ac_try" in
21067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21068 *) ac_try_echo=$ac_try;;
21069esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021071 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021072 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021073 grep -v '^ *+' conftest.er1 >conftest.err
21074 rm -f conftest.er1
21075 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021077 (exit $ac_status); } && {
21078 test -z "$ac_c_werror_flag" ||
21079 test ! -s conftest.err
21080 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021081 ac_cv_struct_tm=time.h
21082else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021083 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021084sed 's/^/| /' conftest.$ac_ext >&5
21085
Martin v. Löwiseba40652007-08-30 20:10:57 +000021086 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021087fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021088
21089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021090fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021091{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
21092echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021093if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021094
21095cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021096#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021097_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021098
21099fi
21100
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021101{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
21102echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021103if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021104 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021105else
Martin v. Löwis11437992002-04-12 09:54:03 +000021106 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021107/* confdefs.h. */
21108_ACEOF
21109cat confdefs.h >>conftest.$ac_ext
21110cat >>conftest.$ac_ext <<_ACEOF
21111/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021112#include <sys/types.h>
21113#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000021114
21115
Martin v. Löwis11437992002-04-12 09:54:03 +000021116int
21117main ()
21118{
21119static struct tm ac_aggr;
21120if (ac_aggr.tm_zone)
21121return 0;
21122 ;
21123 return 0;
21124}
21125_ACEOF
21126rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021127if { (ac_try="$ac_compile"
21128case "(($ac_try" in
21129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21130 *) ac_try_echo=$ac_try;;
21131esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021133 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021134 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021135 grep -v '^ *+' conftest.er1 >conftest.err
21136 rm -f conftest.er1
21137 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021139 (exit $ac_status); } && {
21140 test -z "$ac_c_werror_flag" ||
21141 test ! -s conftest.err
21142 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021143 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021144else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021145 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021146sed 's/^/| /' conftest.$ac_ext >&5
21147
Martin v. Löwiseba40652007-08-30 20:10:57 +000021148 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021149/* confdefs.h. */
21150_ACEOF
21151cat confdefs.h >>conftest.$ac_ext
21152cat >>conftest.$ac_ext <<_ACEOF
21153/* end confdefs.h. */
21154#include <sys/types.h>
21155#include <$ac_cv_struct_tm>
21156
21157
21158int
21159main ()
21160{
21161static struct tm ac_aggr;
21162if (sizeof ac_aggr.tm_zone)
21163return 0;
21164 ;
21165 return 0;
21166}
21167_ACEOF
21168rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021169if { (ac_try="$ac_compile"
21170case "(($ac_try" in
21171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21172 *) ac_try_echo=$ac_try;;
21173esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021175 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021176 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021177 grep -v '^ *+' conftest.er1 >conftest.err
21178 rm -f conftest.er1
21179 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021181 (exit $ac_status); } && {
21182 test -z "$ac_c_werror_flag" ||
21183 test ! -s conftest.err
21184 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021185 ac_cv_member_struct_tm_tm_zone=yes
21186else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021187 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021188sed 's/^/| /' conftest.$ac_ext >&5
21189
Martin v. Löwiseba40652007-08-30 20:10:57 +000021190 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021191fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021192
21193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021194fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021195
21196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021197fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021198{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21199echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
21200if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021201
21202cat >>confdefs.h <<_ACEOF
21203#define HAVE_STRUCT_TM_TM_ZONE 1
21204_ACEOF
21205
21206
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021207fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021208
Martin v. Löwis11437992002-04-12 09:54:03 +000021209if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21210
21211cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021212#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021213_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021214
21215else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021216 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
21217echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021218if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021219 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000021220else
21221 cat >conftest.$ac_ext <<_ACEOF
21222/* confdefs.h. */
21223_ACEOF
21224cat confdefs.h >>conftest.$ac_ext
21225cat >>conftest.$ac_ext <<_ACEOF
21226/* end confdefs.h. */
21227#include <time.h>
21228
21229int
21230main ()
21231{
21232#ifndef tzname
21233 (void) tzname;
21234#endif
21235
21236 ;
21237 return 0;
21238}
21239_ACEOF
21240rm -f conftest.$ac_objext
21241if { (ac_try="$ac_compile"
21242case "(($ac_try" in
21243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21244 *) ac_try_echo=$ac_try;;
21245esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021247 (eval "$ac_compile") 2>conftest.er1
21248 ac_status=$?
21249 grep -v '^ *+' conftest.er1 >conftest.err
21250 rm -f conftest.er1
21251 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021253 (exit $ac_status); } && {
21254 test -z "$ac_c_werror_flag" ||
21255 test ! -s conftest.err
21256 } && test -s conftest.$ac_objext; then
21257 ac_cv_have_decl_tzname=yes
21258else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021259 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021260sed 's/^/| /' conftest.$ac_ext >&5
21261
21262 ac_cv_have_decl_tzname=no
21263fi
21264
21265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21266fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021267{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
21268echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
21269if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021270
21271cat >>confdefs.h <<_ACEOF
21272#define HAVE_DECL_TZNAME 1
21273_ACEOF
21274
21275
21276else
21277 cat >>confdefs.h <<_ACEOF
21278#define HAVE_DECL_TZNAME 0
21279_ACEOF
21280
21281
21282fi
21283
21284
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021285 { echo "$as_me:$LINENO: checking for tzname" >&5
21286echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021287if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021288 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021289else
Martin v. Löwis11437992002-04-12 09:54:03 +000021290 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021291/* confdefs.h. */
21292_ACEOF
21293cat confdefs.h >>conftest.$ac_ext
21294cat >>conftest.$ac_ext <<_ACEOF
21295/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021296#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000021297#if !HAVE_DECL_TZNAME
21298extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021299#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021300
Martin v. Löwis11437992002-04-12 09:54:03 +000021301int
21302main ()
21303{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021304return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021305 ;
21306 return 0;
21307}
21308_ACEOF
21309rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021310if { (ac_try="$ac_link"
21311case "(($ac_try" in
21312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21313 *) ac_try_echo=$ac_try;;
21314esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021316 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021317 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021318 grep -v '^ *+' conftest.er1 >conftest.err
21319 rm -f conftest.er1
21320 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021322 (exit $ac_status); } && {
21323 test -z "$ac_c_werror_flag" ||
21324 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021325 } && test -s conftest$ac_exeext &&
21326 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021327 ac_cv_var_tzname=yes
21328else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021329 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021330sed 's/^/| /' conftest.$ac_ext >&5
21331
Martin v. Löwiseba40652007-08-30 20:10:57 +000021332 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021333fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021334
21335rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021336 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021337fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021338{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21339echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021340 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021341
21342cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021343#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021344_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021345
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021346 fi
21347fi
21348
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021349{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21350echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021351if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021352 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021353else
21354 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021355/* confdefs.h. */
21356_ACEOF
21357cat confdefs.h >>conftest.$ac_ext
21358cat >>conftest.$ac_ext <<_ACEOF
21359/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021360$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021361int
21362main ()
21363{
21364static struct stat ac_aggr;
21365if (ac_aggr.st_rdev)
21366return 0;
21367 ;
21368 return 0;
21369}
21370_ACEOF
21371rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021372if { (ac_try="$ac_compile"
21373case "(($ac_try" in
21374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21375 *) ac_try_echo=$ac_try;;
21376esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021378 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021379 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021380 grep -v '^ *+' conftest.er1 >conftest.err
21381 rm -f conftest.er1
21382 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021384 (exit $ac_status); } && {
21385 test -z "$ac_c_werror_flag" ||
21386 test ! -s conftest.err
21387 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021388 ac_cv_member_struct_stat_st_rdev=yes
21389else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021390 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021391sed 's/^/| /' conftest.$ac_ext >&5
21392
Martin v. Löwiseba40652007-08-30 20:10:57 +000021393 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021394/* confdefs.h. */
21395_ACEOF
21396cat confdefs.h >>conftest.$ac_ext
21397cat >>conftest.$ac_ext <<_ACEOF
21398/* end confdefs.h. */
21399$ac_includes_default
21400int
21401main ()
21402{
21403static struct stat ac_aggr;
21404if (sizeof ac_aggr.st_rdev)
21405return 0;
21406 ;
21407 return 0;
21408}
21409_ACEOF
21410rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021411if { (ac_try="$ac_compile"
21412case "(($ac_try" in
21413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21414 *) ac_try_echo=$ac_try;;
21415esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021417 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021418 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021419 grep -v '^ *+' conftest.er1 >conftest.err
21420 rm -f conftest.er1
21421 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021423 (exit $ac_status); } && {
21424 test -z "$ac_c_werror_flag" ||
21425 test ! -s conftest.err
21426 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021427 ac_cv_member_struct_stat_st_rdev=yes
21428else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021429 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021430sed 's/^/| /' conftest.$ac_ext >&5
21431
Martin v. Löwiseba40652007-08-30 20:10:57 +000021432 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021433fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021434
21435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021436fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021437
21438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021439fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021440{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21441echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21442if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021443
21444cat >>confdefs.h <<_ACEOF
21445#define HAVE_STRUCT_STAT_ST_RDEV 1
21446_ACEOF
21447
21448
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021449fi
21450
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021451{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21452echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021453if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021454 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021455else
Martin v. Löwis11437992002-04-12 09:54:03 +000021456 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021457/* confdefs.h. */
21458_ACEOF
21459cat confdefs.h >>conftest.$ac_ext
21460cat >>conftest.$ac_ext <<_ACEOF
21461/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021462$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021463int
21464main ()
21465{
21466static struct stat ac_aggr;
21467if (ac_aggr.st_blksize)
21468return 0;
21469 ;
21470 return 0;
21471}
21472_ACEOF
21473rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021474if { (ac_try="$ac_compile"
21475case "(($ac_try" in
21476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21477 *) ac_try_echo=$ac_try;;
21478esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021480 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021481 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021482 grep -v '^ *+' conftest.er1 >conftest.err
21483 rm -f conftest.er1
21484 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021486 (exit $ac_status); } && {
21487 test -z "$ac_c_werror_flag" ||
21488 test ! -s conftest.err
21489 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021490 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021491else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021492 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021493sed 's/^/| /' conftest.$ac_ext >&5
21494
Martin v. Löwiseba40652007-08-30 20:10:57 +000021495 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021496/* confdefs.h. */
21497_ACEOF
21498cat confdefs.h >>conftest.$ac_ext
21499cat >>conftest.$ac_ext <<_ACEOF
21500/* end confdefs.h. */
21501$ac_includes_default
21502int
21503main ()
21504{
21505static struct stat ac_aggr;
21506if (sizeof ac_aggr.st_blksize)
21507return 0;
21508 ;
21509 return 0;
21510}
21511_ACEOF
21512rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021513if { (ac_try="$ac_compile"
21514case "(($ac_try" in
21515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21516 *) ac_try_echo=$ac_try;;
21517esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021519 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021520 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021521 grep -v '^ *+' conftest.er1 >conftest.err
21522 rm -f conftest.er1
21523 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021525 (exit $ac_status); } && {
21526 test -z "$ac_c_werror_flag" ||
21527 test ! -s conftest.err
21528 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021529 ac_cv_member_struct_stat_st_blksize=yes
21530else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021531 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021532sed 's/^/| /' conftest.$ac_ext >&5
21533
Martin v. Löwiseba40652007-08-30 20:10:57 +000021534 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021535fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021536
21537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021539
21540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021541fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021542{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21543echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21544if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021545
Martin v. Löwis11437992002-04-12 09:54:03 +000021546cat >>confdefs.h <<_ACEOF
21547#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21548_ACEOF
21549
21550
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021551fi
21552
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021553{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21554echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021555if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021556 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021557else
21558 cat >conftest.$ac_ext <<_ACEOF
21559/* confdefs.h. */
21560_ACEOF
21561cat confdefs.h >>conftest.$ac_ext
21562cat >>conftest.$ac_ext <<_ACEOF
21563/* end confdefs.h. */
21564$ac_includes_default
21565int
21566main ()
21567{
21568static struct stat ac_aggr;
21569if (ac_aggr.st_flags)
21570return 0;
21571 ;
21572 return 0;
21573}
21574_ACEOF
21575rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021576if { (ac_try="$ac_compile"
21577case "(($ac_try" in
21578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21579 *) ac_try_echo=$ac_try;;
21580esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021581eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021582 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021583 ac_status=$?
21584 grep -v '^ *+' conftest.er1 >conftest.err
21585 rm -f conftest.er1
21586 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021588 (exit $ac_status); } && {
21589 test -z "$ac_c_werror_flag" ||
21590 test ! -s conftest.err
21591 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021592 ac_cv_member_struct_stat_st_flags=yes
21593else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021594 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021595sed 's/^/| /' conftest.$ac_ext >&5
21596
Martin v. Löwiseba40652007-08-30 20:10:57 +000021597 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021598/* confdefs.h. */
21599_ACEOF
21600cat confdefs.h >>conftest.$ac_ext
21601cat >>conftest.$ac_ext <<_ACEOF
21602/* end confdefs.h. */
21603$ac_includes_default
21604int
21605main ()
21606{
21607static struct stat ac_aggr;
21608if (sizeof ac_aggr.st_flags)
21609return 0;
21610 ;
21611 return 0;
21612}
21613_ACEOF
21614rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021615if { (ac_try="$ac_compile"
21616case "(($ac_try" in
21617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21618 *) ac_try_echo=$ac_try;;
21619esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021621 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021622 ac_status=$?
21623 grep -v '^ *+' conftest.er1 >conftest.err
21624 rm -f conftest.er1
21625 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021627 (exit $ac_status); } && {
21628 test -z "$ac_c_werror_flag" ||
21629 test ! -s conftest.err
21630 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021631 ac_cv_member_struct_stat_st_flags=yes
21632else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021633 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021634sed 's/^/| /' conftest.$ac_ext >&5
21635
Martin v. Löwiseba40652007-08-30 20:10:57 +000021636 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021637fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021638
21639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021640fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021641
21642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021643fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021644{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21645echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
21646if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021647
21648cat >>confdefs.h <<_ACEOF
21649#define HAVE_STRUCT_STAT_ST_FLAGS 1
21650_ACEOF
21651
21652
21653fi
21654
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021655{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
21656echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021657if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021658 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021659else
21660 cat >conftest.$ac_ext <<_ACEOF
21661/* confdefs.h. */
21662_ACEOF
21663cat confdefs.h >>conftest.$ac_ext
21664cat >>conftest.$ac_ext <<_ACEOF
21665/* end confdefs.h. */
21666$ac_includes_default
21667int
21668main ()
21669{
21670static struct stat ac_aggr;
21671if (ac_aggr.st_gen)
21672return 0;
21673 ;
21674 return 0;
21675}
21676_ACEOF
21677rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021678if { (ac_try="$ac_compile"
21679case "(($ac_try" in
21680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21681 *) ac_try_echo=$ac_try;;
21682esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021683eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021684 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021685 ac_status=$?
21686 grep -v '^ *+' conftest.er1 >conftest.err
21687 rm -f conftest.er1
21688 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021690 (exit $ac_status); } && {
21691 test -z "$ac_c_werror_flag" ||
21692 test ! -s conftest.err
21693 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021694 ac_cv_member_struct_stat_st_gen=yes
21695else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021696 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021697sed 's/^/| /' conftest.$ac_ext >&5
21698
Martin v. Löwiseba40652007-08-30 20:10:57 +000021699 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021700/* confdefs.h. */
21701_ACEOF
21702cat confdefs.h >>conftest.$ac_ext
21703cat >>conftest.$ac_ext <<_ACEOF
21704/* end confdefs.h. */
21705$ac_includes_default
21706int
21707main ()
21708{
21709static struct stat ac_aggr;
21710if (sizeof ac_aggr.st_gen)
21711return 0;
21712 ;
21713 return 0;
21714}
21715_ACEOF
21716rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021717if { (ac_try="$ac_compile"
21718case "(($ac_try" in
21719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21720 *) ac_try_echo=$ac_try;;
21721esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021723 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021724 ac_status=$?
21725 grep -v '^ *+' conftest.er1 >conftest.err
21726 rm -f conftest.er1
21727 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021729 (exit $ac_status); } && {
21730 test -z "$ac_c_werror_flag" ||
21731 test ! -s conftest.err
21732 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021733 ac_cv_member_struct_stat_st_gen=yes
21734else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021735 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021736sed 's/^/| /' conftest.$ac_ext >&5
21737
Martin v. Löwiseba40652007-08-30 20:10:57 +000021738 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021739fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021740
21741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021742fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021743
21744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021745fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021746{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21747echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21748if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021749
21750cat >>confdefs.h <<_ACEOF
21751#define HAVE_STRUCT_STAT_ST_GEN 1
21752_ACEOF
21753
21754
21755fi
21756
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021757{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21758echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021759if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021760 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021761else
21762 cat >conftest.$ac_ext <<_ACEOF
21763/* confdefs.h. */
21764_ACEOF
21765cat confdefs.h >>conftest.$ac_ext
21766cat >>conftest.$ac_ext <<_ACEOF
21767/* end confdefs.h. */
21768$ac_includes_default
21769int
21770main ()
21771{
21772static struct stat ac_aggr;
21773if (ac_aggr.st_birthtime)
21774return 0;
21775 ;
21776 return 0;
21777}
21778_ACEOF
21779rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021780if { (ac_try="$ac_compile"
21781case "(($ac_try" in
21782 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21783 *) ac_try_echo=$ac_try;;
21784esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021785eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021786 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021787 ac_status=$?
21788 grep -v '^ *+' conftest.er1 >conftest.err
21789 rm -f conftest.er1
21790 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021792 (exit $ac_status); } && {
21793 test -z "$ac_c_werror_flag" ||
21794 test ! -s conftest.err
21795 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021796 ac_cv_member_struct_stat_st_birthtime=yes
21797else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021798 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021799sed 's/^/| /' conftest.$ac_ext >&5
21800
Martin v. Löwiseba40652007-08-30 20:10:57 +000021801 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021802/* confdefs.h. */
21803_ACEOF
21804cat confdefs.h >>conftest.$ac_ext
21805cat >>conftest.$ac_ext <<_ACEOF
21806/* end confdefs.h. */
21807$ac_includes_default
21808int
21809main ()
21810{
21811static struct stat ac_aggr;
21812if (sizeof ac_aggr.st_birthtime)
21813return 0;
21814 ;
21815 return 0;
21816}
21817_ACEOF
21818rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021819if { (ac_try="$ac_compile"
21820case "(($ac_try" in
21821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21822 *) ac_try_echo=$ac_try;;
21823esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021825 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021826 ac_status=$?
21827 grep -v '^ *+' conftest.er1 >conftest.err
21828 rm -f conftest.er1
21829 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021831 (exit $ac_status); } && {
21832 test -z "$ac_c_werror_flag" ||
21833 test ! -s conftest.err
21834 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021835 ac_cv_member_struct_stat_st_birthtime=yes
21836else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021837 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021838sed 's/^/| /' conftest.$ac_ext >&5
21839
Martin v. Löwiseba40652007-08-30 20:10:57 +000021840 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021841fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021842
21843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021844fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021845
21846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021847fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021848{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
21849echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
21850if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021851
21852cat >>confdefs.h <<_ACEOF
21853#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
21854_ACEOF
21855
21856
21857fi
21858
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021859{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
21860echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021861if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021862 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021863else
Martin v. Löwis11437992002-04-12 09:54:03 +000021864 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021865/* confdefs.h. */
21866_ACEOF
21867cat confdefs.h >>conftest.$ac_ext
21868cat >>conftest.$ac_ext <<_ACEOF
21869/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021870$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021871int
21872main ()
21873{
21874static struct stat ac_aggr;
21875if (ac_aggr.st_blocks)
21876return 0;
21877 ;
21878 return 0;
21879}
21880_ACEOF
21881rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021882if { (ac_try="$ac_compile"
21883case "(($ac_try" in
21884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21885 *) ac_try_echo=$ac_try;;
21886esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021888 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021889 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021890 grep -v '^ *+' conftest.er1 >conftest.err
21891 rm -f conftest.er1
21892 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021894 (exit $ac_status); } && {
21895 test -z "$ac_c_werror_flag" ||
21896 test ! -s conftest.err
21897 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021898 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021899else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021900 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021901sed 's/^/| /' conftest.$ac_ext >&5
21902
Martin v. Löwiseba40652007-08-30 20:10:57 +000021903 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021904/* confdefs.h. */
21905_ACEOF
21906cat confdefs.h >>conftest.$ac_ext
21907cat >>conftest.$ac_ext <<_ACEOF
21908/* end confdefs.h. */
21909$ac_includes_default
21910int
21911main ()
21912{
21913static struct stat ac_aggr;
21914if (sizeof ac_aggr.st_blocks)
21915return 0;
21916 ;
21917 return 0;
21918}
21919_ACEOF
21920rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021921if { (ac_try="$ac_compile"
21922case "(($ac_try" in
21923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21924 *) ac_try_echo=$ac_try;;
21925esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021926eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021927 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021928 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021929 grep -v '^ *+' conftest.er1 >conftest.err
21930 rm -f conftest.er1
21931 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021933 (exit $ac_status); } && {
21934 test -z "$ac_c_werror_flag" ||
21935 test ! -s conftest.err
21936 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021937 ac_cv_member_struct_stat_st_blocks=yes
21938else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021939 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021940sed 's/^/| /' conftest.$ac_ext >&5
21941
Martin v. Löwiseba40652007-08-30 20:10:57 +000021942 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021943fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021944
21945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021946fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021947
21948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021949fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021950{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21951echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
21952if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021953
Martin v. Löwis11437992002-04-12 09:54:03 +000021954cat >>confdefs.h <<_ACEOF
21955#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21956_ACEOF
21957
21958
21959cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021960#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021961_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021962
21963else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021964 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021965 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021966 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21967 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021968esac
21969
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021970fi
21971
Michael W. Hudson54241132001-12-07 15:38:26 +000021972
Martin v. Löwis11437992002-04-12 09:54:03 +000021973
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021974{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21975echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021976if test "${ac_cv_header_time_altzone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021977 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021978else
Martin v. Löwis11437992002-04-12 09:54:03 +000021979 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021980/* confdefs.h. */
21981_ACEOF
21982cat confdefs.h >>conftest.$ac_ext
21983cat >>conftest.$ac_ext <<_ACEOF
21984/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021985#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021986int
21987main ()
21988{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021989return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021990 ;
21991 return 0;
21992}
21993_ACEOF
21994rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021995if { (ac_try="$ac_compile"
21996case "(($ac_try" in
21997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21998 *) ac_try_echo=$ac_try;;
21999esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022001 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022002 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022003 grep -v '^ *+' conftest.er1 >conftest.err
22004 rm -f conftest.er1
22005 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022007 (exit $ac_status); } && {
22008 test -z "$ac_c_werror_flag" ||
22009 test ! -s conftest.err
22010 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022011 ac_cv_header_time_altzone=yes
22012else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022013 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022014sed 's/^/| /' conftest.$ac_ext >&5
22015
Martin v. Löwiseba40652007-08-30 20:10:57 +000022016 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022017fi
22018
Martin v. Löwiseba40652007-08-30 20:10:57 +000022019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22020fi
22021
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022022{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
22023echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022024if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022025
22026cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022027#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022028_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022029
22030fi
22031
Guido van Rossumda88dad1995-01-26 00:46:29 +000022032was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022033{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
22034echo $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 +000022035cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022036/* confdefs.h. */
22037_ACEOF
22038cat confdefs.h >>conftest.$ac_ext
22039cat >>conftest.$ac_ext <<_ACEOF
22040/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022041
22042#include <sys/types.h>
22043#include <sys/select.h>
22044#include <sys/time.h>
22045
Martin v. Löwis11437992002-04-12 09:54:03 +000022046int
22047main ()
22048{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022049;
Martin v. Löwis11437992002-04-12 09:54:03 +000022050 ;
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
22072
22073cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022074#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022075_ACEOF
22076
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022077 was_it_defined=yes
22078
Guido van Rossumf78abae1997-01-21 22:02:36 +000022079else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022080 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022081sed 's/^/| /' conftest.$ac_ext >&5
22082
Brett Cannon19fab762007-06-02 03:02:29 +000022083
Martin v. Löwiseba40652007-08-30 20:10:57 +000022084fi
22085
22086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022087{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
22088echo "${ECHO_T}$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022089
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022090{ echo "$as_me:$LINENO: checking for addrinfo" >&5
22091echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022092if test "${ac_cv_struct_addrinfo+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022093 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022094else
Martin v. Löwis11437992002-04-12 09:54:03 +000022095 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022096/* confdefs.h. */
22097_ACEOF
22098cat confdefs.h >>conftest.$ac_ext
22099cat >>conftest.$ac_ext <<_ACEOF
22100/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022101
22102# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022103int
22104main ()
22105{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022106struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000022107 ;
22108 return 0;
22109}
22110_ACEOF
22111rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022112if { (ac_try="$ac_compile"
22113case "(($ac_try" in
22114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22115 *) ac_try_echo=$ac_try;;
22116esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022118 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022119 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022120 grep -v '^ *+' conftest.er1 >conftest.err
22121 rm -f conftest.er1
22122 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022124 (exit $ac_status); } && {
22125 test -z "$ac_c_werror_flag" ||
22126 test ! -s conftest.err
22127 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022128 ac_cv_struct_addrinfo=yes
22129else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022130 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022131sed 's/^/| /' conftest.$ac_ext >&5
22132
Martin v. Löwiseba40652007-08-30 20:10:57 +000022133 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022134fi
22135
Martin v. Löwiseba40652007-08-30 20:10:57 +000022136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22137fi
22138
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022139{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
22140echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022141if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022142
22143cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022144#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022145_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022146
22147fi
22148
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022149{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
22150echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022151if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022152 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022153else
Martin v. Löwis11437992002-04-12 09:54:03 +000022154 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022155/* confdefs.h. */
22156_ACEOF
22157cat confdefs.h >>conftest.$ac_ext
22158cat >>conftest.$ac_ext <<_ACEOF
22159/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022160
22161# include <sys/types.h>
22162# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022163int
22164main ()
22165{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022166struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000022167 ;
22168 return 0;
22169}
22170_ACEOF
22171rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022172if { (ac_try="$ac_compile"
22173case "(($ac_try" in
22174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22175 *) ac_try_echo=$ac_try;;
22176esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022178 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022179 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022180 grep -v '^ *+' conftest.er1 >conftest.err
22181 rm -f conftest.er1
22182 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022184 (exit $ac_status); } && {
22185 test -z "$ac_c_werror_flag" ||
22186 test ! -s conftest.err
22187 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022188 ac_cv_struct_sockaddr_storage=yes
22189else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022190 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022191sed 's/^/| /' conftest.$ac_ext >&5
22192
Martin v. Löwiseba40652007-08-30 20:10:57 +000022193 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022194fi
22195
Martin v. Löwiseba40652007-08-30 20:10:57 +000022196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22197fi
22198
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022199{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
22200echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022201if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022202
22203cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022204#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022205_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022206
22207fi
22208
Guido van Rossum627b2d71993-12-24 10:39:16 +000022209# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000022210
Michael W. Hudson54241132001-12-07 15:38:26 +000022211
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022212{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
22213echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022214if test "${ac_cv_c_char_unsigned+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022215 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000022216else
Martin v. Löwis11437992002-04-12 09:54:03 +000022217 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022218/* confdefs.h. */
22219_ACEOF
22220cat confdefs.h >>conftest.$ac_ext
22221cat >>conftest.$ac_ext <<_ACEOF
22222/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022223$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022224int
22225main ()
22226{
22227static int test_array [1 - 2 * !(((char) -1) < 0)];
22228test_array [0] = 0
22229
22230 ;
22231 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000022232}
Martin v. Löwis11437992002-04-12 09:54:03 +000022233_ACEOF
22234rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022235if { (ac_try="$ac_compile"
22236case "(($ac_try" in
22237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22238 *) ac_try_echo=$ac_try;;
22239esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022241 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022242 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022243 grep -v '^ *+' conftest.er1 >conftest.err
22244 rm -f conftest.er1
22245 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022247 (exit $ac_status); } && {
22248 test -z "$ac_c_werror_flag" ||
22249 test ! -s conftest.err
22250 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022251 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +000022256 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022257fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022258
22259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022260fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022261{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
22262echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022263if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022264 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022265#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022266_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022267
22268fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000022269
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022270{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
22271echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022272if test "${ac_cv_c_const+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022273 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022274else
22275 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022276/* confdefs.h. */
22277_ACEOF
22278cat confdefs.h >>conftest.$ac_ext
22279cat >>conftest.$ac_ext <<_ACEOF
22280/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022281
Martin v. Löwis11437992002-04-12 09:54:03 +000022282int
22283main ()
22284{
22285/* FIXME: Include the comments suggested by Paul. */
22286#ifndef __cplusplus
22287 /* Ultrix mips cc rejects this. */
22288 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000022289 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022290 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022291 char const *const *pcpcc;
22292 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022293 /* NEC SVR4.0.2 mips cc rejects this. */
22294 struct point {int x, y;};
22295 static struct point const zero = {0,0};
22296 /* AIX XL C 1.02.0.0 rejects this.
22297 It does not let you subtract one const X* pointer from another in
22298 an arm of an if-expression whose if-part is not a constant
22299 expression */
22300 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000022301 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022302 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022303 ++pcpcc;
22304 ppc = (char**) pcpcc;
22305 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022306 { /* SCO 3.2v4 cc rejects this. */
22307 char *t;
22308 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022309
Martin v. Löwis11437992002-04-12 09:54:03 +000022310 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022311 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022312 }
22313 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22314 int x[] = {25, 17};
22315 const int *foo = &x[0];
22316 ++foo;
22317 }
22318 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22319 typedef const int *iptr;
22320 iptr p = 0;
22321 ++p;
22322 }
22323 { /* AIX XL C 1.02.0.0 rejects this saying
22324 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22325 struct s { int j; const int *ap[3]; };
22326 struct s *b; b->j = 5;
22327 }
22328 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22329 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022330 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022331 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022332 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022333#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022334
Martin v. Löwis11437992002-04-12 09:54:03 +000022335 ;
22336 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022337}
Martin v. Löwis11437992002-04-12 09:54:03 +000022338_ACEOF
22339rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022340if { (ac_try="$ac_compile"
22341case "(($ac_try" in
22342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22343 *) ac_try_echo=$ac_try;;
22344esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022345eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022346 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022347 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022348 grep -v '^ *+' conftest.er1 >conftest.err
22349 rm -f conftest.er1
22350 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022352 (exit $ac_status); } && {
22353 test -z "$ac_c_werror_flag" ||
22354 test ! -s conftest.err
22355 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022356 ac_cv_c_const=yes
22357else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022358 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022359sed 's/^/| /' conftest.$ac_ext >&5
22360
Martin v. Löwiseba40652007-08-30 20:10:57 +000022361 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022362fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022363
22364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022365fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022366{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22367echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022368if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022369
22370cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022371#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000022372_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022373
22374fi
22375
Michael W. Hudson54241132001-12-07 15:38:26 +000022376
Guido van Rossumda88dad1995-01-26 00:46:29 +000022377works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022378{ echo "$as_me:$LINENO: checking for working volatile" >&5
22379echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022380cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022381/* confdefs.h. */
22382_ACEOF
22383cat confdefs.h >>conftest.$ac_ext
22384cat >>conftest.$ac_ext <<_ACEOF
22385/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000022386
Martin v. Löwis11437992002-04-12 09:54:03 +000022387int
22388main ()
22389{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022390volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022391 ;
22392 return 0;
22393}
22394_ACEOF
22395rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022396if { (ac_try="$ac_compile"
22397case "(($ac_try" in
22398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22399 *) ac_try_echo=$ac_try;;
22400esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022402 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022403 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022404 grep -v '^ *+' conftest.er1 >conftest.err
22405 rm -f conftest.er1
22406 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022408 (exit $ac_status); } && {
22409 test -z "$ac_c_werror_flag" ||
22410 test ! -s conftest.err
22411 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022412 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022413else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022414 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022415sed 's/^/| /' conftest.$ac_ext >&5
22416
Martin v. Löwis11437992002-04-12 09:54:03 +000022417
22418cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022419#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022420_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022421
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022422
Guido van Rossum627b2d71993-12-24 10:39:16 +000022423fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022424
22425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022426{ echo "$as_me:$LINENO: result: $works" >&5
22427echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022428
Guido van Rossumda88dad1995-01-26 00:46:29 +000022429works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022430{ echo "$as_me:$LINENO: checking for working signed char" >&5
22431echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022432cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022433/* confdefs.h. */
22434_ACEOF
22435cat confdefs.h >>conftest.$ac_ext
22436cat >>conftest.$ac_ext <<_ACEOF
22437/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022438
Martin v. Löwis11437992002-04-12 09:54:03 +000022439int
22440main ()
22441{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022442signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022443 ;
22444 return 0;
22445}
22446_ACEOF
22447rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022448if { (ac_try="$ac_compile"
22449case "(($ac_try" in
22450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22451 *) ac_try_echo=$ac_try;;
22452esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022454 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022455 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022456 grep -v '^ *+' conftest.er1 >conftest.err
22457 rm -f conftest.er1
22458 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022460 (exit $ac_status); } && {
22461 test -z "$ac_c_werror_flag" ||
22462 test ! -s conftest.err
22463 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022464 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022465else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022466 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022467sed 's/^/| /' conftest.$ac_ext >&5
22468
Martin v. Löwis11437992002-04-12 09:54:03 +000022469
22470cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022471#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022472_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022473
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022474
Guido van Rossum7f43da71994-08-01 12:15:30 +000022475fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022476
22477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022478{ echo "$as_me:$LINENO: result: $works" >&5
22479echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022480
Guido van Rossumda88dad1995-01-26 00:46:29 +000022481have_prototypes=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022482{ echo "$as_me:$LINENO: checking for prototypes" >&5
22483echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022484cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022485/* confdefs.h. */
22486_ACEOF
22487cat confdefs.h >>conftest.$ac_ext
22488cat >>conftest.$ac_ext <<_ACEOF
22489/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022490int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022491int
22492main ()
22493{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022494return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022495 ;
22496 return 0;
22497}
22498_ACEOF
22499rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022500if { (ac_try="$ac_compile"
22501case "(($ac_try" in
22502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22503 *) ac_try_echo=$ac_try;;
22504esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022505eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022506 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022507 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022508 grep -v '^ *+' conftest.er1 >conftest.err
22509 rm -f conftest.er1
22510 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022512 (exit $ac_status); } && {
22513 test -z "$ac_c_werror_flag" ||
22514 test ! -s conftest.err
22515 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022516
22517
22518cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022519#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022520_ACEOF
22521
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022522 have_prototypes=yes
22523
Guido van Rossumf78abae1997-01-21 22:02:36 +000022524else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022525 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022526sed 's/^/| /' conftest.$ac_ext >&5
22527
Martin v. Löwiseba40652007-08-30 20:10:57 +000022528
Guido van Rossum7f43da71994-08-01 12:15:30 +000022529fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022530
22531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022532{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22533echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022534
Guido van Rossumda88dad1995-01-26 00:46:29 +000022535works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022536{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22537echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022538cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022539/* confdefs.h. */
22540_ACEOF
22541cat confdefs.h >>conftest.$ac_ext
22542cat >>conftest.$ac_ext <<_ACEOF
22543/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022544
22545#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022546int foo(int x, ...) {
22547 va_list va;
22548 va_start(va, x);
22549 va_arg(va, int);
22550 va_arg(va, char *);
22551 va_arg(va, double);
22552 return 0;
22553}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022554
Martin v. Löwis11437992002-04-12 09:54:03 +000022555int
22556main ()
22557{
Guido van Rossum90eea071996-08-30 20:58:57 +000022558return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022559 ;
22560 return 0;
22561}
22562_ACEOF
22563rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022564if { (ac_try="$ac_compile"
22565case "(($ac_try" in
22566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22567 *) ac_try_echo=$ac_try;;
22568esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022570 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022571 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022572 grep -v '^ *+' conftest.er1 >conftest.err
22573 rm -f conftest.er1
22574 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022576 (exit $ac_status); } && {
22577 test -z "$ac_c_werror_flag" ||
22578 test ! -s conftest.err
22579 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022580
22581
22582cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022583#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022584_ACEOF
22585
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022586 works=yes
22587
Guido van Rossumf78abae1997-01-21 22:02:36 +000022588else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022589 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022590sed 's/^/| /' conftest.$ac_ext >&5
22591
Martin v. Löwiseba40652007-08-30 20:10:57 +000022592
Guido van Rossum627b2d71993-12-24 10:39:16 +000022593fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022594
22595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022596{ echo "$as_me:$LINENO: result: $works" >&5
22597echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022598
Martin v. Löwisd6320502004-08-12 13:45:08 +000022599# check for socketpair
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022600{ echo "$as_me:$LINENO: checking for socketpair" >&5
22601echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022602cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022603/* confdefs.h. */
22604_ACEOF
22605cat confdefs.h >>conftest.$ac_ext
22606cat >>conftest.$ac_ext <<_ACEOF
22607/* end confdefs.h. */
22608
22609#include <sys/types.h>
22610#include <sys/socket.h>
22611
22612int
22613main ()
22614{
22615void *x=socketpair
22616 ;
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öwisd6320502004-08-12 13:45:08 +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
Martin v. Löwisd6320502004-08-12 13:45:08 +000022637
22638cat >>confdefs.h <<\_ACEOF
22639#define HAVE_SOCKETPAIR 1
22640_ACEOF
22641
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022642 { echo "$as_me:$LINENO: result: yes" >&5
22643echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022644else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022645 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000022646sed 's/^/| /' conftest.$ac_ext >&5
22647
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022648 { echo "$as_me:$LINENO: result: no" >&5
22649echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022650
22651fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022652
22653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022654
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022655# check if sockaddr has sa_len member
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022656{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
22657echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022658cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022659/* confdefs.h. */
22660_ACEOF
22661cat confdefs.h >>conftest.$ac_ext
22662cat >>conftest.$ac_ext <<_ACEOF
22663/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022664#include <sys/types.h>
22665#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022666int
22667main ()
22668{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022669struct sockaddr x;
22670x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022671 ;
22672 return 0;
22673}
22674_ACEOF
22675rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022676if { (ac_try="$ac_compile"
22677case "(($ac_try" in
22678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22679 *) ac_try_echo=$ac_try;;
22680esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022681eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022682 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022683 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022684 grep -v '^ *+' conftest.er1 >conftest.err
22685 rm -f conftest.er1
22686 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022688 (exit $ac_status); } && {
22689 test -z "$ac_c_werror_flag" ||
22690 test ! -s conftest.err
22691 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022692 { echo "$as_me:$LINENO: result: yes" >&5
22693echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022694
22695cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022696#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022697_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022698
22699else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022701sed 's/^/| /' conftest.$ac_ext >&5
22702
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022703 { echo "$as_me:$LINENO: result: no" >&5
22704echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022705fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022706
22707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022708
Guido van Rossumda88dad1995-01-26 00:46:29 +000022709va_list_is_array=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022710{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22711echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022712cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022713/* confdefs.h. */
22714_ACEOF
22715cat confdefs.h >>conftest.$ac_ext
22716cat >>conftest.$ac_ext <<_ACEOF
22717/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022718
22719#ifdef HAVE_STDARG_PROTOTYPES
22720#include <stdarg.h>
22721#else
22722#include <varargs.h>
22723#endif
22724
Martin v. Löwis11437992002-04-12 09:54:03 +000022725int
22726main ()
22727{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022728va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022729 ;
22730 return 0;
22731}
22732_ACEOF
22733rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022734if { (ac_try="$ac_compile"
22735case "(($ac_try" in
22736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22737 *) ac_try_echo=$ac_try;;
22738esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022740 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022741 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022742 grep -v '^ *+' conftest.er1 >conftest.err
22743 rm -f conftest.er1
22744 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022746 (exit $ac_status); } && {
22747 test -z "$ac_c_werror_flag" ||
22748 test ! -s conftest.err
22749 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022750 :
22751else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022753sed 's/^/| /' conftest.$ac_ext >&5
22754
Martin v. Löwis11437992002-04-12 09:54:03 +000022755
22756
22757cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022758#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022759_ACEOF
22760
Guido van Rossumda88dad1995-01-26 00:46:29 +000022761 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022762
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022763fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022764
22765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022766{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22767echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022768
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022769# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022770
22771
22772
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022773{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22774echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022775if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022776 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022777else
Martin v. Löwis11437992002-04-12 09:54:03 +000022778 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022779/* confdefs.h. */
22780_ACEOF
22781cat confdefs.h >>conftest.$ac_ext
22782cat >>conftest.$ac_ext <<_ACEOF
22783/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022784/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22785 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22786#define gethostbyname_r innocuous_gethostbyname_r
22787
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022788/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022789 which can conflict with char gethostbyname_r (); below.
22790 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022791 <limits.h> exists even on freestanding compilers. */
22792
22793#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022794# include <limits.h>
22795#else
22796# include <assert.h>
22797#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022798
22799#undef gethostbyname_r
22800
Martin v. Löwiseba40652007-08-30 20:10:57 +000022801/* Override any GCC internal prototype to avoid an error.
22802 Use char because int might match the return type of a GCC
22803 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022804#ifdef __cplusplus
22805extern "C"
22806#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022807char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022808/* The GNU C library defines this for functions which it implements
22809 to always fail with ENOSYS. Some functions are actually named
22810 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022811#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022812choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022813#endif
22814
Skip Montanaro6dead952003-09-25 14:50:04 +000022815int
22816main ()
22817{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022818return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022819 ;
22820 return 0;
22821}
22822_ACEOF
22823rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022824if { (ac_try="$ac_link"
22825case "(($ac_try" in
22826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22827 *) ac_try_echo=$ac_try;;
22828esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022830 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022831 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022832 grep -v '^ *+' conftest.er1 >conftest.err
22833 rm -f conftest.er1
22834 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022836 (exit $ac_status); } && {
22837 test -z "$ac_c_werror_flag" ||
22838 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022839 } && test -s conftest$ac_exeext &&
22840 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022841 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022842else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022843 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022844sed 's/^/| /' conftest.$ac_ext >&5
22845
Martin v. Löwiseba40652007-08-30 20:10:57 +000022846 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022847fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022848
22849rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022850 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022851fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022852{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
22853echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
22854if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022855
Martin v. Löwis11437992002-04-12 09:54:03 +000022856 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022857#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022858_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022859
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022860 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
22861echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022862 OLD_CFLAGS=$CFLAGS
22863 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022864 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022865/* confdefs.h. */
22866_ACEOF
22867cat confdefs.h >>conftest.$ac_ext
22868cat >>conftest.$ac_ext <<_ACEOF
22869/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022870
22871# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022872
Martin v. Löwis11437992002-04-12 09:54:03 +000022873int
22874main ()
22875{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022876
22877 char *name;
22878 struct hostent *he, *res;
22879 char buffer[2048];
22880 int buflen = 2048;
22881 int h_errnop;
22882
22883 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022884
22885 ;
22886 return 0;
22887}
22888_ACEOF
22889rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022890if { (ac_try="$ac_compile"
22891case "(($ac_try" in
22892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22893 *) ac_try_echo=$ac_try;;
22894esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022896 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022897 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022898 grep -v '^ *+' conftest.er1 >conftest.err
22899 rm -f conftest.er1
22900 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022902 (exit $ac_status); } && {
22903 test -z "$ac_c_werror_flag" ||
22904 test ! -s conftest.err
22905 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022906
22907 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022908#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022909_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022910
Martin v. Löwis11437992002-04-12 09:54:03 +000022911
22912cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022913#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022914_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022915
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022916 { echo "$as_me:$LINENO: result: yes" >&5
22917echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022918
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022919else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022920 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022921sed 's/^/| /' conftest.$ac_ext >&5
22922
Martin v. Löwis11437992002-04-12 09:54:03 +000022923
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022924 { echo "$as_me:$LINENO: result: no" >&5
22925echo "${ECHO_T}no" >&6; }
22926 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22927echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022928 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022929/* confdefs.h. */
22930_ACEOF
22931cat confdefs.h >>conftest.$ac_ext
22932cat >>conftest.$ac_ext <<_ACEOF
22933/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022934
22935# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022936
Martin v. Löwis11437992002-04-12 09:54:03 +000022937int
22938main ()
22939{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022940
22941 char *name;
22942 struct hostent *he;
22943 char buffer[2048];
22944 int buflen = 2048;
22945 int h_errnop;
22946
22947 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022948
22949 ;
22950 return 0;
22951}
22952_ACEOF
22953rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022954if { (ac_try="$ac_compile"
22955case "(($ac_try" in
22956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22957 *) ac_try_echo=$ac_try;;
22958esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022960 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022961 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022962 grep -v '^ *+' conftest.er1 >conftest.err
22963 rm -f conftest.er1
22964 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022966 (exit $ac_status); } && {
22967 test -z "$ac_c_werror_flag" ||
22968 test ! -s conftest.err
22969 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022970
22971 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022972#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022973_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022974
Martin v. Löwis11437992002-04-12 09:54:03 +000022975
22976cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022977#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022978_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022979
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022980 { echo "$as_me:$LINENO: result: yes" >&5
22981echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022982
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022983else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022984 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022985sed 's/^/| /' conftest.$ac_ext >&5
22986
Martin v. Löwis11437992002-04-12 09:54:03 +000022987
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022988 { echo "$as_me:$LINENO: result: no" >&5
22989echo "${ECHO_T}no" >&6; }
22990 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22991echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022992 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022993/* confdefs.h. */
22994_ACEOF
22995cat confdefs.h >>conftest.$ac_ext
22996cat >>conftest.$ac_ext <<_ACEOF
22997/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022998
22999# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023000
Martin v. Löwis11437992002-04-12 09:54:03 +000023001int
23002main ()
23003{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023004
23005 char *name;
23006 struct hostent *he;
23007 struct hostent_data data;
23008
23009 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000023010
23011 ;
23012 return 0;
23013}
23014_ACEOF
23015rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023016if { (ac_try="$ac_compile"
23017case "(($ac_try" in
23018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23019 *) ac_try_echo=$ac_try;;
23020esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023022 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023023 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023024 grep -v '^ *+' conftest.er1 >conftest.err
23025 rm -f conftest.er1
23026 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023028 (exit $ac_status); } && {
23029 test -z "$ac_c_werror_flag" ||
23030 test ! -s conftest.err
23031 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023032
23033 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023034#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023035_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023036
Martin v. Löwis11437992002-04-12 09:54:03 +000023037
23038cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023039#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023040_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023041
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023042 { echo "$as_me:$LINENO: result: yes" >&5
23043echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023044
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023045else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023046 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023047sed 's/^/| /' conftest.$ac_ext >&5
23048
Martin v. Löwis11437992002-04-12 09:54:03 +000023049
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023050 { echo "$as_me:$LINENO: result: no" >&5
23051echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023052
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023053fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023054
23055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023056
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023057fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023058
23059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023060
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023061fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023062
23063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023064 CFLAGS=$OLD_CFLAGS
23065
23066else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023067
Martin v. Löwis11437992002-04-12 09:54:03 +000023068
23069for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000023070do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023071as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23072{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23073echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023074if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023075 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023076else
Martin v. Löwis11437992002-04-12 09:54:03 +000023077 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023078/* confdefs.h. */
23079_ACEOF
23080cat confdefs.h >>conftest.$ac_ext
23081cat >>conftest.$ac_ext <<_ACEOF
23082/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023083/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23084 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23085#define $ac_func innocuous_$ac_func
23086
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023087/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023088 which can conflict with char $ac_func (); below.
23089 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023090 <limits.h> exists even on freestanding compilers. */
23091
23092#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023093# include <limits.h>
23094#else
23095# include <assert.h>
23096#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023097
23098#undef $ac_func
23099
Martin v. Löwiseba40652007-08-30 20:10:57 +000023100/* Override any GCC internal prototype to avoid an error.
23101 Use char because int might match the return type of a GCC
23102 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023103#ifdef __cplusplus
23104extern "C"
23105#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023106char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023107/* The GNU C library defines this for functions which it implements
23108 to always fail with ENOSYS. Some functions are actually named
23109 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023110#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023111choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023112#endif
23113
Skip Montanaro6dead952003-09-25 14:50:04 +000023114int
23115main ()
23116{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023117return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023118 ;
23119 return 0;
23120}
23121_ACEOF
23122rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023123if { (ac_try="$ac_link"
23124case "(($ac_try" in
23125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23126 *) ac_try_echo=$ac_try;;
23127esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023129 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023130 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023131 grep -v '^ *+' conftest.er1 >conftest.err
23132 rm -f conftest.er1
23133 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023135 (exit $ac_status); } && {
23136 test -z "$ac_c_werror_flag" ||
23137 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023138 } && test -s conftest$ac_exeext &&
23139 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023140 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000023141else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023142 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023143sed 's/^/| /' conftest.$ac_ext >&5
23144
Martin v. Löwiseba40652007-08-30 20:10:57 +000023145 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000023146fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023147
23148rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023149 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000023150fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023151ac_res=`eval echo '${'$as_ac_var'}'`
23152 { echo "$as_me:$LINENO: result: $ac_res" >&5
23153echo "${ECHO_T}$ac_res" >&6; }
23154if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023155 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023156#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023157_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023158
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023159fi
Thomas Wouters3a584202000-08-05 23:28:51 +000023160done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023161
Michael W. Hudson54241132001-12-07 15:38:26 +000023162
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023163fi
23164
Michael W. Hudson54241132001-12-07 15:38:26 +000023165
23166
23167
23168
23169
23170
Guido van Rossum627b2d71993-12-24 10:39:16 +000023171# checks for system services
23172# (none yet)
23173
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023174# Linux requires this for correct f.p. operations
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023175{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
23176echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023177if test "${ac_cv_func___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023178 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023179else
Martin v. Löwis11437992002-04-12 09:54:03 +000023180 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023181/* confdefs.h. */
23182_ACEOF
23183cat confdefs.h >>conftest.$ac_ext
23184cat >>conftest.$ac_ext <<_ACEOF
23185/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023186/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
23187 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23188#define __fpu_control innocuous___fpu_control
23189
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023190/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023191 which can conflict with char __fpu_control (); below.
23192 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023193 <limits.h> exists even on freestanding compilers. */
23194
23195#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023196# include <limits.h>
23197#else
23198# include <assert.h>
23199#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023200
23201#undef __fpu_control
23202
Martin v. Löwiseba40652007-08-30 20:10:57 +000023203/* Override any GCC internal prototype to avoid an error.
23204 Use char because int might match the return type of a GCC
23205 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023206#ifdef __cplusplus
23207extern "C"
23208#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023209char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023210/* The GNU C library defines this for functions which it implements
23211 to always fail with ENOSYS. Some functions are actually named
23212 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023213#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023214choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023215#endif
23216
Skip Montanaro6dead952003-09-25 14:50:04 +000023217int
23218main ()
23219{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023220return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023221 ;
23222 return 0;
23223}
23224_ACEOF
23225rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023226if { (ac_try="$ac_link"
23227case "(($ac_try" in
23228 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23229 *) ac_try_echo=$ac_try;;
23230esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023231eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023232 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023233 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023234 grep -v '^ *+' conftest.er1 >conftest.err
23235 rm -f conftest.er1
23236 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023238 (exit $ac_status); } && {
23239 test -z "$ac_c_werror_flag" ||
23240 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023241 } && test -s conftest$ac_exeext &&
23242 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023243 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023244else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023245 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023246sed 's/^/| /' conftest.$ac_ext >&5
23247
Martin v. Löwiseba40652007-08-30 20:10:57 +000023248 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023249fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023250
23251rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023252 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023253fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023254{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
23255echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
23256if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023257 :
23258else
Martin v. Löwis11437992002-04-12 09:54:03 +000023259
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023260{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
23261echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023262if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023263 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023264else
Martin v. Löwis11437992002-04-12 09:54:03 +000023265 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023266LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023267cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023268/* confdefs.h. */
23269_ACEOF
23270cat confdefs.h >>conftest.$ac_ext
23271cat >>conftest.$ac_ext <<_ACEOF
23272/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023273
Martin v. Löwiseba40652007-08-30 20:10:57 +000023274/* Override any GCC internal prototype to avoid an error.
23275 Use char because int might match the return type of a GCC
23276 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023277#ifdef __cplusplus
23278extern "C"
23279#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023280char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023281int
23282main ()
23283{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023284return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023285 ;
23286 return 0;
23287}
23288_ACEOF
23289rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023290if { (ac_try="$ac_link"
23291case "(($ac_try" in
23292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23293 *) ac_try_echo=$ac_try;;
23294esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023296 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023297 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023298 grep -v '^ *+' conftest.er1 >conftest.err
23299 rm -f conftest.er1
23300 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023302 (exit $ac_status); } && {
23303 test -z "$ac_c_werror_flag" ||
23304 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023305 } && test -s conftest$ac_exeext &&
23306 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023307 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023308else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023309 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023310sed 's/^/| /' conftest.$ac_ext >&5
23311
Martin v. Löwiseba40652007-08-30 20:10:57 +000023312 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023313fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023314
23315rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023316 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023317LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023318fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023319{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23320echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
23321if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023322 cat >>confdefs.h <<_ACEOF
23323#define HAVE_LIBIEEE 1
23324_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023325
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023326 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023327
Guido van Rossum627b2d71993-12-24 10:39:16 +000023328fi
23329
Michael W. Hudson54241132001-12-07 15:38:26 +000023330
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023331fi
23332
Michael W. Hudson54241132001-12-07 15:38:26 +000023333
Guido van Rossum7f253911997-05-09 02:42:48 +000023334# Check for --with-fpectl
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023335{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23336echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023337
Martin v. Löwiseba40652007-08-30 20:10:57 +000023338# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023339if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023340 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023341if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023342then
23343
23344cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023345#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023346_ACEOF
23347
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023348 { echo "$as_me:$LINENO: result: yes" >&5
23349echo "${ECHO_T}yes" >&6; }
23350else { echo "$as_me:$LINENO: result: no" >&5
23351echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023352fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023353else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023354 { echo "$as_me:$LINENO: result: no" >&5
23355echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023356fi
23357
Guido van Rossum7f253911997-05-09 02:42:48 +000023358
Guido van Rossum7f43da71994-08-01 12:15:30 +000023359# check for --with-libm=...
23360
Guido van Rossum563e7081996-09-10 18:20:48 +000023361case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023362Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000023363BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023364*) LIBM=-lm
23365esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023366{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23367echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023368
Martin v. Löwiseba40652007-08-30 20:10:57 +000023369# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023370if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023371 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023372if test "$withval" = no
23373then LIBM=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023374 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
23375echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023376elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023377then LIBM=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023378 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23379echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
23380else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23381echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023382 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023383fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023384else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023385 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23386echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023387fi
23388
Guido van Rossum7f43da71994-08-01 12:15:30 +000023389
23390# check for --with-libc=...
23391
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023392{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23393echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023394
Martin v. Löwiseba40652007-08-30 20:10:57 +000023395# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023396if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023397 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023398if test "$withval" = no
23399then LIBC=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023400 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
23401echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023402elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023403then LIBC=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023404 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23405echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23406else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23407echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023408 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023409fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023410else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023411 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23412echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023413fi
23414
Guido van Rossum7f43da71994-08-01 12:15:30 +000023415
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023416# **************************************************
23417# * Check for various properties of floating point *
23418# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000023419
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023420{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
23421echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
23422if test "${ac_cv_little_endian_double+set}" = set; then
23423 echo $ECHO_N "(cached) $ECHO_C" >&6
23424else
23425
23426if test "$cross_compiling" = yes; then
23427 ac_cv_little_endian_double=no
23428else
23429 cat >conftest.$ac_ext <<_ACEOF
23430/* confdefs.h. */
23431_ACEOF
23432cat confdefs.h >>conftest.$ac_ext
23433cat >>conftest.$ac_ext <<_ACEOF
23434/* end confdefs.h. */
23435
23436#include <string.h>
23437int main() {
23438 double x = 9006104071832581.0;
23439 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
23440 return 0;
23441 else
23442 return 1;
23443}
23444
23445_ACEOF
23446rm -f conftest$ac_exeext
23447if { (ac_try="$ac_link"
23448case "(($ac_try" in
23449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23450 *) ac_try_echo=$ac_try;;
23451esac
23452eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23453 (eval "$ac_link") 2>&5
23454 ac_status=$?
23455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23456 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23457 { (case "(($ac_try" in
23458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23459 *) ac_try_echo=$ac_try;;
23460esac
23461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23462 (eval "$ac_try") 2>&5
23463 ac_status=$?
23464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23465 (exit $ac_status); }; }; then
23466 ac_cv_little_endian_double=yes
23467else
23468 echo "$as_me: program exited with status $ac_status" >&5
23469echo "$as_me: failed program was:" >&5
23470sed 's/^/| /' conftest.$ac_ext >&5
23471
23472( exit $ac_status )
23473ac_cv_little_endian_double=no
23474fi
23475rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23476fi
23477
23478
23479fi
23480
23481{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
23482echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
23483if test "$ac_cv_little_endian_double" = yes
23484then
23485
23486cat >>confdefs.h <<\_ACEOF
23487#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
23488_ACEOF
23489
23490fi
23491
23492{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
23493echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
23494if test "${ac_cv_big_endian_double+set}" = set; then
23495 echo $ECHO_N "(cached) $ECHO_C" >&6
23496else
23497
23498if test "$cross_compiling" = yes; then
23499 ac_cv_big_endian_double=no
23500else
23501 cat >conftest.$ac_ext <<_ACEOF
23502/* confdefs.h. */
23503_ACEOF
23504cat confdefs.h >>conftest.$ac_ext
23505cat >>conftest.$ac_ext <<_ACEOF
23506/* end confdefs.h. */
23507
23508#include <string.h>
23509int main() {
23510 double x = 9006104071832581.0;
23511 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
23512 return 0;
23513 else
23514 return 1;
23515}
23516
23517_ACEOF
23518rm -f conftest$ac_exeext
23519if { (ac_try="$ac_link"
23520case "(($ac_try" in
23521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23522 *) ac_try_echo=$ac_try;;
23523esac
23524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23525 (eval "$ac_link") 2>&5
23526 ac_status=$?
23527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23528 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23529 { (case "(($ac_try" in
23530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23531 *) ac_try_echo=$ac_try;;
23532esac
23533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23534 (eval "$ac_try") 2>&5
23535 ac_status=$?
23536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23537 (exit $ac_status); }; }; then
23538 ac_cv_big_endian_double=yes
23539else
23540 echo "$as_me: program exited with status $ac_status" >&5
23541echo "$as_me: failed program was:" >&5
23542sed 's/^/| /' conftest.$ac_ext >&5
23543
23544( exit $ac_status )
23545ac_cv_big_endian_double=no
23546fi
23547rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23548fi
23549
23550
23551fi
23552
23553{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23554echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
23555if test "$ac_cv_big_endian_double" = yes
23556then
23557
23558cat >>confdefs.h <<\_ACEOF
23559#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23560_ACEOF
23561
23562fi
23563
23564# Some ARM platforms use a mixed-endian representation for doubles.
23565# While Python doesn't currently have full support for these platforms
23566# (see e.g., issue 1762561), we can at least make sure that float <-> string
23567# conversions work.
23568{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23569echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
23570if test "${ac_cv_mixed_endian_double+set}" = set; then
23571 echo $ECHO_N "(cached) $ECHO_C" >&6
23572else
23573
23574if test "$cross_compiling" = yes; then
23575 ac_cv_mixed_endian_double=no
23576else
23577 cat >conftest.$ac_ext <<_ACEOF
23578/* confdefs.h. */
23579_ACEOF
23580cat confdefs.h >>conftest.$ac_ext
23581cat >>conftest.$ac_ext <<_ACEOF
23582/* end confdefs.h. */
23583
23584#include <string.h>
23585int main() {
23586 double x = 9006104071832581.0;
23587 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23588 return 0;
23589 else
23590 return 1;
23591}
23592
23593_ACEOF
23594rm -f conftest$ac_exeext
23595if { (ac_try="$ac_link"
23596case "(($ac_try" in
23597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23598 *) ac_try_echo=$ac_try;;
23599esac
23600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23601 (eval "$ac_link") 2>&5
23602 ac_status=$?
23603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23604 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23605 { (case "(($ac_try" in
23606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23607 *) ac_try_echo=$ac_try;;
23608esac
23609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23610 (eval "$ac_try") 2>&5
23611 ac_status=$?
23612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23613 (exit $ac_status); }; }; then
23614 ac_cv_mixed_endian_double=yes
23615else
23616 echo "$as_me: program exited with status $ac_status" >&5
23617echo "$as_me: failed program was:" >&5
23618sed 's/^/| /' conftest.$ac_ext >&5
23619
23620( exit $ac_status )
23621ac_cv_mixed_endian_double=no
23622fi
23623rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23624fi
23625
23626
23627fi
23628
23629{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
23630echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
23631if test "$ac_cv_mixed_endian_double" = yes
23632then
23633
23634cat >>confdefs.h <<\_ACEOF
23635#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
23636_ACEOF
23637
23638fi
23639
23640# The short float repr introduced in Python 3.1 requires the
23641# correctly-rounded string <-> double conversion functions from
23642# Python/dtoa.c, which in turn require that the FPU uses 53-bit
23643# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000023644# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023645# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000023646
23647# This inline assembler syntax may also work for suncc and icc,
23648# so we try it on all platforms.
23649
23650{ 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 +000023651echo $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 +000023652cat >conftest.$ac_ext <<_ACEOF
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023653/* confdefs.h. */
23654_ACEOF
23655cat confdefs.h >>conftest.$ac_ext
23656cat >>conftest.$ac_ext <<_ACEOF
23657/* end confdefs.h. */
23658
23659int
23660main ()
23661{
23662
Mark Dickinsona548dee2009-11-15 13:12:43 +000023663 unsigned short cw;
23664 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
23665 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023666
23667 ;
23668 return 0;
23669}
23670_ACEOF
23671rm -f conftest.$ac_objext
23672if { (ac_try="$ac_compile"
23673case "(($ac_try" in
23674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23675 *) ac_try_echo=$ac_try;;
23676esac
23677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23678 (eval "$ac_compile") 2>conftest.er1
23679 ac_status=$?
23680 grep -v '^ *+' conftest.er1 >conftest.err
23681 rm -f conftest.er1
23682 cat conftest.err >&5
23683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23684 (exit $ac_status); } && {
23685 test -z "$ac_c_werror_flag" ||
23686 test ! -s conftest.err
23687 } && test -s conftest.$ac_objext; then
23688 have_gcc_asm_for_x87=yes
23689else
23690 echo "$as_me: failed program was:" >&5
23691sed 's/^/| /' conftest.$ac_ext >&5
23692
23693 have_gcc_asm_for_x87=no
23694fi
23695
23696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsona548dee2009-11-15 13:12:43 +000023697{ echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023698echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000023699if test "$have_gcc_asm_for_x87" = yes
23700then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023701
23702cat >>confdefs.h <<\_ACEOF
23703#define HAVE_GCC_ASM_FOR_X87 1
23704_ACEOF
23705
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023706fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000023707
Mark Dickinson04b27232009-01-04 12:29:36 +000023708# Detect whether system arithmetic is subject to x87-style double
23709# rounding issues. The result of this test has little meaning on non
23710# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23711# mode is round-to-nearest and double rounding issues are present, and
23712# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023713{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23714echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000023715# $BASECFLAGS may affect the result
23716ac_save_cc="$CC"
23717CC="$CC $BASECFLAGS"
Mark Dickinson04b27232009-01-04 12:29:36 +000023718if test "$cross_compiling" = yes; then
23719 ac_cv_x87_double_rounding=no
23720else
23721 cat >conftest.$ac_ext <<_ACEOF
23722/* confdefs.h. */
23723_ACEOF
23724cat confdefs.h >>conftest.$ac_ext
23725cat >>conftest.$ac_ext <<_ACEOF
23726/* end confdefs.h. */
23727
23728#include <stdlib.h>
23729#include <math.h>
23730int main() {
23731 volatile double x, y, z;
23732 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23733 x = 0.99999999999999989; /* 1-2**-53 */
23734 y = 1./x;
23735 if (y != 1.)
23736 exit(0);
23737 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23738 x = 1e16;
23739 y = 2.99999;
23740 z = x + y;
23741 if (z != 1e16+4.)
23742 exit(0);
23743 /* both tests show evidence of double rounding */
23744 exit(1);
23745}
23746
23747_ACEOF
23748rm -f conftest$ac_exeext
23749if { (ac_try="$ac_link"
23750case "(($ac_try" in
23751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23752 *) ac_try_echo=$ac_try;;
23753esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023754eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023755 (eval "$ac_link") 2>&5
23756 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023758 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23759 { (case "(($ac_try" in
23760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23761 *) ac_try_echo=$ac_try;;
23762esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023764 (eval "$ac_try") 2>&5
23765 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023767 (exit $ac_status); }; }; then
23768 ac_cv_x87_double_rounding=no
23769else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023770 echo "$as_me: program exited with status $ac_status" >&5
23771echo "$as_me: failed program was:" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023772sed 's/^/| /' conftest.$ac_ext >&5
23773
23774( exit $ac_status )
23775ac_cv_x87_double_rounding=yes
23776fi
23777rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23778fi
23779
23780
Mark Dickinson99abd142009-10-24 13:44:16 +000023781CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023782{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23783echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000023784if test "$ac_cv_x87_double_rounding" = yes
23785then
23786
23787cat >>confdefs.h <<\_ACEOF
23788#define X87_DOUBLE_ROUNDING 1
23789_ACEOF
23790
23791fi
23792
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023793# ************************************
23794# * Check for mathematical functions *
23795# ************************************
23796
23797LIBS_SAVE=$LIBS
23798LIBS="$LIBS $LIBM"
23799
Mark Dickinsonc4920e82009-11-20 19:30:22 +000023800# For multiprocessing module, check that sem_open
23801# actually works. For FreeBSD versions <= 7.2,
23802# the kernel module that provides POSIX semaphores
23803# isn't loaded by default, so an attempt to call
23804# sem_open results in a 'Signal 12' error.
23805{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
23806echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
23807if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
23808 echo $ECHO_N "(cached) $ECHO_C" >&6
23809else
23810 if test "$cross_compiling" = yes; then
23811 ac_cv_posix_semaphores_enabled=yes
23812else
23813 cat >conftest.$ac_ext <<_ACEOF
23814/* confdefs.h. */
23815_ACEOF
23816cat confdefs.h >>conftest.$ac_ext
23817cat >>conftest.$ac_ext <<_ACEOF
23818/* end confdefs.h. */
23819
23820#include <unistd.h>
23821#include <fcntl.h>
23822#include <stdio.h>
23823#include <semaphore.h>
23824#include <sys/stat.h>
23825
23826int main(void) {
23827 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
23828 if (a == SEM_FAILED) {
23829 perror("sem_open");
23830 return 1;
23831 }
23832 sem_close(a);
23833 return 0;
23834}
23835
23836_ACEOF
23837rm -f conftest$ac_exeext
23838if { (ac_try="$ac_link"
23839case "(($ac_try" in
23840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23841 *) ac_try_echo=$ac_try;;
23842esac
23843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23844 (eval "$ac_link") 2>&5
23845 ac_status=$?
23846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23847 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23848 { (case "(($ac_try" in
23849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23850 *) ac_try_echo=$ac_try;;
23851esac
23852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23853 (eval "$ac_try") 2>&5
23854 ac_status=$?
23855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23856 (exit $ac_status); }; }; then
23857 ac_cv_posix_semaphores_enabled=yes
23858else
23859 echo "$as_me: program exited with status $ac_status" >&5
23860echo "$as_me: failed program was:" >&5
23861sed 's/^/| /' conftest.$ac_ext >&5
23862
23863( exit $ac_status )
23864ac_cv_posix_semaphores_enabled=no
23865fi
23866rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23867fi
23868
23869
23870
23871fi
23872
23873{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
23874echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
23875if test $ac_cv_posix_semaphores_enabled = no
23876then
23877
23878cat >>confdefs.h <<\_ACEOF
Mark Dickinson5afa6d42009-11-28 10:44:20 +000023879#define POSIX_SEMAPHORES_NOT_ENABLED 1
Mark Dickinsonc4920e82009-11-20 19:30:22 +000023880_ACEOF
23881
23882fi
23883
23884
Jesse Noller355b1262009-04-02 00:03:28 +000023885# Multiprocessing check for broken sem_getvalue
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023886{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
23887echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000023888if test "${ac_cv_broken_sem_getvalue+set}" = set; then
23889 echo $ECHO_N "(cached) $ECHO_C" >&6
23890else
23891 if test "$cross_compiling" = yes; then
23892 ac_cv_broken_sem_getvalue=yes
Jesse Noller355b1262009-04-02 00:03:28 +000023893else
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 <unistd.h>
23902#include <fcntl.h>
23903#include <stdio.h>
23904#include <semaphore.h>
23905#include <sys/stat.h>
23906
23907int main(void){
23908 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
23909 int count;
23910 int res;
23911 if(a==SEM_FAILED){
23912 perror("sem_open");
23913 return 1;
23914
23915 }
23916 res = sem_getvalue(a, &count);
23917 sem_close(a);
23918 return res==-1 ? 1 : 0;
23919}
23920
Jesse Noller355b1262009-04-02 00:03:28 +000023921_ACEOF
23922rm -f conftest$ac_exeext
23923if { (ac_try="$ac_link"
23924case "(($ac_try" in
23925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23926 *) ac_try_echo=$ac_try;;
23927esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023928eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023929 (eval "$ac_link") 2>&5
23930 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023932 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23933 { (case "(($ac_try" in
23934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23935 *) ac_try_echo=$ac_try;;
23936esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023938 (eval "$ac_try") 2>&5
23939 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023941 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000023942 ac_cv_broken_sem_getvalue=no
Jesse Noller355b1262009-04-02 00:03:28 +000023943else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023944 echo "$as_me: program exited with status $ac_status" >&5
23945echo "$as_me: failed program was:" >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023946sed 's/^/| /' conftest.$ac_ext >&5
23947
23948( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000023949ac_cv_broken_sem_getvalue=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000023950fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023951rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23952fi
23953
23954
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000023955
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000023956fi
23957
23958{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
23959echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
23960if test $ac_cv_broken_sem_getvalue = yes
23961then
23962
23963cat >>confdefs.h <<\_ACEOF
23964#define HAVE_BROKEN_SEM_GETVALUE 1
23965_ACEOF
23966
23967fi
23968
Mark Dickinson265d7382008-04-21 22:32:24 +000023969# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23970# -0. on some architectures.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023971{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23972echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000023973if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023974 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000023975else
23976
23977if test "$cross_compiling" = yes; then
23978 ac_cv_tanh_preserves_zero_sign=no
23979else
23980 cat >conftest.$ac_ext <<_ACEOF
23981/* confdefs.h. */
23982_ACEOF
23983cat confdefs.h >>conftest.$ac_ext
23984cat >>conftest.$ac_ext <<_ACEOF
23985/* end confdefs.h. */
23986
23987#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000023988#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000023989int main() {
23990 /* return 0 if either negative zeros don't exist
23991 on this platform or if negative zeros exist
23992 and tanh(-0.) == -0. */
23993 if (atan2(0., -1.) == atan2(-0., -1.) ||
23994 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23995 else exit(1);
23996}
23997
23998_ACEOF
23999rm -f conftest$ac_exeext
24000if { (ac_try="$ac_link"
24001case "(($ac_try" in
24002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24003 *) ac_try_echo=$ac_try;;
24004esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024006 (eval "$ac_link") 2>&5
24007 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024009 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24010 { (case "(($ac_try" in
24011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24012 *) ac_try_echo=$ac_try;;
24013esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024015 (eval "$ac_try") 2>&5
24016 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024018 (exit $ac_status); }; }; then
24019 ac_cv_tanh_preserves_zero_sign=yes
24020else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024021 echo "$as_me: program exited with status $ac_status" >&5
24022echo "$as_me: failed program was:" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024023sed 's/^/| /' conftest.$ac_ext >&5
24024
24025( exit $ac_status )
24026ac_cv_tanh_preserves_zero_sign=no
24027fi
24028rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24029fi
24030
24031
24032fi
24033
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024034{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
24035echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000024036if test "$ac_cv_tanh_preserves_zero_sign" = yes
24037then
24038
24039cat >>confdefs.h <<\_ACEOF
24040#define TANH_PRESERVES_ZERO_SIGN 1
24041_ACEOF
24042
24043fi
24044
Martin v. Löwis11437992002-04-12 09:54:03 +000024045
Guido van Rossum2b3ac691996-08-30 15:18:41 +000024046
Michael W. Hudson54241132001-12-07 15:38:26 +000024047
Christian Heimes0a8143f2007-12-18 23:22:54 +000024048
24049
24050
24051
24052
Mark Dickinson8e5446f2009-04-18 14:41:37 +000024053
Mark Dickinson65898e02009-09-05 10:27:00 +000024054for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
24055do
24056as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24057{ echo "$as_me:$LINENO: checking for $ac_func" >&5
24058echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
24059if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
24060 echo $ECHO_N "(cached) $ECHO_C" >&6
24061else
24062 cat >conftest.$ac_ext <<_ACEOF
24063/* confdefs.h. */
24064_ACEOF
24065cat confdefs.h >>conftest.$ac_ext
24066cat >>conftest.$ac_ext <<_ACEOF
24067/* end confdefs.h. */
24068/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24069 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24070#define $ac_func innocuous_$ac_func
24071
24072/* System header to define __stub macros and hopefully few prototypes,
24073 which can conflict with char $ac_func (); below.
24074 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24075 <limits.h> exists even on freestanding compilers. */
24076
24077#ifdef __STDC__
24078# include <limits.h>
24079#else
24080# include <assert.h>
24081#endif
24082
24083#undef $ac_func
24084
24085/* Override any GCC internal prototype to avoid an error.
24086 Use char because int might match the return type of a GCC
24087 builtin and then its argument prototype would still apply. */
24088#ifdef __cplusplus
24089extern "C"
24090#endif
24091char $ac_func ();
24092/* The GNU C library defines this for functions which it implements
24093 to always fail with ENOSYS. Some functions are actually named
24094 something starting with __ and the normal name is an alias. */
24095#if defined __stub_$ac_func || defined __stub___$ac_func
24096choke me
24097#endif
24098
24099int
24100main ()
24101{
24102return $ac_func ();
24103 ;
24104 return 0;
24105}
24106_ACEOF
24107rm -f conftest.$ac_objext conftest$ac_exeext
24108if { (ac_try="$ac_link"
24109case "(($ac_try" in
24110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24111 *) ac_try_echo=$ac_try;;
24112esac
24113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24114 (eval "$ac_link") 2>conftest.er1
24115 ac_status=$?
24116 grep -v '^ *+' conftest.er1 >conftest.err
24117 rm -f conftest.er1
24118 cat conftest.err >&5
24119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24120 (exit $ac_status); } && {
24121 test -z "$ac_c_werror_flag" ||
24122 test ! -s conftest.err
24123 } && test -s conftest$ac_exeext &&
24124 $as_test_x conftest$ac_exeext; then
24125 eval "$as_ac_var=yes"
24126else
24127 echo "$as_me: failed program was:" >&5
24128sed 's/^/| /' conftest.$ac_ext >&5
24129
24130 eval "$as_ac_var=no"
24131fi
24132
24133rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24134 conftest$ac_exeext conftest.$ac_ext
24135fi
24136ac_res=`eval echo '${'$as_ac_var'}'`
24137 { echo "$as_me:$LINENO: result: $ac_res" >&5
24138echo "${ECHO_T}$ac_res" >&6; }
24139if test `eval echo '${'$as_ac_var'}'` = yes; then
24140 cat >>confdefs.h <<_ACEOF
24141#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24142_ACEOF
24143
24144fi
24145done
24146
24147
24148
24149
24150
24151
24152for ac_func in hypot lgamma log1p round tgamma
Christian Heimes0a8143f2007-12-18 23:22:54 +000024153do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024154as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24155{ echo "$as_me:$LINENO: checking for $ac_func" >&5
24156echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes0a8143f2007-12-18 23:22:54 +000024157if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024158 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes0a8143f2007-12-18 23:22:54 +000024159else
24160 cat >conftest.$ac_ext <<_ACEOF
24161/* confdefs.h. */
24162_ACEOF
24163cat confdefs.h >>conftest.$ac_ext
24164cat >>conftest.$ac_ext <<_ACEOF
24165/* end confdefs.h. */
24166/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24167 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24168#define $ac_func innocuous_$ac_func
24169
24170/* System header to define __stub macros and hopefully few prototypes,
24171 which can conflict with char $ac_func (); below.
24172 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24173 <limits.h> exists even on freestanding compilers. */
24174
24175#ifdef __STDC__
24176# include <limits.h>
24177#else
24178# include <assert.h>
24179#endif
24180
24181#undef $ac_func
24182
24183/* Override any GCC internal prototype to avoid an error.
24184 Use char because int might match the return type of a GCC
24185 builtin and then its argument prototype would still apply. */
24186#ifdef __cplusplus
24187extern "C"
24188#endif
24189char $ac_func ();
24190/* The GNU C library defines this for functions which it implements
24191 to always fail with ENOSYS. Some functions are actually named
24192 something starting with __ and the normal name is an alias. */
24193#if defined __stub_$ac_func || defined __stub___$ac_func
24194choke me
24195#endif
24196
24197int
24198main ()
24199{
24200return $ac_func ();
24201 ;
24202 return 0;
24203}
24204_ACEOF
24205rm -f conftest.$ac_objext conftest$ac_exeext
24206if { (ac_try="$ac_link"
24207case "(($ac_try" in
24208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24209 *) ac_try_echo=$ac_try;;
24210esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024212 (eval "$ac_link") 2>conftest.er1
24213 ac_status=$?
24214 grep -v '^ *+' conftest.er1 >conftest.err
24215 rm -f conftest.er1
24216 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024218 (exit $ac_status); } && {
24219 test -z "$ac_c_werror_flag" ||
24220 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024221 } && test -s conftest$ac_exeext &&
24222 $as_test_x conftest$ac_exeext; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000024223 eval "$as_ac_var=yes"
24224else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024225 echo "$as_me: failed program was:" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024226sed 's/^/| /' conftest.$ac_ext >&5
24227
24228 eval "$as_ac_var=no"
24229fi
24230
24231rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24232 conftest$ac_exeext conftest.$ac_ext
24233fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024234ac_res=`eval echo '${'$as_ac_var'}'`
24235 { echo "$as_me:$LINENO: result: $ac_res" >&5
24236echo "${ECHO_T}$ac_res" >&6; }
24237if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000024238 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024239#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000024240_ACEOF
24241
24242fi
24243done
24244
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024245{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
24246echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024247if test "${ac_cv_have_decl_isinf+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024248 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024249else
24250 cat >conftest.$ac_ext <<_ACEOF
24251/* confdefs.h. */
24252_ACEOF
24253cat confdefs.h >>conftest.$ac_ext
24254cat >>conftest.$ac_ext <<_ACEOF
24255/* end confdefs.h. */
24256#include <math.h>
24257
24258int
24259main ()
24260{
24261#ifndef isinf
24262 (void) isinf;
24263#endif
24264
24265 ;
24266 return 0;
24267}
24268_ACEOF
24269rm -f conftest.$ac_objext
24270if { (ac_try="$ac_compile"
24271case "(($ac_try" in
24272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24273 *) ac_try_echo=$ac_try;;
24274esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024275eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024276 (eval "$ac_compile") 2>conftest.er1
24277 ac_status=$?
24278 grep -v '^ *+' conftest.er1 >conftest.err
24279 rm -f conftest.er1
24280 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024282 (exit $ac_status); } && {
24283 test -z "$ac_c_werror_flag" ||
24284 test ! -s conftest.err
24285 } && test -s conftest.$ac_objext; then
24286 ac_cv_have_decl_isinf=yes
24287else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024288 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024289sed 's/^/| /' conftest.$ac_ext >&5
24290
24291 ac_cv_have_decl_isinf=no
24292fi
24293
24294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24295fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024296{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
24297echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
24298if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024299
24300cat >>confdefs.h <<_ACEOF
24301#define HAVE_DECL_ISINF 1
24302_ACEOF
24303
24304
24305else
24306 cat >>confdefs.h <<_ACEOF
24307#define HAVE_DECL_ISINF 0
24308_ACEOF
24309
24310
24311fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024312{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
24313echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024314if test "${ac_cv_have_decl_isnan+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024315 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024316else
24317 cat >conftest.$ac_ext <<_ACEOF
24318/* confdefs.h. */
24319_ACEOF
24320cat confdefs.h >>conftest.$ac_ext
24321cat >>conftest.$ac_ext <<_ACEOF
24322/* end confdefs.h. */
24323#include <math.h>
24324
24325int
24326main ()
24327{
24328#ifndef isnan
24329 (void) isnan;
24330#endif
24331
24332 ;
24333 return 0;
24334}
24335_ACEOF
24336rm -f conftest.$ac_objext
24337if { (ac_try="$ac_compile"
24338case "(($ac_try" in
24339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24340 *) ac_try_echo=$ac_try;;
24341esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024343 (eval "$ac_compile") 2>conftest.er1
24344 ac_status=$?
24345 grep -v '^ *+' conftest.er1 >conftest.err
24346 rm -f conftest.er1
24347 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024349 (exit $ac_status); } && {
24350 test -z "$ac_c_werror_flag" ||
24351 test ! -s conftest.err
24352 } && test -s conftest.$ac_objext; then
24353 ac_cv_have_decl_isnan=yes
24354else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024355 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024356sed 's/^/| /' conftest.$ac_ext >&5
24357
24358 ac_cv_have_decl_isnan=no
24359fi
24360
24361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24362fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024363{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
24364echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
24365if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024366
24367cat >>confdefs.h <<_ACEOF
24368#define HAVE_DECL_ISNAN 1
24369_ACEOF
24370
24371
24372else
24373 cat >>confdefs.h <<_ACEOF
24374#define HAVE_DECL_ISNAN 0
24375_ACEOF
24376
24377
24378fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024379{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
24380echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024381if test "${ac_cv_have_decl_isfinite+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024382 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024383else
24384 cat >conftest.$ac_ext <<_ACEOF
24385/* confdefs.h. */
24386_ACEOF
24387cat confdefs.h >>conftest.$ac_ext
24388cat >>conftest.$ac_ext <<_ACEOF
24389/* end confdefs.h. */
24390#include <math.h>
24391
24392int
24393main ()
24394{
24395#ifndef isfinite
24396 (void) isfinite;
24397#endif
24398
24399 ;
24400 return 0;
24401}
24402_ACEOF
24403rm -f conftest.$ac_objext
24404if { (ac_try="$ac_compile"
24405case "(($ac_try" in
24406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24407 *) ac_try_echo=$ac_try;;
24408esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024410 (eval "$ac_compile") 2>conftest.er1
24411 ac_status=$?
24412 grep -v '^ *+' conftest.er1 >conftest.err
24413 rm -f conftest.er1
24414 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024416 (exit $ac_status); } && {
24417 test -z "$ac_c_werror_flag" ||
24418 test ! -s conftest.err
24419 } && test -s conftest.$ac_objext; then
24420 ac_cv_have_decl_isfinite=yes
24421else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024422 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024423sed 's/^/| /' conftest.$ac_ext >&5
24424
24425 ac_cv_have_decl_isfinite=no
24426fi
24427
24428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24429fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024430{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
24431echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
24432if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024433
24434cat >>confdefs.h <<_ACEOF
24435#define HAVE_DECL_ISFINITE 1
24436_ACEOF
24437
24438
24439else
24440 cat >>confdefs.h <<_ACEOF
24441#define HAVE_DECL_ISFINITE 0
24442_ACEOF
24443
24444
24445fi
24446
24447
Christian Heimes0a8143f2007-12-18 23:22:54 +000024448
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000024449LIBS=$LIBS_SAVE
24450
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024451# determine what size digit to use for Python's longs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024452{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
24453echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024454# Check whether --enable-big-digits was given.
24455if test "${enable_big_digits+set}" = set; then
24456 enableval=$enable_big_digits; case $enable_big_digits in
24457yes)
24458 enable_big_digits=30 ;;
24459no)
24460 enable_big_digits=15 ;;
2446115|30)
24462 ;;
24463*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024464 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
24465echo "$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 +000024466 { (exit 1); exit 1; }; } ;;
24467esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024468{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
24469echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024470
24471cat >>confdefs.h <<_ACEOF
24472#define PYLONG_BITS_IN_DIGIT $enable_big_digits
24473_ACEOF
24474
24475
24476else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024477 { echo "$as_me:$LINENO: result: no value specified" >&5
24478echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024479fi
24480
24481
Guido van Rossumef2255b2000-03-10 22:30:29 +000024482# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000024483if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024484 { echo "$as_me:$LINENO: checking for wchar.h" >&5
24485echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024486if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024487 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024488fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024489{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24490echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024491else
Martin v. Löwis11437992002-04-12 09:54:03 +000024492 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024493{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
24494echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024495cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024496/* confdefs.h. */
24497_ACEOF
24498cat confdefs.h >>conftest.$ac_ext
24499cat >>conftest.$ac_ext <<_ACEOF
24500/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024501$ac_includes_default
24502#include <wchar.h>
24503_ACEOF
24504rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024505if { (ac_try="$ac_compile"
24506case "(($ac_try" in
24507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24508 *) ac_try_echo=$ac_try;;
24509esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024511 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024512 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024513 grep -v '^ *+' conftest.er1 >conftest.err
24514 rm -f conftest.er1
24515 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024517 (exit $ac_status); } && {
24518 test -z "$ac_c_werror_flag" ||
24519 test ! -s conftest.err
24520 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024521 ac_header_compiler=yes
24522else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024523 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024524sed 's/^/| /' conftest.$ac_ext >&5
24525
Martin v. Löwiseba40652007-08-30 20:10:57 +000024526 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000024527fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024528
24529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024530{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24531echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024532
24533# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024534{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
24535echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024536cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024537/* confdefs.h. */
24538_ACEOF
24539cat confdefs.h >>conftest.$ac_ext
24540cat >>conftest.$ac_ext <<_ACEOF
24541/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024542#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024543_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024544if { (ac_try="$ac_cpp conftest.$ac_ext"
24545case "(($ac_try" in
24546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24547 *) ac_try_echo=$ac_try;;
24548esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024550 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024551 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024552 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024553 rm -f conftest.er1
24554 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024556 (exit $ac_status); } >/dev/null && {
24557 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24558 test ! -s conftest.err
24559 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024560 ac_header_preproc=yes
24561else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024562 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024563sed 's/^/| /' conftest.$ac_ext >&5
24564
Martin v. Löwis11437992002-04-12 09:54:03 +000024565 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024566fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024567
Martin v. Löwis11437992002-04-12 09:54:03 +000024568rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024569{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24570echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024571
24572# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024573case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24574 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024575 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24576echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24577 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24578echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024579 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024580 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024581 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024582 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24583echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24584 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24585echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24586 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24587echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24588 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24589echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24590 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24591echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24592 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24593echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000024594 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000024595## -------------------------------------- ##
24596## Report this to http://bugs.python.org/ ##
24597## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024598_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000024599 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024600 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024601esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024602{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24603echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024604if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024605 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024606else
24607 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024608fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024609{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24610echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024611
24612fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024613if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024614
24615
24616cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024617#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024618_ACEOF
24619
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024620 wchar_h="yes"
24621
Guido van Rossumef2255b2000-03-10 22:30:29 +000024622else
Martin v. Löwis11437992002-04-12 09:54:03 +000024623 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000024624
24625fi
24626
Michael W. Hudson54241132001-12-07 15:38:26 +000024627
Martin v. Löwis11437992002-04-12 09:54:03 +000024628
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024629# determine wchar_t size
24630if test "$wchar_h" = yes
24631then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024632 { echo "$as_me:$LINENO: checking for wchar_t" >&5
24633echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
24634if test "${ac_cv_type_wchar_t+set}" = set; then
24635 echo $ECHO_N "(cached) $ECHO_C" >&6
24636else
24637 cat >conftest.$ac_ext <<_ACEOF
24638/* confdefs.h. */
24639_ACEOF
24640cat confdefs.h >>conftest.$ac_ext
24641cat >>conftest.$ac_ext <<_ACEOF
24642/* end confdefs.h. */
24643#include <wchar.h>
24644
24645typedef wchar_t ac__type_new_;
24646int
24647main ()
24648{
24649if ((ac__type_new_ *) 0)
24650 return 0;
24651if (sizeof (ac__type_new_))
24652 return 0;
24653 ;
24654 return 0;
24655}
24656_ACEOF
24657rm -f conftest.$ac_objext
24658if { (ac_try="$ac_compile"
24659case "(($ac_try" in
24660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24661 *) ac_try_echo=$ac_try;;
24662esac
24663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24664 (eval "$ac_compile") 2>conftest.er1
24665 ac_status=$?
24666 grep -v '^ *+' conftest.er1 >conftest.err
24667 rm -f conftest.er1
24668 cat conftest.err >&5
24669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24670 (exit $ac_status); } && {
24671 test -z "$ac_c_werror_flag" ||
24672 test ! -s conftest.err
24673 } && test -s conftest.$ac_objext; then
24674 ac_cv_type_wchar_t=yes
24675else
24676 echo "$as_me: failed program was:" >&5
24677sed 's/^/| /' conftest.$ac_ext >&5
24678
24679 ac_cv_type_wchar_t=no
24680fi
24681
24682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24683fi
24684{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
24685echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
24686
24687# The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000024688# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24689# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24690# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024691{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
24692echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024693if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024694 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024695else
Martin v. Löwis11437992002-04-12 09:54:03 +000024696 if test "$cross_compiling" = yes; then
24697 # Depending upon the size, compute the lo and hi bounds.
24698cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024699/* confdefs.h. */
24700_ACEOF
24701cat confdefs.h >>conftest.$ac_ext
24702cat >>conftest.$ac_ext <<_ACEOF
24703/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024704#include <wchar.h>
24705
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024706 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024707int
24708main ()
24709{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024710static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024711test_array [0] = 0
24712
24713 ;
24714 return 0;
24715}
24716_ACEOF
24717rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024718if { (ac_try="$ac_compile"
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_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024725 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024726 grep -v '^ *+' conftest.er1 >conftest.err
24727 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); } && {
24731 test -z "$ac_c_werror_flag" ||
24732 test ! -s conftest.err
24733 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024734 ac_lo=0 ac_mid=0
24735 while :; do
24736 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024737/* confdefs.h. */
24738_ACEOF
24739cat confdefs.h >>conftest.$ac_ext
24740cat >>conftest.$ac_ext <<_ACEOF
24741/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024742#include <wchar.h>
24743
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024744 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024745int
24746main ()
24747{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024748static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024749test_array [0] = 0
24750
24751 ;
24752 return 0;
24753}
24754_ACEOF
24755rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024756if { (ac_try="$ac_compile"
24757case "(($ac_try" in
24758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24759 *) ac_try_echo=$ac_try;;
24760esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024762 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024763 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024764 grep -v '^ *+' conftest.er1 >conftest.err
24765 rm -f conftest.er1
24766 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024768 (exit $ac_status); } && {
24769 test -z "$ac_c_werror_flag" ||
24770 test ! -s conftest.err
24771 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024772 ac_hi=$ac_mid; break
24773else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024775sed 's/^/| /' conftest.$ac_ext >&5
24776
Martin v. Löwiseba40652007-08-30 20:10:57 +000024777 ac_lo=`expr $ac_mid + 1`
24778 if test $ac_lo -le $ac_mid; then
24779 ac_lo= ac_hi=
24780 break
24781 fi
24782 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024783fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024784
24785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024786 done
24787else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024789sed 's/^/| /' conftest.$ac_ext >&5
24790
Martin v. Löwiseba40652007-08-30 20:10:57 +000024791 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024792/* confdefs.h. */
24793_ACEOF
24794cat confdefs.h >>conftest.$ac_ext
24795cat >>conftest.$ac_ext <<_ACEOF
24796/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024797#include <wchar.h>
24798
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024799 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024800int
24801main ()
24802{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024803static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024804test_array [0] = 0
24805
24806 ;
24807 return 0;
24808}
24809_ACEOF
24810rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024811if { (ac_try="$ac_compile"
24812case "(($ac_try" in
24813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24814 *) ac_try_echo=$ac_try;;
24815esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024817 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024818 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024819 grep -v '^ *+' conftest.er1 >conftest.err
24820 rm -f conftest.er1
24821 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024823 (exit $ac_status); } && {
24824 test -z "$ac_c_werror_flag" ||
24825 test ! -s conftest.err
24826 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024827 ac_hi=-1 ac_mid=-1
24828 while :; do
24829 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024830/* confdefs.h. */
24831_ACEOF
24832cat confdefs.h >>conftest.$ac_ext
24833cat >>conftest.$ac_ext <<_ACEOF
24834/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024835#include <wchar.h>
24836
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024837 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024838int
24839main ()
24840{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024841static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024842test_array [0] = 0
24843
24844 ;
24845 return 0;
24846}
24847_ACEOF
24848rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024849if { (ac_try="$ac_compile"
24850case "(($ac_try" in
24851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24852 *) ac_try_echo=$ac_try;;
24853esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024854eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024855 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024856 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024857 grep -v '^ *+' conftest.er1 >conftest.err
24858 rm -f conftest.er1
24859 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024861 (exit $ac_status); } && {
24862 test -z "$ac_c_werror_flag" ||
24863 test ! -s conftest.err
24864 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024865 ac_lo=$ac_mid; break
24866else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024867 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024868sed 's/^/| /' conftest.$ac_ext >&5
24869
Martin v. Löwiseba40652007-08-30 20:10:57 +000024870 ac_hi=`expr '(' $ac_mid ')' - 1`
24871 if test $ac_mid -le $ac_hi; then
24872 ac_lo= ac_hi=
24873 break
24874 fi
24875 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000024876fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024877
24878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024879 done
24880else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024881 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024882sed 's/^/| /' conftest.$ac_ext >&5
24883
Martin v. Löwiseba40652007-08-30 20:10:57 +000024884 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000024885fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024886
24887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024888fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024889
24890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024891# Binary search between lo and hi bounds.
24892while test "x$ac_lo" != "x$ac_hi"; do
24893 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24894 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024895/* confdefs.h. */
24896_ACEOF
24897cat confdefs.h >>conftest.$ac_ext
24898cat >>conftest.$ac_ext <<_ACEOF
24899/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024900#include <wchar.h>
24901
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024902 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024903int
24904main ()
24905{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024906static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024907test_array [0] = 0
24908
24909 ;
24910 return 0;
24911}
24912_ACEOF
24913rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024914if { (ac_try="$ac_compile"
24915case "(($ac_try" in
24916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24917 *) ac_try_echo=$ac_try;;
24918esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024920 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024921 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024922 grep -v '^ *+' conftest.er1 >conftest.err
24923 rm -f conftest.er1
24924 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024926 (exit $ac_status); } && {
24927 test -z "$ac_c_werror_flag" ||
24928 test ! -s conftest.err
24929 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024930 ac_hi=$ac_mid
24931else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024932 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024933sed 's/^/| /' conftest.$ac_ext >&5
24934
Martin v. Löwiseba40652007-08-30 20:10:57 +000024935 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024936fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024937
24938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024939done
24940case $ac_lo in
24941?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024942'') if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024943 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024944See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024945echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024946See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024947 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024948 else
24949 ac_cv_sizeof_wchar_t=0
24950 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024951esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024952else
Martin v. Löwis11437992002-04-12 09:54:03 +000024953 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024954/* confdefs.h. */
24955_ACEOF
24956cat confdefs.h >>conftest.$ac_ext
24957cat >>conftest.$ac_ext <<_ACEOF
24958/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024959#include <wchar.h>
24960
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024961 typedef wchar_t ac__type_sizeof_;
24962static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
24963static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024964#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024965#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024966int
24967main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024968{
Martin v. Löwis11437992002-04-12 09:54:03 +000024969
24970 FILE *f = fopen ("conftest.val", "w");
24971 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000024972 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024973 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024974 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000024975 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024976 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000024977 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024978 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024979 }
24980 else
24981 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000024982 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024983 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000024984 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024985 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024986 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024987 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024988
24989 ;
24990 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024991}
Martin v. Löwis11437992002-04-12 09:54:03 +000024992_ACEOF
24993rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024994if { (ac_try="$ac_link"
24995case "(($ac_try" in
24996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24997 *) ac_try_echo=$ac_try;;
24998esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025000 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025001 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025003 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025004 { (case "(($ac_try" in
25005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25006 *) ac_try_echo=$ac_try;;
25007esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025009 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025010 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025012 (exit $ac_status); }; }; then
25013 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000025014else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025015 echo "$as_me: program exited with status $ac_status" >&5
25016echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025017sed 's/^/| /' conftest.$ac_ext >&5
25018
Martin v. Löwis11437992002-04-12 09:54:03 +000025019( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000025020if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025021 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025022See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025023echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025024See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025025 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025026 else
25027 ac_cv_sizeof_wchar_t=0
25028 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025029fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025030rm -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 +000025031fi
25032rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000025033fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025034{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
25035echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025036
25037
25038
Martin v. Löwis11437992002-04-12 09:54:03 +000025039cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025040#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025041_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025042
Michael W. Hudson54241132001-12-07 15:38:26 +000025043
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025044fi
25045
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025046{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
25047echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025048have_ucs4_tcl=no
25049cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025050/* confdefs.h. */
25051_ACEOF
25052cat confdefs.h >>conftest.$ac_ext
25053cat >>conftest.$ac_ext <<_ACEOF
25054/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025055
25056#include <tcl.h>
25057#if TCL_UTF_MAX != 6
25058# error "NOT UCS4_TCL"
25059#endif
25060int
25061main ()
25062{
25063
25064 ;
25065 return 0;
25066}
25067_ACEOF
25068rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025069if { (ac_try="$ac_compile"
25070case "(($ac_try" in
25071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25072 *) ac_try_echo=$ac_try;;
25073esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025075 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025076 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025077 grep -v '^ *+' conftest.er1 >conftest.err
25078 rm -f conftest.er1
25079 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025081 (exit $ac_status); } && {
25082 test -z "$ac_c_werror_flag" ||
25083 test ! -s conftest.err
25084 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025085
25086
25087cat >>confdefs.h <<\_ACEOF
25088#define HAVE_UCS4_TCL 1
25089_ACEOF
25090
25091 have_ucs4_tcl=yes
25092
25093else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025094 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025095sed 's/^/| /' conftest.$ac_ext >&5
25096
Martin v. Löwiseba40652007-08-30 20:10:57 +000025097
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025098fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025099
25100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025101{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
25102echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025103
Skip Montanaro6dead952003-09-25 14:50:04 +000025104# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025105if test "$wchar_h" = yes
25106then
25107 # check whether wchar_t is signed or not
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025108 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
25109echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025110 if test "${ac_cv_wchar_t_signed+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025111 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025112else
25113
25114 if test "$cross_compiling" = yes; then
25115 ac_cv_wchar_t_signed=yes
25116else
25117 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025118/* confdefs.h. */
25119_ACEOF
25120cat confdefs.h >>conftest.$ac_ext
25121cat >>conftest.$ac_ext <<_ACEOF
25122/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025123
25124 #include <wchar.h>
25125 int main()
25126 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000025127 /* Success: exit code 0 */
25128 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025129 }
25130
25131_ACEOF
25132rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025133if { (ac_try="$ac_link"
25134case "(($ac_try" in
25135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25136 *) ac_try_echo=$ac_try;;
25137esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025139 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025140 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025142 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025143 { (case "(($ac_try" in
25144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25145 *) ac_try_echo=$ac_try;;
25146esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025148 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025149 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025151 (exit $ac_status); }; }; then
25152 ac_cv_wchar_t_signed=yes
25153else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025154 echo "$as_me: program exited with status $ac_status" >&5
25155echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025156sed 's/^/| /' conftest.$ac_ext >&5
25157
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025158( exit $ac_status )
25159ac_cv_wchar_t_signed=no
25160fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025161rm -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 +000025162fi
25163
Martin v. Löwiseba40652007-08-30 20:10:57 +000025164
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025165fi
25166
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025167 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
25168echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025169fi
25170
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025171{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
25172echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025173# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025174if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025175 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025176else
25177 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000025178fi
25179
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025180
25181if test $enable_unicode = yes
25182then
Martin v. Löwisfd917792001-06-27 20:22:04 +000025183 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025184 case "$have_ucs4_tcl" in
25185 yes) enable_unicode="ucs4"
25186 ;;
25187 *) enable_unicode="ucs2"
25188 ;;
25189 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025190fi
25191
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025192
25193
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025194case "$enable_unicode" in
25195ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000025196 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025197#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000025198_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025199
25200 ;;
25201ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000025202 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025203#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000025204_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025205
25206 ;;
25207esac
25208
Michael W. Hudson54241132001-12-07 15:38:26 +000025209
Martin v. Löwis11437992002-04-12 09:54:03 +000025210
25211
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025212
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025213if test "$enable_unicode" = "no"
25214then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000025215 UNICODE_OBJS=""
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025216 { echo "$as_me:$LINENO: result: not used" >&5
25217echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025218else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000025219 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000025220
25221cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025222#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025223_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025224
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025225
25226 # wchar_t is only usable if it maps to an unsigned type
25227 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000025228 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025229 then
25230 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025231
Martin v. Löwis11437992002-04-12 09:54:03 +000025232cat >>confdefs.h <<\_ACEOF
25233#define HAVE_USABLE_WCHAR_T 1
25234_ACEOF
25235
25236 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025237#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025238_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025239
25240 elif test "$ac_cv_sizeof_short" = "$unicode_size"
25241 then
25242 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000025243 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025244#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000025245_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025246
25247 elif test "$ac_cv_sizeof_long" = "$unicode_size"
25248 then
25249 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000025250 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025251#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000025252_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025253
25254 else
25255 PY_UNICODE_TYPE="no type found"
25256 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025257 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
25258echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025259fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000025260
25261# check for endianness
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025262{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
25263echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025264if test "${ac_cv_c_bigendian+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025265 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000025266else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025267 # See if sys/param.h defines the BYTE_ORDER macro.
25268cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025269/* confdefs.h. */
25270_ACEOF
25271cat confdefs.h >>conftest.$ac_ext
25272cat >>conftest.$ac_ext <<_ACEOF
25273/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025274#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025275#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025276
Martin v. Löwis11437992002-04-12 09:54:03 +000025277int
25278main ()
25279{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025280#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
25281 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
25282 bogus endian macros
25283#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025284
25285 ;
25286 return 0;
25287}
25288_ACEOF
25289rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025290if { (ac_try="$ac_compile"
25291case "(($ac_try" in
25292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25293 *) ac_try_echo=$ac_try;;
25294esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025296 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025297 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025298 grep -v '^ *+' conftest.er1 >conftest.err
25299 rm -f conftest.er1
25300 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025302 (exit $ac_status); } && {
25303 test -z "$ac_c_werror_flag" ||
25304 test ! -s conftest.err
25305 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025306 # It does; now see whether it defined to BIG_ENDIAN or not.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025307cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025308/* confdefs.h. */
25309_ACEOF
25310cat confdefs.h >>conftest.$ac_ext
25311cat >>conftest.$ac_ext <<_ACEOF
25312/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025313#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025314#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025315
Martin v. Löwis11437992002-04-12 09:54:03 +000025316int
25317main ()
25318{
Guido van Rossumef2255b2000-03-10 22:30:29 +000025319#if BYTE_ORDER != BIG_ENDIAN
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025320 not big endian
25321#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025322
25323 ;
25324 return 0;
25325}
25326_ACEOF
25327rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025328if { (ac_try="$ac_compile"
25329case "(($ac_try" in
25330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25331 *) ac_try_echo=$ac_try;;
25332esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025334 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025335 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025336 grep -v '^ *+' conftest.er1 >conftest.err
25337 rm -f conftest.er1
25338 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025340 (exit $ac_status); } && {
25341 test -z "$ac_c_werror_flag" ||
25342 test ! -s conftest.err
25343 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025344 ac_cv_c_bigendian=yes
25345else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025346 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025347sed 's/^/| /' conftest.$ac_ext >&5
25348
Martin v. Löwiseba40652007-08-30 20:10:57 +000025349 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000025350fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025351
25352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000025353else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025354 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025355sed 's/^/| /' conftest.$ac_ext >&5
25356
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025357 # It does not; compile a test program.
25358if test "$cross_compiling" = yes; then
25359 # try to guess the endianness by grepping values into an object file
25360 ac_cv_c_bigendian=unknown
25361 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025362/* confdefs.h. */
25363_ACEOF
25364cat confdefs.h >>conftest.$ac_ext
25365cat >>conftest.$ac_ext <<_ACEOF
25366/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025367short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
25368short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
25369void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
25370short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
25371short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
25372void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025373int
25374main ()
25375{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025376 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025377 ;
25378 return 0;
25379}
25380_ACEOF
25381rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025382if { (ac_try="$ac_compile"
25383case "(($ac_try" in
25384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25385 *) ac_try_echo=$ac_try;;
25386esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025388 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025389 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025390 grep -v '^ *+' conftest.er1 >conftest.err
25391 rm -f conftest.er1
25392 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025394 (exit $ac_status); } && {
25395 test -z "$ac_c_werror_flag" ||
25396 test ! -s conftest.err
25397 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025398 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025399 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025400fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025401if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
25402 if test "$ac_cv_c_bigendian" = unknown; then
25403 ac_cv_c_bigendian=no
25404 else
25405 # finding both strings is unlikely to happen, but who knows?
25406 ac_cv_c_bigendian=unknown
25407 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025408fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025409else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025410 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025411sed 's/^/| /' conftest.$ac_ext >&5
25412
Martin v. Löwiseba40652007-08-30 20:10:57 +000025413
Martin v. Löwis11437992002-04-12 09:54:03 +000025414fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025415
25416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025417else
25418 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025419/* confdefs.h. */
25420_ACEOF
25421cat confdefs.h >>conftest.$ac_ext
25422cat >>conftest.$ac_ext <<_ACEOF
25423/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000025424$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000025425int
25426main ()
25427{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025428
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025429 /* Are we little or big endian? From Harbison&Steele. */
25430 union
25431 {
25432 long int l;
25433 char c[sizeof (long int)];
25434 } u;
25435 u.l = 1;
25436 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025437
25438 ;
25439 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025440}
Martin v. Löwis11437992002-04-12 09:54:03 +000025441_ACEOF
25442rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025443if { (ac_try="$ac_link"
25444case "(($ac_try" in
25445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25446 *) ac_try_echo=$ac_try;;
25447esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025449 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025450 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025452 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025453 { (case "(($ac_try" in
25454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25455 *) ac_try_echo=$ac_try;;
25456esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025458 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025459 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025461 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025462 ac_cv_c_bigendian=no
25463else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025464 echo "$as_me: program exited with status $ac_status" >&5
25465echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025466sed 's/^/| /' conftest.$ac_ext >&5
25467
Martin v. Löwis11437992002-04-12 09:54:03 +000025468( exit $ac_status )
25469ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000025470fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025471rm -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 +000025472fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025473
25474
Martin v. Löwis11437992002-04-12 09:54:03 +000025475fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025476
25477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25478fi
25479{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
25480echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
25481case $ac_cv_c_bigendian in
25482 yes)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025483
25484cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025485#define WORDS_BIGENDIAN 1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025486_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025487 ;;
25488 no)
25489 ;;
25490 *)
25491 { { echo "$as_me:$LINENO: error: unknown endianness
25492presetting ac_cv_c_bigendian=no (or yes) will help" >&5
25493echo "$as_me: error: unknown endianness
25494presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025495 { (exit 1); exit 1; }; } ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025496esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000025497
Michael W. Hudson54241132001-12-07 15:38:26 +000025498
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025499# Check whether right shifting a negative integer extends the sign bit
25500# or fills with zeros (like the Cray J90, according to Tim Peters).
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025501{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
25502echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025503if test "${ac_cv_rshift_extends_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025504 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000025505else
Martin v. Löwis11437992002-04-12 09:54:03 +000025506
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025507if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025508 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025509else
Martin v. Löwis11437992002-04-12 09:54:03 +000025510 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025511/* confdefs.h. */
25512_ACEOF
25513cat confdefs.h >>conftest.$ac_ext
25514cat >>conftest.$ac_ext <<_ACEOF
25515/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025516
25517int main()
25518{
Vladimir Marangozova6180282000-07-12 05:05:06 +000025519 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025520}
25521
Martin v. Löwis11437992002-04-12 09:54:03 +000025522_ACEOF
25523rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025524if { (ac_try="$ac_link"
25525case "(($ac_try" in
25526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25527 *) ac_try_echo=$ac_try;;
25528esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025530 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025531 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025533 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025534 { (case "(($ac_try" in
25535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25536 *) ac_try_echo=$ac_try;;
25537esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025539 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025540 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025542 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000025543 ac_cv_rshift_extends_sign=yes
25544else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025545 echo "$as_me: program exited with status $ac_status" >&5
25546echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025547sed 's/^/| /' conftest.$ac_ext >&5
25548
Martin v. Löwis11437992002-04-12 09:54:03 +000025549( exit $ac_status )
25550ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000025551fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025552rm -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 +000025553fi
25554
Martin v. Löwiseba40652007-08-30 20:10:57 +000025555
25556fi
25557
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025558{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25559echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025560if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025561then
Martin v. Löwis11437992002-04-12 09:54:03 +000025562
25563cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025564#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025565_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025566
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025567fi
25568
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025569# check for getc_unlocked and related locking functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025570{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25571echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025572if test "${ac_cv_have_getc_unlocked+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025573 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025574else
Martin v. Löwis11437992002-04-12 09:54:03 +000025575
25576cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025577/* confdefs.h. */
25578_ACEOF
25579cat confdefs.h >>conftest.$ac_ext
25580cat >>conftest.$ac_ext <<_ACEOF
25581/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025582#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025583int
25584main ()
25585{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025586
25587 FILE *f = fopen("/dev/null", "r");
25588 flockfile(f);
25589 getc_unlocked(f);
25590 funlockfile(f);
25591
Martin v. Löwis11437992002-04-12 09:54:03 +000025592 ;
25593 return 0;
25594}
25595_ACEOF
25596rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025597if { (ac_try="$ac_link"
25598case "(($ac_try" in
25599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25600 *) ac_try_echo=$ac_try;;
25601esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025603 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025604 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025605 grep -v '^ *+' conftest.er1 >conftest.err
25606 rm -f conftest.er1
25607 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025609 (exit $ac_status); } && {
25610 test -z "$ac_c_werror_flag" ||
25611 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025612 } && test -s conftest$ac_exeext &&
25613 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025614 ac_cv_have_getc_unlocked=yes
25615else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025616 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025617sed 's/^/| /' conftest.$ac_ext >&5
25618
Martin v. Löwiseba40652007-08-30 20:10:57 +000025619 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025620fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025621
25622rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025623 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025624fi
25625
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025626{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
25627echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025628if test "$ac_cv_have_getc_unlocked" = yes
25629then
Martin v. Löwis11437992002-04-12 09:54:03 +000025630
25631cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025632#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025633_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025634
25635fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025636
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025637# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000025638# save the value of LIBS so we don't actually link Python with readline
25639LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025640
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025641# On some systems we need to link readline to a termcap compatible
25642# library. NOTE: Keep the precedence of listed libraries synchronised
25643# with setup.py.
25644py_cv_lib_readline=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025645{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
25646echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025647for py_libtermcap in "" ncursesw ncurses curses termcap; do
25648 if test -z "$py_libtermcap"; then
25649 READLINE_LIBS="-lreadline"
25650 else
25651 READLINE_LIBS="-lreadline -l$py_libtermcap"
25652 fi
25653 LIBS="$READLINE_LIBS $LIBS_no_readline"
25654 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025655/* confdefs.h. */
25656_ACEOF
25657cat confdefs.h >>conftest.$ac_ext
25658cat >>conftest.$ac_ext <<_ACEOF
25659/* end confdefs.h. */
25660
Martin v. Löwiseba40652007-08-30 20:10:57 +000025661/* Override any GCC internal prototype to avoid an error.
25662 Use char because int might match the return type of a GCC
25663 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025664#ifdef __cplusplus
25665extern "C"
25666#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025667char readline ();
25668int
25669main ()
25670{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025671return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025672 ;
25673 return 0;
25674}
25675_ACEOF
25676rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025677if { (ac_try="$ac_link"
25678case "(($ac_try" in
25679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25680 *) ac_try_echo=$ac_try;;
25681esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025683 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025684 ac_status=$?
25685 grep -v '^ *+' conftest.er1 >conftest.err
25686 rm -f conftest.er1
25687 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025689 (exit $ac_status); } && {
25690 test -z "$ac_c_werror_flag" ||
25691 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025692 } && test -s conftest$ac_exeext &&
25693 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025694 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025695else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025696 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025697sed 's/^/| /' conftest.$ac_ext >&5
25698
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025699
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025700fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025701
25702rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025703 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025704 if test $py_cv_lib_readline = yes; then
25705 break
25706 fi
25707done
25708# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
25709#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000025710if test $py_cv_lib_readline = no; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025711 { echo "$as_me:$LINENO: result: none" >&5
25712echo "${ECHO_T}none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025713else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025714 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
25715echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025716
25717cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025718#define HAVE_LIBREADLINE 1
25719_ACEOF
25720
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025721fi
25722
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025723# check for readline 2.1
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025724{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
25725echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025726if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025727 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025728else
25729 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025730LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025731cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025732/* confdefs.h. */
25733_ACEOF
25734cat confdefs.h >>conftest.$ac_ext
25735cat >>conftest.$ac_ext <<_ACEOF
25736/* end confdefs.h. */
25737
Martin v. Löwiseba40652007-08-30 20:10:57 +000025738/* Override any GCC internal prototype to avoid an error.
25739 Use char because int might match the return type of a GCC
25740 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025741#ifdef __cplusplus
25742extern "C"
25743#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025744char rl_callback_handler_install ();
25745int
25746main ()
25747{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025748return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025749 ;
25750 return 0;
25751}
25752_ACEOF
25753rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025754if { (ac_try="$ac_link"
25755case "(($ac_try" in
25756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25757 *) ac_try_echo=$ac_try;;
25758esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025760 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025761 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025762 grep -v '^ *+' conftest.er1 >conftest.err
25763 rm -f conftest.er1
25764 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025766 (exit $ac_status); } && {
25767 test -z "$ac_c_werror_flag" ||
25768 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025769 } && test -s conftest$ac_exeext &&
25770 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025771 ac_cv_lib_readline_rl_callback_handler_install=yes
25772else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025773 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025774sed 's/^/| /' conftest.$ac_ext >&5
25775
Martin v. Löwiseba40652007-08-30 20:10:57 +000025776 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025777fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025778
25779rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025780 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025781LIBS=$ac_check_lib_save_LIBS
25782fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025783{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25784echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25785if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025786
25787cat >>confdefs.h <<\_ACEOF
25788#define HAVE_RL_CALLBACK 1
25789_ACEOF
25790
25791fi
25792
25793
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025794# check for readline 2.2
25795cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025796/* confdefs.h. */
25797_ACEOF
25798cat confdefs.h >>conftest.$ac_ext
25799cat >>conftest.$ac_ext <<_ACEOF
25800/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025801#include <readline/readline.h>
25802_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025803if { (ac_try="$ac_cpp conftest.$ac_ext"
25804case "(($ac_try" in
25805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25806 *) ac_try_echo=$ac_try;;
25807esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025809 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025810 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025811 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025812 rm -f conftest.er1
25813 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025815 (exit $ac_status); } >/dev/null && {
25816 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25817 test ! -s conftest.err
25818 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025819 have_readline=yes
25820else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025821 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025822sed 's/^/| /' conftest.$ac_ext >&5
25823
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025824 have_readline=no
25825fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025826
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025827rm -f conftest.err conftest.$ac_ext
25828if test $have_readline = yes
25829then
25830 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025831/* confdefs.h. */
25832_ACEOF
25833cat confdefs.h >>conftest.$ac_ext
25834cat >>conftest.$ac_ext <<_ACEOF
25835/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025836#include <readline/readline.h>
25837
25838_ACEOF
25839if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025840 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025841
25842cat >>confdefs.h <<\_ACEOF
25843#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25844_ACEOF
25845
25846fi
Mark Dickinsonab442262009-11-20 19:27:43 +000025847rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000025848
25849 cat >conftest.$ac_ext <<_ACEOF
25850/* confdefs.h. */
25851_ACEOF
25852cat confdefs.h >>conftest.$ac_ext
25853cat >>conftest.$ac_ext <<_ACEOF
25854/* end confdefs.h. */
25855#include <readline/readline.h>
25856
25857_ACEOF
25858if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25859 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
25860
25861cat >>confdefs.h <<\_ACEOF
25862#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
25863_ACEOF
25864
25865fi
Mark Dickinsonab442262009-11-20 19:27:43 +000025866rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025867
25868fi
25869
Martin v. Löwis0daad592001-09-30 21:09:59 +000025870# check for readline 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025871{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25872echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025873if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025874 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025875else
Martin v. Löwis11437992002-04-12 09:54:03 +000025876 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025877LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025878cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025879/* confdefs.h. */
25880_ACEOF
25881cat confdefs.h >>conftest.$ac_ext
25882cat >>conftest.$ac_ext <<_ACEOF
25883/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025884
Martin v. Löwiseba40652007-08-30 20:10:57 +000025885/* Override any GCC internal prototype to avoid an error.
25886 Use char because int might match the return type of a GCC
25887 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025888#ifdef __cplusplus
25889extern "C"
25890#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025891char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025892int
25893main ()
25894{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025895return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025896 ;
25897 return 0;
25898}
25899_ACEOF
25900rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025901if { (ac_try="$ac_link"
25902case "(($ac_try" in
25903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25904 *) ac_try_echo=$ac_try;;
25905esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025907 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025908 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025909 grep -v '^ *+' conftest.er1 >conftest.err
25910 rm -f conftest.er1
25911 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025913 (exit $ac_status); } && {
25914 test -z "$ac_c_werror_flag" ||
25915 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025916 } && test -s conftest$ac_exeext &&
25917 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025918 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025919else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025920 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025921sed 's/^/| /' conftest.$ac_ext >&5
25922
Martin v. Löwiseba40652007-08-30 20:10:57 +000025923 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025924fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025925
25926rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025927 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025928LIBS=$ac_check_lib_save_LIBS
25929fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025930{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25931echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25932if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025933
Martin v. Löwis11437992002-04-12 09:54:03 +000025934cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025935#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025936_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025937
Martin v. Löwis0daad592001-09-30 21:09:59 +000025938fi
25939
Michael W. Hudson54241132001-12-07 15:38:26 +000025940
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025941# also in 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025942{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25943echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025944if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025945 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025946else
25947 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025948LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025949cat >conftest.$ac_ext <<_ACEOF
25950/* confdefs.h. */
25951_ACEOF
25952cat confdefs.h >>conftest.$ac_ext
25953cat >>conftest.$ac_ext <<_ACEOF
25954/* end confdefs.h. */
25955
25956/* Override any GCC internal prototype to avoid an error.
25957 Use char because int might match the return type of a GCC
25958 builtin and then its argument prototype would still apply. */
25959#ifdef __cplusplus
25960extern "C"
25961#endif
25962char rl_completion_display_matches_hook ();
25963int
25964main ()
25965{
25966return rl_completion_display_matches_hook ();
25967 ;
25968 return 0;
25969}
25970_ACEOF
25971rm -f conftest.$ac_objext conftest$ac_exeext
25972if { (ac_try="$ac_link"
25973case "(($ac_try" in
25974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25975 *) ac_try_echo=$ac_try;;
25976esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025978 (eval "$ac_link") 2>conftest.er1
25979 ac_status=$?
25980 grep -v '^ *+' conftest.er1 >conftest.err
25981 rm -f conftest.er1
25982 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025984 (exit $ac_status); } && {
25985 test -z "$ac_c_werror_flag" ||
25986 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025987 } && test -s conftest$ac_exeext &&
25988 $as_test_x conftest$ac_exeext; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025989 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25990else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025991 echo "$as_me: failed program was:" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025992sed 's/^/| /' conftest.$ac_ext >&5
25993
25994 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25995fi
25996
25997rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25998 conftest$ac_exeext conftest.$ac_ext
25999LIBS=$ac_check_lib_save_LIBS
26000fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026001{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
26002echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
26003if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026004
26005cat >>confdefs.h <<\_ACEOF
26006#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
26007_ACEOF
26008
26009fi
26010
26011
Martin v. Löwis0daad592001-09-30 21:09:59 +000026012# check for readline 4.2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026013{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
26014echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026015if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026016 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000026017else
Martin v. Löwis11437992002-04-12 09:54:03 +000026018 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026019LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000026020cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026021/* confdefs.h. */
26022_ACEOF
26023cat confdefs.h >>conftest.$ac_ext
26024cat >>conftest.$ac_ext <<_ACEOF
26025/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026026
Martin v. Löwiseba40652007-08-30 20:10:57 +000026027/* Override any GCC internal prototype to avoid an error.
26028 Use char because int might match the return type of a GCC
26029 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026030#ifdef __cplusplus
26031extern "C"
26032#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000026033char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026034int
26035main ()
26036{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026037return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026038 ;
26039 return 0;
26040}
26041_ACEOF
26042rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026043if { (ac_try="$ac_link"
26044case "(($ac_try" in
26045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26046 *) ac_try_echo=$ac_try;;
26047esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026049 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026050 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026051 grep -v '^ *+' conftest.er1 >conftest.err
26052 rm -f conftest.er1
26053 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026055 (exit $ac_status); } && {
26056 test -z "$ac_c_werror_flag" ||
26057 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026058 } && test -s conftest$ac_exeext &&
26059 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026060 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000026061else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026062 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026063sed 's/^/| /' conftest.$ac_ext >&5
26064
Martin v. Löwiseba40652007-08-30 20:10:57 +000026065 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000026066fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026067
26068rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026069 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026070LIBS=$ac_check_lib_save_LIBS
26071fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026072{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
26073echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
26074if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000026075
Martin v. Löwis11437992002-04-12 09:54:03 +000026076cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000026077#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026078_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000026079
Guido van Rossum353ae582001-07-10 16:45:32 +000026080fi
26081
Jack Jansendd19cf82001-12-06 22:36:17 +000026082
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026083# also in readline 4.2
26084cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026085/* confdefs.h. */
26086_ACEOF
26087cat confdefs.h >>conftest.$ac_ext
26088cat >>conftest.$ac_ext <<_ACEOF
26089/* end confdefs.h. */
26090#include <readline/readline.h>
26091_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026092if { (ac_try="$ac_cpp conftest.$ac_ext"
26093case "(($ac_try" in
26094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26095 *) ac_try_echo=$ac_try;;
26096esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026098 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026099 ac_status=$?
26100 grep -v '^ *+' conftest.er1 >conftest.err
26101 rm -f conftest.er1
26102 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026104 (exit $ac_status); } >/dev/null && {
26105 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26106 test ! -s conftest.err
26107 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026108 have_readline=yes
26109else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026110 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026111sed 's/^/| /' conftest.$ac_ext >&5
26112
26113 have_readline=no
26114fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026115
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026116rm -f conftest.err conftest.$ac_ext
26117if test $have_readline = yes
26118then
26119 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026120/* confdefs.h. */
26121_ACEOF
26122cat confdefs.h >>conftest.$ac_ext
26123cat >>conftest.$ac_ext <<_ACEOF
26124/* end confdefs.h. */
26125#include <readline/readline.h>
26126
26127_ACEOF
26128if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26129 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
26130
26131cat >>confdefs.h <<\_ACEOF
26132#define HAVE_RL_CATCH_SIGNAL 1
26133_ACEOF
26134
26135fi
Mark Dickinsonab442262009-11-20 19:27:43 +000026136rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026137
26138fi
26139
Martin v. Löwis82bca632006-02-10 20:49:30 +000026140# End of readline checks: restore LIBS
26141LIBS=$LIBS_no_readline
26142
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026143{ echo "$as_me:$LINENO: checking for broken nice()" >&5
26144echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026145if test "${ac_cv_broken_nice+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026146 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000026147else
Martin v. Löwis11437992002-04-12 09:54:03 +000026148
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026149if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000026150 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026151else
Martin v. Löwis11437992002-04-12 09:54:03 +000026152 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026153/* confdefs.h. */
26154_ACEOF
26155cat confdefs.h >>conftest.$ac_ext
26156cat >>conftest.$ac_ext <<_ACEOF
26157/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026158
26159int main()
26160{
26161 int val1 = nice(1);
26162 if (val1 != -1 && val1 == nice(2))
26163 exit(0);
26164 exit(1);
26165}
26166
Martin v. Löwis11437992002-04-12 09:54:03 +000026167_ACEOF
26168rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026169if { (ac_try="$ac_link"
26170case "(($ac_try" in
26171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26172 *) ac_try_echo=$ac_try;;
26173esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026175 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026176 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026178 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026179 { (case "(($ac_try" in
26180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26181 *) ac_try_echo=$ac_try;;
26182esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026184 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026185 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026187 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026188 ac_cv_broken_nice=yes
26189else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026190 echo "$as_me: program exited with status $ac_status" >&5
26191echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026192sed 's/^/| /' conftest.$ac_ext >&5
26193
Martin v. Löwis11437992002-04-12 09:54:03 +000026194( exit $ac_status )
26195ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026196fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026197rm -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 +000026198fi
26199
Martin v. Löwiseba40652007-08-30 20:10:57 +000026200
26201fi
26202
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026203{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
26204echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026205if test "$ac_cv_broken_nice" = yes
26206then
Martin v. Löwis11437992002-04-12 09:54:03 +000026207
26208cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026209#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026210_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026211
26212fi
26213
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026214{ echo "$as_me:$LINENO: checking for broken poll()" >&5
26215echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026216if test "${ac_cv_broken_poll+set}" = set; then
26217 echo $ECHO_N "(cached) $ECHO_C" >&6
26218else
26219 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026220 ac_cv_broken_poll=no
26221else
26222 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026223/* confdefs.h. */
26224_ACEOF
26225cat confdefs.h >>conftest.$ac_ext
26226cat >>conftest.$ac_ext <<_ACEOF
26227/* end confdefs.h. */
26228
26229#include <poll.h>
26230
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026231int main()
26232{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026233 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026234 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026235
26236 close (42);
26237
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026238 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026239 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026240 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026241 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026242 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026243 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026244 return 1;
26245}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026246
26247_ACEOF
26248rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026249if { (ac_try="$ac_link"
26250case "(($ac_try" in
26251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26252 *) ac_try_echo=$ac_try;;
26253esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026254eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026255 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026256 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026258 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026259 { (case "(($ac_try" in
26260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26261 *) ac_try_echo=$ac_try;;
26262esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026264 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026265 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026267 (exit $ac_status); }; }; then
26268 ac_cv_broken_poll=yes
26269else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026270 echo "$as_me: program exited with status $ac_status" >&5
26271echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026272sed 's/^/| /' conftest.$ac_ext >&5
26273
26274( exit $ac_status )
26275ac_cv_broken_poll=no
26276fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026277rm -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 +000026278fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026279
26280
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026281fi
26282
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026283{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
26284echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026285if test "$ac_cv_broken_poll" = yes
26286then
26287
26288cat >>confdefs.h <<\_ACEOF
26289#define HAVE_BROKEN_POLL 1
26290_ACEOF
26291
26292fi
26293
Brett Cannon43802422005-02-10 20:48:03 +000026294# 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 +000026295# (which is not required by ISO C or UNIX spec) and/or if we support
26296# tzname[]
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026297{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
26298echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026299if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026300 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026301else
26302 cat >conftest.$ac_ext <<_ACEOF
26303/* confdefs.h. */
26304_ACEOF
26305cat confdefs.h >>conftest.$ac_ext
26306cat >>conftest.$ac_ext <<_ACEOF
26307/* end confdefs.h. */
26308#include <sys/types.h>
26309#include <$ac_cv_struct_tm>
26310
26311
26312int
26313main ()
26314{
26315static struct tm ac_aggr;
26316if (ac_aggr.tm_zone)
26317return 0;
26318 ;
26319 return 0;
26320}
26321_ACEOF
26322rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026323if { (ac_try="$ac_compile"
26324case "(($ac_try" in
26325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26326 *) ac_try_echo=$ac_try;;
26327esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026329 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026330 ac_status=$?
26331 grep -v '^ *+' conftest.er1 >conftest.err
26332 rm -f conftest.er1
26333 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026335 (exit $ac_status); } && {
26336 test -z "$ac_c_werror_flag" ||
26337 test ! -s conftest.err
26338 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026339 ac_cv_member_struct_tm_tm_zone=yes
26340else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026341 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026342sed 's/^/| /' conftest.$ac_ext >&5
26343
Martin v. Löwiseba40652007-08-30 20:10:57 +000026344 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000026345/* confdefs.h. */
26346_ACEOF
26347cat confdefs.h >>conftest.$ac_ext
26348cat >>conftest.$ac_ext <<_ACEOF
26349/* end confdefs.h. */
26350#include <sys/types.h>
26351#include <$ac_cv_struct_tm>
26352
26353
26354int
26355main ()
26356{
26357static struct tm ac_aggr;
26358if (sizeof ac_aggr.tm_zone)
26359return 0;
26360 ;
26361 return 0;
26362}
26363_ACEOF
26364rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026365if { (ac_try="$ac_compile"
26366case "(($ac_try" in
26367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26368 *) ac_try_echo=$ac_try;;
26369esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026370eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026371 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026372 ac_status=$?
26373 grep -v '^ *+' conftest.er1 >conftest.err
26374 rm -f conftest.er1
26375 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026377 (exit $ac_status); } && {
26378 test -z "$ac_c_werror_flag" ||
26379 test ! -s conftest.err
26380 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026381 ac_cv_member_struct_tm_tm_zone=yes
26382else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026383 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026384sed 's/^/| /' conftest.$ac_ext >&5
26385
Martin v. Löwiseba40652007-08-30 20:10:57 +000026386 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000026387fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026388
26389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026390fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026391
26392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026393fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026394{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
26395echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
26396if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000026397
26398cat >>confdefs.h <<_ACEOF
26399#define HAVE_STRUCT_TM_TM_ZONE 1
26400_ACEOF
26401
26402
26403fi
26404
26405if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
26406
26407cat >>confdefs.h <<\_ACEOF
26408#define HAVE_TM_ZONE 1
26409_ACEOF
26410
26411else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026412 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
26413echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000026414if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026415 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000026416else
26417 cat >conftest.$ac_ext <<_ACEOF
26418/* confdefs.h. */
26419_ACEOF
26420cat confdefs.h >>conftest.$ac_ext
26421cat >>conftest.$ac_ext <<_ACEOF
26422/* end confdefs.h. */
26423#include <time.h>
26424
26425int
26426main ()
26427{
26428#ifndef tzname
26429 (void) tzname;
26430#endif
26431
26432 ;
26433 return 0;
26434}
26435_ACEOF
26436rm -f conftest.$ac_objext
26437if { (ac_try="$ac_compile"
26438case "(($ac_try" in
26439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26440 *) ac_try_echo=$ac_try;;
26441esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026443 (eval "$ac_compile") 2>conftest.er1
26444 ac_status=$?
26445 grep -v '^ *+' conftest.er1 >conftest.err
26446 rm -f conftest.er1
26447 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026449 (exit $ac_status); } && {
26450 test -z "$ac_c_werror_flag" ||
26451 test ! -s conftest.err
26452 } && test -s conftest.$ac_objext; then
26453 ac_cv_have_decl_tzname=yes
26454else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026455 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026456sed 's/^/| /' conftest.$ac_ext >&5
26457
26458 ac_cv_have_decl_tzname=no
26459fi
26460
26461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26462fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026463{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
26464echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
26465if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000026466
26467cat >>confdefs.h <<_ACEOF
26468#define HAVE_DECL_TZNAME 1
26469_ACEOF
26470
26471
26472else
26473 cat >>confdefs.h <<_ACEOF
26474#define HAVE_DECL_TZNAME 0
26475_ACEOF
26476
26477
26478fi
26479
26480
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026481 { echo "$as_me:$LINENO: checking for tzname" >&5
26482echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026483if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026484 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026485else
26486 cat >conftest.$ac_ext <<_ACEOF
26487/* confdefs.h. */
26488_ACEOF
26489cat confdefs.h >>conftest.$ac_ext
26490cat >>conftest.$ac_ext <<_ACEOF
26491/* end confdefs.h. */
26492#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000026493#if !HAVE_DECL_TZNAME
26494extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000026495#endif
26496
26497int
26498main ()
26499{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026500return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000026501 ;
26502 return 0;
26503}
26504_ACEOF
26505rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026506if { (ac_try="$ac_link"
26507case "(($ac_try" in
26508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26509 *) ac_try_echo=$ac_try;;
26510esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026512 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026513 ac_status=$?
26514 grep -v '^ *+' conftest.er1 >conftest.err
26515 rm -f conftest.er1
26516 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026518 (exit $ac_status); } && {
26519 test -z "$ac_c_werror_flag" ||
26520 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026521 } && test -s conftest$ac_exeext &&
26522 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000026523 ac_cv_var_tzname=yes
26524else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026525 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026526sed 's/^/| /' conftest.$ac_ext >&5
26527
Martin v. Löwiseba40652007-08-30 20:10:57 +000026528 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000026529fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026530
26531rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000026532 conftest$ac_exeext conftest.$ac_ext
26533fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026534{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
26535echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026536 if test $ac_cv_var_tzname = yes; then
26537
26538cat >>confdefs.h <<\_ACEOF
26539#define HAVE_TZNAME 1
26540_ACEOF
26541
26542 fi
26543fi
26544
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026545
Martin v. Löwis1d459062005-03-14 21:23:33 +000026546# check tzset(3) exists and works like we expect it to
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026547{ echo "$as_me:$LINENO: checking for working tzset()" >&5
26548echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026549if test "${ac_cv_working_tzset+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026550 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026551else
26552
26553if test "$cross_compiling" = yes; then
26554 ac_cv_working_tzset=no
26555else
26556 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026557/* confdefs.h. */
26558_ACEOF
26559cat confdefs.h >>conftest.$ac_ext
26560cat >>conftest.$ac_ext <<_ACEOF
26561/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026562
26563#include <stdlib.h>
26564#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000026565#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000026566
26567#if HAVE_TZNAME
26568extern char *tzname[];
26569#endif
26570
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026571int main()
26572{
Brett Cannon18367812003-09-19 00:59:16 +000026573 /* Note that we need to ensure that not only does tzset(3)
26574 do 'something' with localtime, but it works as documented
26575 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000026576 This includes making sure that tzname is set properly if
26577 tm->tm_zone does not exist since it is the alternative way
26578 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000026579
26580 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000026581 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000026582 */
26583
Martin v. Löwis1d459062005-03-14 21:23:33 +000026584 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000026585 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
26586
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026587 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026588 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026589 if (localtime(&groundhogday)->tm_hour != 0)
26590 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026591#if HAVE_TZNAME
26592 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26593 if (strcmp(tzname[0], "UTC") ||
26594 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26595 exit(1);
26596#endif
Brett Cannon18367812003-09-19 00:59:16 +000026597
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026598 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026599 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026600 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026601 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026602#if HAVE_TZNAME
26603 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26604 exit(1);
26605#endif
Brett Cannon18367812003-09-19 00:59:16 +000026606
26607 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26608 tzset();
26609 if (localtime(&groundhogday)->tm_hour != 11)
26610 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026611#if HAVE_TZNAME
26612 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26613 exit(1);
26614#endif
26615
26616#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000026617 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
26618 exit(1);
26619 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
26620 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026621#endif
Brett Cannon18367812003-09-19 00:59:16 +000026622
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026623 exit(0);
26624}
26625
26626_ACEOF
26627rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026628if { (ac_try="$ac_link"
26629case "(($ac_try" in
26630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26631 *) ac_try_echo=$ac_try;;
26632esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026634 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026635 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026637 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026638 { (case "(($ac_try" in
26639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26640 *) ac_try_echo=$ac_try;;
26641esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026643 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026644 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026646 (exit $ac_status); }; }; then
26647 ac_cv_working_tzset=yes
26648else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026649 echo "$as_me: program exited with status $ac_status" >&5
26650echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026651sed 's/^/| /' conftest.$ac_ext >&5
26652
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026653( exit $ac_status )
26654ac_cv_working_tzset=no
26655fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026656rm -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 +000026657fi
26658
Martin v. Löwiseba40652007-08-30 20:10:57 +000026659
26660fi
26661
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026662{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
26663echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026664if test "$ac_cv_working_tzset" = yes
26665then
26666
26667cat >>confdefs.h <<\_ACEOF
26668#define HAVE_WORKING_TZSET 1
26669_ACEOF
26670
26671fi
26672
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026673# Look for subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026674{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
26675echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026676if test "${ac_cv_stat_tv_nsec+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026677 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026678else
26679 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026680/* confdefs.h. */
26681_ACEOF
26682cat confdefs.h >>conftest.$ac_ext
26683cat >>conftest.$ac_ext <<_ACEOF
26684/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026685#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026686int
26687main ()
26688{
26689
26690struct stat st;
26691st.st_mtim.tv_nsec = 1;
26692
26693 ;
26694 return 0;
26695}
26696_ACEOF
26697rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026698if { (ac_try="$ac_compile"
26699case "(($ac_try" in
26700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26701 *) ac_try_echo=$ac_try;;
26702esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026704 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026705 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026706 grep -v '^ *+' conftest.er1 >conftest.err
26707 rm -f conftest.er1
26708 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026710 (exit $ac_status); } && {
26711 test -z "$ac_c_werror_flag" ||
26712 test ! -s conftest.err
26713 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000026714 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026715else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026716 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026717sed 's/^/| /' conftest.$ac_ext >&5
26718
Martin v. Löwiseba40652007-08-30 20:10:57 +000026719 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026720fi
26721
Martin v. Löwiseba40652007-08-30 20:10:57 +000026722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26723fi
26724
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026725{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
26726echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026727if test "$ac_cv_stat_tv_nsec" = yes
26728then
26729
26730cat >>confdefs.h <<\_ACEOF
26731#define HAVE_STAT_TV_NSEC 1
26732_ACEOF
26733
26734fi
26735
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026736# Look for BSD style subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026737{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
26738echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026739if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026740 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026741else
26742 cat >conftest.$ac_ext <<_ACEOF
26743/* confdefs.h. */
26744_ACEOF
26745cat confdefs.h >>conftest.$ac_ext
26746cat >>conftest.$ac_ext <<_ACEOF
26747/* end confdefs.h. */
26748#include <sys/stat.h>
26749int
26750main ()
26751{
26752
26753struct stat st;
26754st.st_mtimespec.tv_nsec = 1;
26755
26756 ;
26757 return 0;
26758}
26759_ACEOF
26760rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026761if { (ac_try="$ac_compile"
26762case "(($ac_try" in
26763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26764 *) ac_try_echo=$ac_try;;
26765esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026767 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026768 ac_status=$?
26769 grep -v '^ *+' conftest.er1 >conftest.err
26770 rm -f conftest.er1
26771 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026773 (exit $ac_status); } && {
26774 test -z "$ac_c_werror_flag" ||
26775 test ! -s conftest.err
26776 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026777 ac_cv_stat_tv_nsec2=yes
26778else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026779 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026780sed 's/^/| /' conftest.$ac_ext >&5
26781
Martin v. Löwiseba40652007-08-30 20:10:57 +000026782 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026783fi
26784
Martin v. Löwiseba40652007-08-30 20:10:57 +000026785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26786fi
26787
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026788{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26789echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026790if test "$ac_cv_stat_tv_nsec2" = yes
26791then
26792
26793cat >>confdefs.h <<\_ACEOF
26794#define HAVE_STAT_TV_NSEC2 1
26795_ACEOF
26796
26797fi
26798
Jack Jansen666b1e72001-10-31 12:11:48 +000026799# On HP/UX 11.0, mvwdelch is a block with a return statement
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026800{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26801echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026802if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026803 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026804else
Martin v. Löwis11437992002-04-12 09:54:03 +000026805 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026806/* confdefs.h. */
26807_ACEOF
26808cat confdefs.h >>conftest.$ac_ext
26809cat >>conftest.$ac_ext <<_ACEOF
26810/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026811#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026812int
26813main ()
26814{
Jack Jansen666b1e72001-10-31 12:11:48 +000026815
26816 int rtn;
26817 rtn = mvwdelch(0,0,0);
26818
Martin v. Löwis11437992002-04-12 09:54:03 +000026819 ;
26820 return 0;
26821}
26822_ACEOF
26823rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026824if { (ac_try="$ac_compile"
26825case "(($ac_try" in
26826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26827 *) ac_try_echo=$ac_try;;
26828esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026830 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026831 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026832 grep -v '^ *+' conftest.er1 >conftest.err
26833 rm -f conftest.er1
26834 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026836 (exit $ac_status); } && {
26837 test -z "$ac_c_werror_flag" ||
26838 test ! -s conftest.err
26839 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026840 ac_cv_mvwdelch_is_expression=yes
26841else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026842 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026843sed 's/^/| /' conftest.$ac_ext >&5
26844
Martin v. Löwiseba40652007-08-30 20:10:57 +000026845 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026846fi
26847
Martin v. Löwiseba40652007-08-30 20:10:57 +000026848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26849fi
26850
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026851{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26852echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026853
26854if test "$ac_cv_mvwdelch_is_expression" = yes
26855then
Martin v. Löwis11437992002-04-12 09:54:03 +000026856
26857cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026858#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026859_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026860
26861fi
26862
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026863{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26864echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026865if test "${ac_cv_window_has_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026866 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026867else
Martin v. Löwis11437992002-04-12 09:54:03 +000026868 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026869/* confdefs.h. */
26870_ACEOF
26871cat confdefs.h >>conftest.$ac_ext
26872cat >>conftest.$ac_ext <<_ACEOF
26873/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026874#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026875int
26876main ()
26877{
Jack Jansen666b1e72001-10-31 12:11:48 +000026878
26879 WINDOW *w;
26880 w->_flags = 0;
26881
Martin v. Löwis11437992002-04-12 09:54:03 +000026882 ;
26883 return 0;
26884}
26885_ACEOF
26886rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026887if { (ac_try="$ac_compile"
26888case "(($ac_try" in
26889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26890 *) ac_try_echo=$ac_try;;
26891esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026893 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026894 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026895 grep -v '^ *+' conftest.er1 >conftest.err
26896 rm -f conftest.er1
26897 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026899 (exit $ac_status); } && {
26900 test -z "$ac_c_werror_flag" ||
26901 test ! -s conftest.err
26902 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026903 ac_cv_window_has_flags=yes
26904else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026905 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026906sed 's/^/| /' conftest.$ac_ext >&5
26907
Martin v. Löwiseba40652007-08-30 20:10:57 +000026908 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026909fi
26910
Martin v. Löwiseba40652007-08-30 20:10:57 +000026911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26912fi
26913
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026914{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26915echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026916
Jack Jansen666b1e72001-10-31 12:11:48 +000026917
26918if test "$ac_cv_window_has_flags" = yes
26919then
Martin v. Löwis11437992002-04-12 09:54:03 +000026920
26921cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026922#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026923_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026924
26925fi
26926
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026927{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
26928echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026929cat >conftest.$ac_ext <<_ACEOF
26930/* confdefs.h. */
26931_ACEOF
26932cat confdefs.h >>conftest.$ac_ext
26933cat >>conftest.$ac_ext <<_ACEOF
26934/* end confdefs.h. */
26935#include <curses.h>
26936int
26937main ()
26938{
26939void *x=is_term_resized
26940 ;
26941 return 0;
26942}
26943_ACEOF
26944rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026945if { (ac_try="$ac_compile"
26946case "(($ac_try" in
26947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26948 *) ac_try_echo=$ac_try;;
26949esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026951 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000026952 ac_status=$?
26953 grep -v '^ *+' conftest.er1 >conftest.err
26954 rm -f conftest.er1
26955 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026957 (exit $ac_status); } && {
26958 test -z "$ac_c_werror_flag" ||
26959 test ! -s conftest.err
26960 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000026961
26962cat >>confdefs.h <<\_ACEOF
26963#define HAVE_CURSES_IS_TERM_RESIZED 1
26964_ACEOF
26965
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026966 { echo "$as_me:$LINENO: result: yes" >&5
26967echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026968else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026969 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000026970sed 's/^/| /' conftest.$ac_ext >&5
26971
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026972 { echo "$as_me:$LINENO: result: no" >&5
26973echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026974
26975fi
Walter Dörwald4994d952006-06-19 08:07:50 +000026976
Martin v. Löwiseba40652007-08-30 20:10:57 +000026977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26978
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026979{ echo "$as_me:$LINENO: checking for resize_term" >&5
26980echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026981cat >conftest.$ac_ext <<_ACEOF
26982/* confdefs.h. */
26983_ACEOF
26984cat confdefs.h >>conftest.$ac_ext
26985cat >>conftest.$ac_ext <<_ACEOF
26986/* end confdefs.h. */
26987#include <curses.h>
26988int
26989main ()
26990{
26991void *x=resize_term
26992 ;
26993 return 0;
26994}
26995_ACEOF
26996rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026997if { (ac_try="$ac_compile"
26998case "(($ac_try" in
26999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27000 *) ac_try_echo=$ac_try;;
27001esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027003 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027004 ac_status=$?
27005 grep -v '^ *+' conftest.er1 >conftest.err
27006 rm -f conftest.er1
27007 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027009 (exit $ac_status); } && {
27010 test -z "$ac_c_werror_flag" ||
27011 test ! -s conftest.err
27012 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027013
27014cat >>confdefs.h <<\_ACEOF
27015#define HAVE_CURSES_RESIZE_TERM 1
27016_ACEOF
27017
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027018 { echo "$as_me:$LINENO: result: yes" >&5
27019echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027020else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027021 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027022sed 's/^/| /' conftest.$ac_ext >&5
27023
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027024 { echo "$as_me:$LINENO: result: no" >&5
27025echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027026
27027fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027028
Martin v. Löwiseba40652007-08-30 20:10:57 +000027029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27030
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027031{ echo "$as_me:$LINENO: checking for resizeterm" >&5
27032echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027033cat >conftest.$ac_ext <<_ACEOF
27034/* confdefs.h. */
27035_ACEOF
27036cat confdefs.h >>conftest.$ac_ext
27037cat >>conftest.$ac_ext <<_ACEOF
27038/* end confdefs.h. */
27039#include <curses.h>
27040int
27041main ()
27042{
27043void *x=resizeterm
27044 ;
27045 return 0;
27046}
27047_ACEOF
27048rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027049if { (ac_try="$ac_compile"
27050case "(($ac_try" in
27051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27052 *) ac_try_echo=$ac_try;;
27053esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027055 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027056 ac_status=$?
27057 grep -v '^ *+' conftest.er1 >conftest.err
27058 rm -f conftest.er1
27059 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027061 (exit $ac_status); } && {
27062 test -z "$ac_c_werror_flag" ||
27063 test ! -s conftest.err
27064 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027065
27066cat >>confdefs.h <<\_ACEOF
27067#define HAVE_CURSES_RESIZETERM 1
27068_ACEOF
27069
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027070 { echo "$as_me:$LINENO: result: yes" >&5
27071echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027072else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027073 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027074sed 's/^/| /' conftest.$ac_ext >&5
27075
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027076 { echo "$as_me:$LINENO: result: no" >&5
27077echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027078
27079fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027080
Martin v. Löwiseba40652007-08-30 20:10:57 +000027081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27082
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027083{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
27084echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027085
27086if test -r /dev/ptmx
27087then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027088 { echo "$as_me:$LINENO: result: yes" >&5
27089echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000027090
27091cat >>confdefs.h <<\_ACEOF
27092#define HAVE_DEV_PTMX 1
27093_ACEOF
27094
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027095else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027096 { echo "$as_me:$LINENO: result: no" >&5
27097echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000027098fi
27099
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027100{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
27101echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027102
27103if test -r /dev/ptc
27104then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027105 { echo "$as_me:$LINENO: result: yes" >&5
27106echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027107
27108cat >>confdefs.h <<\_ACEOF
27109#define HAVE_DEV_PTC 1
27110_ACEOF
27111
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027112else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027113 { echo "$as_me:$LINENO: result: no" >&5
27114echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027115fi
27116
Mark Dickinson82864d12009-11-15 16:18:58 +000027117if test "$have_long_long" = yes
27118then
27119 { echo "$as_me:$LINENO: checking for %lld and %llu printf() format support" >&5
27120echo $ECHO_N "checking for %lld and %llu printf() format support... $ECHO_C" >&6; }
27121 if test "${ac_cv_have_long_long_format+set}" = set; then
27122 echo $ECHO_N "(cached) $ECHO_C" >&6
27123else
27124 if test "$cross_compiling" = yes; then
27125 ac_cv_have_long_long_format=no
27126else
27127 cat >conftest.$ac_ext <<_ACEOF
27128/* confdefs.h. */
27129_ACEOF
27130cat confdefs.h >>conftest.$ac_ext
27131cat >>conftest.$ac_ext <<_ACEOF
27132/* end confdefs.h. */
27133
27134 #include <stdio.h>
27135 #include <stddef.h>
27136 #include <string.h>
27137
27138 #ifdef HAVE_SYS_TYPES_H
27139 #include <sys/types.h>
27140 #endif
27141
27142 int main()
27143 {
27144 char buffer[256];
27145
27146 if (sprintf(buffer, "%lld", (long long)123) < 0)
27147 return 1;
27148 if (strcmp(buffer, "123"))
27149 return 1;
27150
27151 if (sprintf(buffer, "%lld", (long long)-123) < 0)
27152 return 1;
27153 if (strcmp(buffer, "-123"))
27154 return 1;
27155
27156 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
27157 return 1;
27158 if (strcmp(buffer, "123"))
27159 return 1;
27160
27161 return 0;
27162 }
27163
27164_ACEOF
27165rm -f conftest$ac_exeext
27166if { (ac_try="$ac_link"
27167case "(($ac_try" in
27168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27169 *) ac_try_echo=$ac_try;;
27170esac
27171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27172 (eval "$ac_link") 2>&5
27173 ac_status=$?
27174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27175 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27176 { (case "(($ac_try" in
27177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27178 *) ac_try_echo=$ac_try;;
27179esac
27180eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27181 (eval "$ac_try") 2>&5
27182 ac_status=$?
27183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27184 (exit $ac_status); }; }; then
27185 ac_cv_have_long_long_format=yes
27186else
27187 echo "$as_me: program exited with status $ac_status" >&5
27188echo "$as_me: failed program was:" >&5
27189sed 's/^/| /' conftest.$ac_ext >&5
27190
27191( exit $ac_status )
27192ac_cv_have_long_long_format=no
27193fi
27194rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27195fi
27196
27197
27198
27199fi
27200
27201 { echo "$as_me:$LINENO: result: $ac_cv_have_long_long_format" >&5
27202echo "${ECHO_T}$ac_cv_have_long_long_format" >&6; }
27203fi
27204
27205if test $ac_cv_have_long_long_format = yes
27206then
27207
27208cat >>confdefs.h <<\_ACEOF
27209#define PY_FORMAT_LONG_LONG "ll"
27210_ACEOF
27211
27212fi
27213
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000027214if test $ac_sys_system = Darwin
27215then
27216 LIBS="$LIBS -framework CoreFoundation"
27217fi
27218
Mark Dickinson82864d12009-11-15 16:18:58 +000027219
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027220{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
27221echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027222if test "${ac_cv_have_size_t_format+set}" = set; then
27223 echo $ECHO_N "(cached) $ECHO_C" >&6
27224else
27225 if test "$cross_compiling" = yes; then
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000027226 ac_cv_have_size_t_format="cross -- assuming yes"
27227
Brett Cannon09d12362006-05-11 05:11:33 +000027228else
27229 cat >conftest.$ac_ext <<_ACEOF
27230/* confdefs.h. */
27231_ACEOF
27232cat confdefs.h >>conftest.$ac_ext
27233cat >>conftest.$ac_ext <<_ACEOF
27234/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027235
Brett Cannon09d12362006-05-11 05:11:33 +000027236#include <stdio.h>
27237#include <stddef.h>
27238#include <string.h>
27239
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000027240#ifdef HAVE_SYS_TYPES_H
27241#include <sys/types.h>
27242#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000027243
27244#ifdef HAVE_SSIZE_T
27245typedef ssize_t Py_ssize_t;
27246#elif SIZEOF_VOID_P == SIZEOF_LONG
27247typedef long Py_ssize_t;
27248#else
27249typedef int Py_ssize_t;
27250#endif
Brett Cannon09d12362006-05-11 05:11:33 +000027251
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000027252int main()
27253{
27254 char buffer[256];
27255
Brett Cannon09d12362006-05-11 05:11:33 +000027256 if(sprintf(buffer, "%zd", (size_t)123) < 0)
27257 return 1;
27258
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000027259 if (strcmp(buffer, "123"))
27260 return 1;
27261
27262 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
27263 return 1;
27264
27265 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000027266 return 1;
27267
27268 return 0;
27269}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027270
Brett Cannon09d12362006-05-11 05:11:33 +000027271_ACEOF
27272rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027273if { (ac_try="$ac_link"
27274case "(($ac_try" in
27275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27276 *) ac_try_echo=$ac_try;;
27277esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027279 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000027280 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000027282 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027283 { (case "(($ac_try" in
27284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27285 *) ac_try_echo=$ac_try;;
27286esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027288 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000027289 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000027291 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027292 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027293else
27294 echo "$as_me: program exited with status $ac_status" >&5
27295echo "$as_me: failed program was:" >&5
27296sed 's/^/| /' conftest.$ac_ext >&5
27297
27298( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027299ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027300fi
27301rm -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 +000027302fi
27303
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027304
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027305fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027306{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
27307echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000027308if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027309
27310cat >>confdefs.h <<\_ACEOF
27311#define PY_FORMAT_SIZE_T "z"
27312_ACEOF
27313
27314fi
27315
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027316{ echo "$as_me:$LINENO: checking for socklen_t" >&5
27317echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027318if test "${ac_cv_type_socklen_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027319 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000027320else
Martin v. Löwis11437992002-04-12 09:54:03 +000027321 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027322/* confdefs.h. */
27323_ACEOF
27324cat confdefs.h >>conftest.$ac_ext
27325cat >>conftest.$ac_ext <<_ACEOF
27326/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000027327
27328#ifdef HAVE_SYS_TYPES_H
27329#include <sys/types.h>
27330#endif
27331#ifdef HAVE_SYS_SOCKET_H
27332#include <sys/socket.h>
27333#endif
27334
27335
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027336typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000027337int
27338main ()
27339{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027340if ((ac__type_new_ *) 0)
27341 return 0;
27342if (sizeof (ac__type_new_))
27343 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000027344 ;
27345 return 0;
27346}
27347_ACEOF
27348rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027349if { (ac_try="$ac_compile"
27350case "(($ac_try" in
27351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27352 *) ac_try_echo=$ac_try;;
27353esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027355 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027356 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027357 grep -v '^ *+' conftest.er1 >conftest.err
27358 rm -f conftest.er1
27359 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027361 (exit $ac_status); } && {
27362 test -z "$ac_c_werror_flag" ||
27363 test ! -s conftest.err
27364 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027365 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000027366else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027367 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027368sed 's/^/| /' conftest.$ac_ext >&5
27369
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027370 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000027371fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027372
27373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000027374fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027375{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
27376echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
27377if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027378 :
27379else
Guido van Rossum95713eb2000-05-18 20:53:31 +000027380
Martin v. Löwis01c04012002-11-11 14:58:44 +000027381cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027382#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000027383_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027384
27385fi
27386
Michael W. Hudson54241132001-12-07 15:38:26 +000027387
Michael W. Hudson54241132001-12-07 15:38:26 +000027388
27389
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000027390for h in `(cd $srcdir;echo Python/thread_*.h)`
27391do
27392 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
27393done
27394
Michael W. Hudson54241132001-12-07 15:38:26 +000027395
Neal Norwitzd24499d2005-12-18 21:36:39 +000027396SRCDIRS="Parser Grammar Objects Python Modules Mac"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027397{ echo "$as_me:$LINENO: checking for build directories" >&5
27398echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027399for dir in $SRCDIRS; do
27400 if test ! -d $dir; then
27401 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000027402 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027403done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027404{ echo "$as_me:$LINENO: result: done" >&5
27405echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000027406
Guido van Rossum627b2d71993-12-24 10:39:16 +000027407# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000027408ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000027409
Martin v. Löwis11437992002-04-12 09:54:03 +000027410cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027411# This file is a shell script that caches the results of configure
27412# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000027413# scripts and configure runs, see configure's option --config-cache.
27414# It is not useful on other systems. If it contains results you don't
27415# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027416#
Martin v. Löwis11437992002-04-12 09:54:03 +000027417# config.status only pays attention to the cache file if you give it
27418# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027419#
Skip Montanaro6dead952003-09-25 14:50:04 +000027420# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000027421# loading this file, other *unset* `ac_cv_foo' will be assigned the
27422# following values.
27423
27424_ACEOF
27425
Guido van Rossumf78abae1997-01-21 22:02:36 +000027426# The following way of writing the cache mishandles newlines in values,
27427# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027428# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027429# Ultrix sh set writes to stderr and can't be redirected directly,
27430# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027431(
27432 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27433 eval ac_val=\$$ac_var
27434 case $ac_val in #(
27435 *${as_nl}*)
27436 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027437 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
27438echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027439 esac
27440 case $ac_var in #(
27441 _ | IFS | as_nl) ;; #(
27442 *) $as_unset $ac_var ;;
27443 esac ;;
27444 esac
27445 done
27446
Martin v. Löwis11437992002-04-12 09:54:03 +000027447 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027448 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27449 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000027450 # `set' does not quote correctly, so add quotes (double-quote
27451 # substitution turns \\\\ into \\, and sed turns \\ into \).
27452 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027453 "s/'/'\\\\''/g;
27454 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027455 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000027456 *)
27457 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027458 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027459 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027460 esac |
27461 sort
27462) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027463 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000027464 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027465 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000027466 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027467 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27468 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000027469 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27470 :end' >>confcache
27471if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27472 if test -w "$cache_file"; then
27473 test "x$cache_file" != "x/dev/null" &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027474 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
27475echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027476 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027477 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027478 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27479echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027480 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027481fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027482rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027483
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027484test "x$prefix" = xNONE && prefix=$ac_default_prefix
27485# Let make expand exec_prefix.
27486test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027487
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027488DEFS=-DHAVE_CONFIG_H
27489
Skip Montanaro6dead952003-09-25 14:50:04 +000027490ac_libobjs=
27491ac_ltlibobjs=
27492for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27493 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027494 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027495 ac_i=`echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000027496 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27497 # will be set to the directory where LIBOBJS objects are built.
27498 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27499 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027500done
27501LIBOBJS=$ac_libobjs
27502
27503LTLIBOBJS=$ac_ltlibobjs
27504
27505
Martin v. Löwis11437992002-04-12 09:54:03 +000027506
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027507: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000027508ac_clean_files_save=$ac_clean_files
27509ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027510{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27511echo "$as_me: creating $CONFIG_STATUS" >&6;}
27512cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027513#! $SHELL
27514# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027515# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027516# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027517# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027518
Martin v. Löwis11437992002-04-12 09:54:03 +000027519debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027520ac_cs_recheck=false
27521ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027522SHELL=\${CONFIG_SHELL-$SHELL}
27523_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027524
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027525cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027526## --------------------- ##
27527## M4sh Initialization. ##
27528## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027529
Martin v. Löwiseba40652007-08-30 20:10:57 +000027530# Be more Bourne compatible
27531DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027532if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27533 emulate sh
27534 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027535 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027536 # is contrary to our usage. Disable this feature.
27537 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027538 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000027539else
Martin v. Löwiseba40652007-08-30 20:10:57 +000027540 case `(set -o) 2>/dev/null` in
27541 *posix*) set -o posix ;;
27542esac
27543
Martin v. Löwis11437992002-04-12 09:54:03 +000027544fi
Michael W. Hudson54241132001-12-07 15:38:26 +000027545
Skip Montanaro6dead952003-09-25 14:50:04 +000027546
Martin v. Löwis11437992002-04-12 09:54:03 +000027547
27548
Martin v. Löwiseba40652007-08-30 20:10:57 +000027549# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027550# Avoid depending upon Character Ranges.
27551as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27552as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27553as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27554as_cr_digits='0123456789'
27555as_cr_alnum=$as_cr_Letters$as_cr_digits
27556
27557# The user is always right.
27558if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027559 echo "#! /bin/sh" >conf$$.sh
27560 echo "exit 0" >>conf$$.sh
27561 chmod +x conf$$.sh
27562 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27563 PATH_SEPARATOR=';'
27564 else
27565 PATH_SEPARATOR=:
27566 fi
27567 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027568fi
27569
Martin v. Löwiseba40652007-08-30 20:10:57 +000027570# Support unset when possible.
27571if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27572 as_unset=unset
27573else
27574 as_unset=false
27575fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027576
Martin v. Löwiseba40652007-08-30 20:10:57 +000027577
27578# IFS
27579# We need space, tab and new line, in precisely that order. Quoting is
27580# there to prevent editors from complaining about space-tab.
27581# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27582# splitting by setting IFS to empty value.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027583as_nl='
27584'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027585IFS=" "" $as_nl"
27586
27587# Find who we are. Look in the path if we contain no directory separator.
27588case $0 in
27589 *[\\/]* ) as_myself=$0 ;;
27590 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000027591for as_dir in $PATH
27592do
27593 IFS=$as_save_IFS
27594 test -z "$as_dir" && as_dir=.
27595 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27596done
Martin v. Löwiseba40652007-08-30 20:10:57 +000027597IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000027598
Martin v. Löwiseba40652007-08-30 20:10:57 +000027599 ;;
27600esac
27601# We did not find ourselves, most probably we were run as `sh COMMAND'
27602# in which case we are not to be found in the path.
27603if test "x$as_myself" = x; then
27604 as_myself=$0
27605fi
27606if test ! -f "$as_myself"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027607 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +000027608 { (exit 1); exit 1; }
27609fi
27610
27611# Work around bugs in pre-3.0 UWIN ksh.
27612for as_var in ENV MAIL MAILPATH
27613do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27614done
27615PS1='$ '
27616PS2='> '
27617PS4='+ '
27618
27619# NLS nuisances.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027620for as_var in \
27621 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
27622 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
27623 LC_TELEPHONE LC_TIME
27624do
27625 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
27626 eval $as_var=C; export $as_var
27627 else
27628 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27629 fi
27630done
Martin v. Löwiseba40652007-08-30 20:10:57 +000027631
27632# Required to use basename.
27633if expr a : '\(a\)' >/dev/null 2>&1 &&
27634 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27635 as_expr=expr
27636else
27637 as_expr=false
27638fi
27639
27640if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27641 as_basename=basename
27642else
27643 as_basename=false
27644fi
27645
27646
27647# Name of the executable.
27648as_me=`$as_basename -- "$0" ||
27649$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27650 X"$0" : 'X\(//\)$' \| \
27651 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027652echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027653 sed '/^.*\/\([^/][^/]*\)\/*$/{
27654 s//\1/
27655 q
27656 }
27657 /^X\/\(\/\/\)$/{
27658 s//\1/
27659 q
27660 }
27661 /^X\/\(\/\).*/{
27662 s//\1/
27663 q
27664 }
27665 s/.*/./; q'`
27666
27667# CDPATH.
27668$as_unset CDPATH
27669
27670
27671
Martin v. Löwis11437992002-04-12 09:54:03 +000027672 as_lineno_1=$LINENO
27673 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000027674 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000027675 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000027676
Martin v. Löwis11437992002-04-12 09:54:03 +000027677 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
27678 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000027679 # line-number line after each line using $LINENO; the second 'sed'
27680 # does the real work. The second script uses 'N' to pair each
27681 # line-number line with the line containing $LINENO, and appends
27682 # trailing '-' during substitution so that $LINENO is not a special
27683 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000027684 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000027685 # scripts with optimization help from Paolo Bonzini. Blame Lee
27686 # E. McMahon (1931-1989) for sed's syntax. :-)
27687 sed -n '
27688 p
27689 /[$]LINENO/=
27690 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000027691 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000027692 s/[$]LINENO.*/&-/
27693 t lineno
27694 b
27695 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000027696 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000027697 :loop
27698 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000027699 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000027700 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000027701 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000027702 chmod +x "$as_me.lineno" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027703 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027704 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027705
Martin v. Löwis11437992002-04-12 09:54:03 +000027706 # Don't try to exec as it changes $[0], causing all sort of problems
27707 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000027708 # original and so on. Autoconf is especially sensitive to this).
27709 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000027710 # Exit status is that of the last command.
27711 exit
27712}
27713
27714
Martin v. Löwiseba40652007-08-30 20:10:57 +000027715if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27716 as_dirname=dirname
27717else
27718 as_dirname=false
27719fi
27720
27721ECHO_C= ECHO_N= ECHO_T=
27722case `echo -n x` in
27723-n*)
27724 case `echo 'x\c'` in
27725 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27726 *) ECHO_C='\c';;
27727 esac;;
27728*)
27729 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027730esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027731
Martin v. Löwiseba40652007-08-30 20:10:57 +000027732if expr a : '\(a\)' >/dev/null 2>&1 &&
27733 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027734 as_expr=expr
27735else
27736 as_expr=false
27737fi
27738
27739rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000027740if test -d conf$$.dir; then
27741 rm -f conf$$.dir/conf$$.file
27742else
27743 rm -f conf$$.dir
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027744 mkdir conf$$.dir
Martin v. Löwiseba40652007-08-30 20:10:57 +000027745fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027746echo >conf$$.file
27747if ln -s conf$$.file conf$$ 2>/dev/null; then
27748 as_ln_s='ln -s'
27749 # ... but there are two gotchas:
27750 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27751 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27752 # In both cases, we have to default to `cp -p'.
27753 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027754 as_ln_s='cp -p'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027755elif ln conf$$.file conf$$ 2>/dev/null; then
27756 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000027757else
27758 as_ln_s='cp -p'
27759fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027760rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27761rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027762
Skip Montanaro6dead952003-09-25 14:50:04 +000027763if mkdir -p . 2>/dev/null; then
27764 as_mkdir_p=:
27765else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027766 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027767 as_mkdir_p=false
27768fi
27769
Martin v. Löwiseba40652007-08-30 20:10:57 +000027770if test -x / >/dev/null 2>&1; then
27771 as_test_x='test -x'
27772else
27773 if ls -dL / >/dev/null 2>&1; then
27774 as_ls_L_option=L
27775 else
27776 as_ls_L_option=
27777 fi
27778 as_test_x='
27779 eval sh -c '\''
27780 if test -d "$1"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027781 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000027782 else
27783 case $1 in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027784 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027785 esac;
27786 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27787 ???[sx]*):;;*)false;;esac;fi
27788 '\'' sh
27789 '
27790fi
27791as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027792
27793# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027794as_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 +000027795
27796# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027797as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027798
27799
Martin v. Löwis11437992002-04-12 09:54:03 +000027800exec 6>&1
27801
Martin v. Löwiseba40652007-08-30 20:10:57 +000027802# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027803# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000027804# values after options handling.
27805ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000027806This file was extended by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027807generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027808
27809 CONFIG_FILES = $CONFIG_FILES
27810 CONFIG_HEADERS = $CONFIG_HEADERS
27811 CONFIG_LINKS = $CONFIG_LINKS
27812 CONFIG_COMMANDS = $CONFIG_COMMANDS
27813 $ $0 $@
27814
Martin v. Löwiseba40652007-08-30 20:10:57 +000027815on `(hostname || uname -n) 2>/dev/null | sed 1q`
27816"
27817
Martin v. Löwis11437992002-04-12 09:54:03 +000027818_ACEOF
27819
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027820cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027821# Files that config.status was made for.
Ronald Oussoren450d5612009-06-08 21:12:41 +000027822config_files="$ac_config_files"
27823config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027824
Martin v. Löwiseba40652007-08-30 20:10:57 +000027825_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027826
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027827cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027828ac_cs_usage="\
27829\`$as_me' instantiates files from templates according to the
27830current configuration.
27831
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027832Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027833
27834 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000027835 -V, --version print version number and configuration settings, then exit
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027836 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000027837 -d, --debug don't remove temporary files
27838 --recheck update $as_me by reconfiguring in the same conditions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027839 --file=FILE[:TEMPLATE]
27840 instantiate the configuration file FILE
27841 --header=FILE[:TEMPLATE]
27842 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000027843
27844Configuration files:
27845$config_files
27846
27847Configuration headers:
27848$config_headers
27849
27850Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000027851
Martin v. Löwiseba40652007-08-30 20:10:57 +000027852_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027853cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027854ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000027855python config.status 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027856configured by $0, generated by GNU Autoconf 2.61,
27857 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000027858
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027859Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000027860This config.status script is free software; the Free Software Foundation
27861gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000027862
27863ac_pwd='$ac_pwd'
27864srcdir='$srcdir'
27865INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000027866_ACEOF
27867
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027868cat >>$CONFIG_STATUS <<\_ACEOF
27869# If no file are specified by the user, then we need to provide default
27870# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000027871ac_need_defaults=:
27872while test $# != 0
27873do
27874 case $1 in
27875 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000027876 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27877 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000027878 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000027879 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027880 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000027881 ac_option=$1
27882 ac_optarg=$2
27883 ac_shift=shift
27884 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027885 esac
27886
Skip Montanaro6dead952003-09-25 14:50:04 +000027887 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000027888 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000027889 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27890 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027891 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027892 echo "$ac_cs_version"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027893 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000027894 debug=: ;;
27895 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000027896 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027897 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027898 ac_need_defaults=false;;
27899 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000027900 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027901 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027902 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027903 --he | --h)
27904 # Conflict between --help and --header
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027905 { echo "$as_me: error: ambiguous option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000027906Try \`$0 --help' for more information." >&2
27907 { (exit 1); exit 1; }; };;
27908 --help | --hel | -h )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027909 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027910 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27911 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27912 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027913
27914 # This is an error.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027915 -*) { echo "$as_me: error: unrecognized option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000027916Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027917 { (exit 1); exit 1; }; } ;;
27918
Martin v. Löwiseba40652007-08-30 20:10:57 +000027919 *) ac_config_targets="$ac_config_targets $1"
27920 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027921
27922 esac
27923 shift
27924done
27925
Skip Montanaro6dead952003-09-25 14:50:04 +000027926ac_configure_extra_args=
27927
27928if $ac_cs_silent; then
27929 exec 6>/dev/null
27930 ac_configure_extra_args="$ac_configure_extra_args --silent"
27931fi
27932
27933_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027934cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027935if \$ac_cs_recheck; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027936 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27937 CONFIG_SHELL=$SHELL
Martin v. Löwiseba40652007-08-30 20:10:57 +000027938 export CONFIG_SHELL
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027939 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000027940fi
27941
Martin v. Löwis11437992002-04-12 09:54:03 +000027942_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027943cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027944exec 5>>config.log
27945{
27946 echo
27947 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27948## Running $as_me. ##
27949_ASBOX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027950 echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027951} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000027952
Martin v. Löwiseba40652007-08-30 20:10:57 +000027953_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027954cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027955_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027956
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027957cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027958
27959# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000027960for ac_config_target in $ac_config_targets
27961do
Martin v. Löwiseba40652007-08-30 20:10:57 +000027962 case $ac_config_target in
27963 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
27964 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
27965 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
27966 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000027967 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
27968 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027969 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
27970 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000027971 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027972
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027973 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27974echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027975 { (exit 1); exit 1; }; };;
27976 esac
27977done
27978
Martin v. Löwiseba40652007-08-30 20:10:57 +000027979
Martin v. Löwis11437992002-04-12 09:54:03 +000027980# If the user did not use the arguments to specify the items to instantiate,
27981# then the envvar interface is used. Set only those that are not.
27982# We use the long form for the default assignment because of an extremely
27983# bizarre bug on SunOS 4.1.3.
27984if $ac_need_defaults; then
27985 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27986 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27987fi
27988
Skip Montanaro6dead952003-09-25 14:50:04 +000027989# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000027990# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000027991# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027992# Hook for its removal unless debugging.
27993# Note that there is a small window in which the directory will not be cleaned:
27994# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000027995$debug ||
27996{
Martin v. Löwiseba40652007-08-30 20:10:57 +000027997 tmp=
27998 trap 'exit_status=$?
27999 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
28000' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000028001 trap '{ (exit 1); exit 1; }' 1 2 13 15
28002}
Martin v. Löwis11437992002-04-12 09:54:03 +000028003# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000028004
Martin v. Löwis11437992002-04-12 09:54:03 +000028005{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028006 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000028007 test -n "$tmp" && test -d "$tmp"
28008} ||
28009{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028010 tmp=./conf$$-$RANDOM
28011 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000028012} ||
28013{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028014 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028015 { (exit 1); exit 1; }
28016}
28017
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028018#
28019# Set up the sed scripts for CONFIG_FILES section.
28020#
28021
28022# No need to generate the scripts if there are no CONFIG_FILES.
28023# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000028024if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000028025
28026_ACEOF
28027
Martin v. Löwiseba40652007-08-30 20:10:57 +000028028
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028029
Martin v. Löwiseba40652007-08-30 20:10:57 +000028030ac_delim='%!_!# '
28031for ac_last_try in false false false false false :; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028032 cat >conf$$subs.sed <<_ACEOF
28033SHELL!$SHELL$ac_delim
28034PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
28035PACKAGE_NAME!$PACKAGE_NAME$ac_delim
28036PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
28037PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
28038PACKAGE_STRING!$PACKAGE_STRING$ac_delim
28039PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
28040exec_prefix!$exec_prefix$ac_delim
28041prefix!$prefix$ac_delim
28042program_transform_name!$program_transform_name$ac_delim
28043bindir!$bindir$ac_delim
28044sbindir!$sbindir$ac_delim
28045libexecdir!$libexecdir$ac_delim
28046datarootdir!$datarootdir$ac_delim
28047datadir!$datadir$ac_delim
28048sysconfdir!$sysconfdir$ac_delim
28049sharedstatedir!$sharedstatedir$ac_delim
28050localstatedir!$localstatedir$ac_delim
28051includedir!$includedir$ac_delim
28052oldincludedir!$oldincludedir$ac_delim
28053docdir!$docdir$ac_delim
28054infodir!$infodir$ac_delim
28055htmldir!$htmldir$ac_delim
28056dvidir!$dvidir$ac_delim
28057pdfdir!$pdfdir$ac_delim
28058psdir!$psdir$ac_delim
28059libdir!$libdir$ac_delim
28060localedir!$localedir$ac_delim
28061mandir!$mandir$ac_delim
28062DEFS!$DEFS$ac_delim
28063ECHO_C!$ECHO_C$ac_delim
28064ECHO_N!$ECHO_N$ac_delim
28065ECHO_T!$ECHO_T$ac_delim
28066LIBS!$LIBS$ac_delim
28067build_alias!$build_alias$ac_delim
28068host_alias!$host_alias$ac_delim
28069target_alias!$target_alias$ac_delim
28070VERSION!$VERSION$ac_delim
28071SOVERSION!$SOVERSION$ac_delim
28072CONFIG_ARGS!$CONFIG_ARGS$ac_delim
28073UNIVERSALSDK!$UNIVERSALSDK$ac_delim
28074ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
28075PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
28076PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
28077PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
28078PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
28079PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
28080FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
28081FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
28082FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
28083FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
28084FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
28085MACHDEP!$MACHDEP$ac_delim
28086SGI_ABI!$SGI_ABI$ac_delim
28087EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
28088EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
28089CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
28090EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
28091CC!$CC$ac_delim
28092CFLAGS!$CFLAGS$ac_delim
28093LDFLAGS!$LDFLAGS$ac_delim
28094CPPFLAGS!$CPPFLAGS$ac_delim
28095ac_ct_CC!$ac_ct_CC$ac_delim
28096EXEEXT!$EXEEXT$ac_delim
28097OBJEXT!$OBJEXT$ac_delim
28098CXX!$CXX$ac_delim
28099MAINCC!$MAINCC$ac_delim
28100CPP!$CPP$ac_delim
28101GREP!$GREP$ac_delim
28102EGREP!$EGREP$ac_delim
28103BUILDEXEEXT!$BUILDEXEEXT$ac_delim
28104LIBRARY!$LIBRARY$ac_delim
28105LDLIBRARY!$LDLIBRARY$ac_delim
28106DLLLIBRARY!$DLLLIBRARY$ac_delim
28107BLDLIBRARY!$BLDLIBRARY$ac_delim
28108LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
28109INSTSONAME!$INSTSONAME$ac_delim
28110RUNSHARED!$RUNSHARED$ac_delim
28111LINKCC!$LINKCC$ac_delim
28112GNULD!$GNULD$ac_delim
28113RANLIB!$RANLIB$ac_delim
28114AR!$AR$ac_delim
28115ARFLAGS!$ARFLAGS$ac_delim
28116SVNVERSION!$SVNVERSION$ac_delim
28117INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
28118INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
28119INSTALL_DATA!$INSTALL_DATA$ac_delim
28120LN!$LN$ac_delim
28121OPT!$OPT$ac_delim
28122BASECFLAGS!$BASECFLAGS$ac_delim
28123UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
28124OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
28125LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
28126SO!$SO$ac_delim
28127LDSHARED!$LDSHARED$ac_delim
28128BLDSHARED!$BLDSHARED$ac_delim
28129CCSHARED!$CCSHARED$ac_delim
28130_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028131
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028132 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 +000028133 break
28134 elif $ac_last_try; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028135 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28136echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028137 { (exit 1); exit 1; }; }
28138 else
28139 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000028140 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000028141done
28142
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028143ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28144if test -n "$ac_eof"; then
28145 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28146 ac_eof=`expr $ac_eof + 1`
28147fi
28148
28149cat >>$CONFIG_STATUS <<_ACEOF
28150cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
28151/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000028152_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028153sed '
28154s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28155s/^/s,@/; s/!/@,|#_!!_#|/
28156:n
28157t n
28158s/'"$ac_delim"'$/,g/; t
28159s/$/\\/; p
28160N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28161' >>$CONFIG_STATUS <conf$$subs.sed
28162rm -f conf$$subs.sed
28163cat >>$CONFIG_STATUS <<_ACEOF
28164CEOF$ac_eof
Martin v. Löwiseba40652007-08-30 20:10:57 +000028165_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028166
28167
28168ac_delim='%!_!# '
28169for ac_last_try in false false false false false :; do
28170 cat >conf$$subs.sed <<_ACEOF
28171LINKFORSHARED!$LINKFORSHARED$ac_delim
28172CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
28173SHLIBS!$SHLIBS$ac_delim
28174USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
28175SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
28176USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
28177LDLAST!$LDLAST$ac_delim
28178THREADOBJ!$THREADOBJ$ac_delim
28179DLINCLDIR!$DLINCLDIR$ac_delim
28180DYNLOADFILE!$DYNLOADFILE$ac_delim
28181MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
28182TRUE!$TRUE$ac_delim
28183LIBOBJS!$LIBOBJS$ac_delim
28184HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
28185HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
28186HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
28187HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
28188HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
28189LIBM!$LIBM$ac_delim
28190LIBC!$LIBC$ac_delim
28191UNICODE_OBJS!$UNICODE_OBJS$ac_delim
28192THREADHEADERS!$THREADHEADERS$ac_delim
28193SRCDIRS!$SRCDIRS$ac_delim
28194LTLIBOBJS!$LTLIBOBJS$ac_delim
28195_ACEOF
28196
28197 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 24; then
28198 break
28199 elif $ac_last_try; then
28200 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28201echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028202 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028203 else
28204 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28205 fi
28206done
28207
28208ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28209if test -n "$ac_eof"; then
28210 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28211 ac_eof=`expr $ac_eof + 1`
28212fi
28213
28214cat >>$CONFIG_STATUS <<_ACEOF
28215cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
28216/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Martin v. Löwiseba40652007-08-30 20:10:57 +000028217_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028218sed '
28219s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28220s/^/s,@/; s/!/@,|#_!!_#|/
28221:n
28222t n
28223s/'"$ac_delim"'$/,g/; t
28224s/$/\\/; p
28225N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28226' >>$CONFIG_STATUS <conf$$subs.sed
28227rm -f conf$$subs.sed
28228cat >>$CONFIG_STATUS <<_ACEOF
28229:end
28230s/|#_!!_#|//g
28231CEOF$ac_eof
28232_ACEOF
28233
Martin v. Löwiseba40652007-08-30 20:10:57 +000028234
28235# VPATH may cause trouble with some makes, so we remove $(srcdir),
28236# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28237# trailing colons and then remove the whole line if VPATH becomes empty
28238# (actually we leave an empty line to preserve line numbers).
28239if test "x$srcdir" = x.; then
28240 ac_vpsub='/^[ ]*VPATH[ ]*=/{
28241s/:*\$(srcdir):*/:/
28242s/:*\${srcdir}:*/:/
28243s/:*@srcdir@:*/:/
28244s/^\([^=]*=[ ]*\):*/\1/
28245s/:*$//
28246s/^[^=]*=[ ]*$//
28247}'
28248fi
28249
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028250cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028251fi # test -n "$CONFIG_FILES"
28252
Martin v. Löwiseba40652007-08-30 20:10:57 +000028253
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028254for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Martin v. Löwiseba40652007-08-30 20:10:57 +000028255do
28256 case $ac_tag in
28257 :[FHLC]) ac_mode=$ac_tag; continue;;
28258 esac
28259 case $ac_mode$ac_tag in
28260 :[FHL]*:*);;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028261 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
28262echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028263 { (exit 1); exit 1; }; };;
28264 :[FH]-) ac_tag=-:-;;
28265 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28266 esac
28267 ac_save_IFS=$IFS
28268 IFS=:
28269 set x $ac_tag
28270 IFS=$ac_save_IFS
28271 shift
28272 ac_file=$1
28273 shift
28274
28275 case $ac_mode in
28276 :L) ac_source=$1;;
28277 :[FH])
28278 ac_file_inputs=
28279 for ac_f
28280 do
28281 case $ac_f in
28282 -) ac_f="$tmp/stdin";;
28283 *) # Look for the file first in the build tree, then in the source tree
28284 # (if the path is not absolute). The absolute path cannot be DOS-style,
28285 # because $ac_f cannot contain `:'.
28286 test -f "$ac_f" ||
28287 case $ac_f in
28288 [\\/$]*) false;;
28289 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28290 esac ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028291 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
28292echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028293 { (exit 1); exit 1; }; };;
28294 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028295 ac_file_inputs="$ac_file_inputs $ac_f"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028296 done
28297
28298 # Let's still pretend it is `configure' which instantiates (i.e., don't
28299 # use $as_me), people would be surprised to read:
28300 # /* config.h. Generated by config.status. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028301 configure_input="Generated from "`IFS=:
28302 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Martin v. Löwiseba40652007-08-30 20:10:57 +000028303 if test x"$ac_file" != x-; then
28304 configure_input="$ac_file. $configure_input"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028305 { echo "$as_me:$LINENO: creating $ac_file" >&5
28306echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028307 fi
28308
28309 case $ac_tag in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028310 *:-:* | *:-) cat >"$tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028311 esac
28312 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028313 esac
28314
Martin v. Löwiseba40652007-08-30 20:10:57 +000028315 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028316$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028317 X"$ac_file" : 'X\(//\)[^/]' \| \
28318 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000028319 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028320echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028321 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28322 s//\1/
28323 q
28324 }
28325 /^X\(\/\/\)[^/].*/{
28326 s//\1/
28327 q
28328 }
28329 /^X\(\/\/\)$/{
28330 s//\1/
28331 q
28332 }
28333 /^X\(\/\).*/{
28334 s//\1/
28335 q
28336 }
28337 s/.*/./; q'`
28338 { as_dir="$ac_dir"
28339 case $as_dir in #(
28340 -*) as_dir=./$as_dir;;
28341 esac
28342 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000028343 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000028344 while :; do
28345 case $as_dir in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028346 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Martin v. Löwiseba40652007-08-30 20:10:57 +000028347 *) as_qdir=$as_dir;;
28348 esac
28349 as_dirs="'$as_qdir' $as_dirs"
28350 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000028351$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028352 X"$as_dir" : 'X\(//\)[^/]' \| \
28353 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000028354 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028355echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028356 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28357 s//\1/
28358 q
28359 }
28360 /^X\(\/\/\)[^/].*/{
28361 s//\1/
28362 q
28363 }
28364 /^X\(\/\/\)$/{
28365 s//\1/
28366 q
28367 }
28368 /^X\(\/\).*/{
28369 s//\1/
28370 q
28371 }
28372 s/.*/./; q'`
28373 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000028374 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000028375 test -z "$as_dirs" || eval "mkdir $as_dirs"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028376 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
28377echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000028378 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028379 ac_builddir=.
28380
Martin v. Löwiseba40652007-08-30 20:10:57 +000028381case "$ac_dir" in
28382.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28383*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028384 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028385 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028386 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028387 case $ac_top_builddir_sub in
28388 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28389 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28390 esac ;;
28391esac
28392ac_abs_top_builddir=$ac_pwd
28393ac_abs_builddir=$ac_pwd$ac_dir_suffix
28394# for backward compatibility:
28395ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000028396
28397case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028398 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000028399 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000028400 ac_top_srcdir=$ac_top_builddir_sub
28401 ac_abs_top_srcdir=$ac_pwd ;;
28402 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000028403 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028404 ac_top_srcdir=$srcdir
28405 ac_abs_top_srcdir=$srcdir ;;
28406 *) # Relative name.
28407 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28408 ac_top_srcdir=$ac_top_build_prefix$srcdir
28409 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028410esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028411ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000028412
Martin v. Löwis11437992002-04-12 09:54:03 +000028413
Martin v. Löwiseba40652007-08-30 20:10:57 +000028414 case $ac_mode in
28415 :F)
28416 #
28417 # CONFIG_FILE
28418 #
Martin v. Löwis11437992002-04-12 09:54:03 +000028419
28420 case $INSTALL in
28421 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028422 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028423 esac
Brett Cannon19fab762007-06-02 03:02:29 +000028424_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028425
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028426cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028427# If the template does not know about datarootdir, expand it.
28428# FIXME: This hack should be removed a few years after 2.60.
28429ac_datarootdir_hack=; ac_datarootdir_seen=
28430
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028431case `sed -n '/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000028432 p
28433 q
28434}
28435/@datadir@/p
28436/@docdir@/p
28437/@infodir@/p
28438/@localedir@/p
28439/@mandir@/p
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028440' $ac_file_inputs` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028441*datarootdir*) ac_datarootdir_seen=yes;;
28442*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028443 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28444echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028445_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028446cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028447 ac_datarootdir_hack='
28448 s&@datadir@&$datadir&g
28449 s&@docdir@&$docdir&g
28450 s&@infodir@&$infodir&g
28451 s&@localedir@&$localedir&g
28452 s&@mandir@&$mandir&g
28453 s&\\\${datarootdir}&$datarootdir&g' ;;
28454esac
28455_ACEOF
28456
28457# Neutralize VPATH when `$srcdir' = `.'.
28458# Shell code in configure.ac might set extrasub.
28459# FIXME: do we really want to maintain this feature?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028460cat >>$CONFIG_STATUS <<_ACEOF
28461 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028462$extrasub
28463_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028464cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028465:t
28466/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028467s&@configure_input@&$configure_input&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000028468s&@top_builddir@&$ac_top_builddir_sub&;t t
28469s&@srcdir@&$ac_srcdir&;t t
28470s&@abs_srcdir@&$ac_abs_srcdir&;t t
28471s&@top_srcdir@&$ac_top_srcdir&;t t
28472s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28473s&@builddir@&$ac_builddir&;t t
28474s&@abs_builddir@&$ac_abs_builddir&;t t
28475s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28476s&@INSTALL@&$ac_INSTALL&;t t
28477$ac_datarootdir_hack
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028478" $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 +000028479
Martin v. Löwiseba40652007-08-30 20:10:57 +000028480test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28481 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28482 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028483 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028484which seems to be undefined. Please make sure it is defined." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028485echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028486which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028487
Martin v. Löwiseba40652007-08-30 20:10:57 +000028488 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028489 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028490 -) cat "$tmp/out"; rm -f "$tmp/out";;
28491 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
28492 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028493 ;;
28494 :H)
28495 #
28496 # CONFIG_HEADER
28497 #
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028498_ACEOF
28499
28500# Transform confdefs.h into a sed script `conftest.defines', that
28501# substitutes the proper values into config.h.in to produce config.h.
28502rm -f conftest.defines conftest.tail
28503# First, append a space to every undef/define line, to ease matching.
28504echo 's/$/ /' >conftest.defines
28505# Then, protect against being on the right side of a sed subst, or in
28506# an unquoted here document, in config.status. If some macros were
28507# called several times there might be several #defines for the same
28508# symbol, which is useless. But do not sort them, since the last
28509# AC_DEFINE must be honored.
28510ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28511# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
28512# NAME is the cpp macro being defined, VALUE is the value it is being given.
28513# PARAMS is the parameter list in the macro definition--in most cases, it's
28514# just an empty string.
28515ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
28516ac_dB='\\)[ (].*,\\1define\\2'
28517ac_dC=' '
28518ac_dD=' ,'
28519
28520uniq confdefs.h |
28521 sed -n '
28522 t rset
28523 :rset
28524 s/^[ ]*#[ ]*define[ ][ ]*//
28525 t ok
28526 d
28527 :ok
28528 s/[\\&,]/\\&/g
28529 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
28530 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
28531 ' >>conftest.defines
28532
28533# Remove the space that was appended to ease matching.
28534# Then replace #undef with comments. This is necessary, for
28535# example, in the case of _POSIX_SOURCE, which is predefined and required
28536# on some systems where configure will not decide to define it.
28537# (The regexp can be short, since the line contains either #define or #undef.)
28538echo 's/ $//
28539s,^[ #]*u.*,/* & */,' >>conftest.defines
28540
28541# Break up conftest.defines:
28542ac_max_sed_lines=50
28543
28544# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28545# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28546# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28547# et cetera.
28548ac_in='$ac_file_inputs'
28549ac_out='"$tmp/out1"'
28550ac_nxt='"$tmp/out2"'
28551
28552while :
28553do
28554 # Write a here document:
28555 cat >>$CONFIG_STATUS <<_ACEOF
28556 # First, check the format of the line:
28557 cat >"\$tmp/defines.sed" <<\\CEOF
28558/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
28559/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
28560b
28561:def
28562_ACEOF
28563 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
28564 echo 'CEOF
28565 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
28566 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
28567 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
28568 grep . conftest.tail >/dev/null || break
28569 rm -f conftest.defines
28570 mv conftest.tail conftest.defines
28571done
28572rm -f conftest.defines conftest.tail
28573
28574echo "ac_result=$ac_in" >>$CONFIG_STATUS
28575cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028576 if test x"$ac_file" != x-; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028577 echo "/* $configure_input */" >"$tmp/config.h"
28578 cat "$ac_result" >>"$tmp/config.h"
28579 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
28580 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28581echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028582 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028583 rm -f $ac_file
28584 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000028585 fi
28586 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028587 echo "/* $configure_input */"
28588 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000028589 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028590 rm -f "$tmp/out12"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028591 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000028592
Martin v. Löwiseba40652007-08-30 20:10:57 +000028593
28594 esac
28595
28596done # for ac_tag
28597
Guido van Rossum627b2d71993-12-24 10:39:16 +000028598
Martin v. Löwis11437992002-04-12 09:54:03 +000028599{ (exit 0); exit 0; }
28600_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028601chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000028602ac_clean_files=$ac_clean_files_save
28603
28604
28605# configure is writing to config.log, and then calls config.status.
28606# config.status does its own redirection, appending to config.log.
28607# Unfortunately, on DOS this fails, as config.log is still kept open
28608# by configure, so config.status won't be able to write to it; its
28609# output is simply discarded. So we exec the FD to /dev/null,
28610# effectively closing config.log, so it can be properly (re)opened and
28611# appended to by config.status. When coming back to configure, we
28612# need to make the FD available again.
28613if test "$no_create" != yes; then
28614 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000028615 ac_config_status_args=
28616 test "$silent" = yes &&
28617 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000028618 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000028619 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000028620 exec 5>>config.log
28621 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28622 # would make configure fail if this is the last instruction.
28623 $ac_cs_success || { (exit 1); exit 1; }
28624fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000028625
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028626
Martin v. Löwisf7afe952006-04-14 15:16:15 +000028627echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028628if test ! -f Modules/Setup
28629then
28630 cp $srcdir/Modules/Setup.dist Modules/Setup
28631fi
28632
Martin v. Löwisf7afe952006-04-14 15:16:15 +000028633echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028634if test ! -f Modules/Setup.local
28635then
28636 echo "# Edit this file for local setup changes" >Modules/Setup.local
28637fi
28638
28639echo "creating Makefile"
28640$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
28641 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000028642 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000028643
28644case $ac_sys_system in
28645BeOS)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028646 { echo "$as_me:$LINENO: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000028647
28648 Support for BeOS is deprecated as of Python 2.6.
28649 See PEP 11 for the gory details.
28650 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028651echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000028652
28653 Support for BeOS is deprecated as of Python 2.6.
28654 See PEP 11 for the gory details.
28655 " >&2;}
28656 ;;
28657*) ;;
28658esac
28659
Neil Schemenauerc761fc82001-02-19 04:50:49 +000028660mv config.c Modules