blob: 1fe54539206d333af547015e96b5fe98d5c3baa2 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Mark Dickinson59dc89e2009-12-13 21:06:06 +00002# From configure.in Revision: 76644 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004# Generated by GNU Autoconf 2.61 for python 2.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandl464432d2009-05-20 18:24:08 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Martin v. Löwiseba40652007-08-30 20:10:57 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Martin v. Löwiseba40652007-08-30 20:10:57 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000022 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000025else
Martin v. Löwiseba40652007-08-30 20:10:57 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
31
Skip Montanaro6dead952003-09-25 14:50:04 +000032
Martin v. Löwis11437992002-04-12 09:54:03 +000033
34
Martin v. Löwiseba40652007-08-30 20:10:57 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
49 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
53 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Martin v. Löwiseba40652007-08-30 20:10:57 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Martin v. Löwiseba40652007-08-30 20:10:57 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000069as_nl='
70'
Martin v. Löwiseba40652007-08-30 20:10:57 +000071IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Martin v. Löwiseba40652007-08-30 20:10:57 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Martin v. Löwiseba40652007-08-30 20:10:57 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000093 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +000094 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
115 fi
116done
Martin v. Löwiseba40652007-08-30 20:10:57 +0000117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000138echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +0000139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000164 if test $as_have_required = yes && (eval ":
Martin v. Löwiseba40652007-08-30 20:10:57 +0000165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Martin v. Löwiseba40652007-08-30 20:10:57 +0000247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Martin v. Löwiseba40652007-08-30 20:10:57 +0000268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Skip Montanaro89e975f2007-08-22 19:05:21 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaro89e975f2007-08-22 19:05:21 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Martin v. Löwiseba40652007-08-30 20:10:57 +0000351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
Martin v. Löwiseba40652007-08-30 20:10:57 +0000422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000456 chmod +x "$as_me.lineno" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Martin v. Löwiseba40652007-08-30 20:10:57 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000485
Martin v. Löwiseba40652007-08-30 20:10:57 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000498 mkdir conf$$.dir
Martin v. Löwiseba40652007-08-30 20:10:57 +0000499fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +0000511else
512 as_ln_s='cp -p'
513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Martin v. Löwiseba40652007-08-30 20:10:57 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000535 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +0000536 else
537 case $1 in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000538 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Martin v. Löwiseba40652007-08-30 20:10:57 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Martin v. Löwis174440b2008-10-03 08:59:41 +0000578PACKAGE_VERSION='2.7'
579PACKAGE_STRING='python 2.7'
Georg Brandl464432d2009-05-20 18:24:08 +0000580PACKAGE_BUGREPORT='http://bugs.python.org/'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000611#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000619ac_subst_vars='SHELL
Alexandre Vassalottia2db6872009-07-17 07:46:46 +0000620PATH_SEPARATOR
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
660ARCH_RUN_32BIT
Ronald Oussoren92919a62009-12-24 13:30:58 +0000661LIPO_32BIT_FLAGS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000662PYTHONFRAMEWORK
663PYTHONFRAMEWORKIDENTIFIER
664PYTHONFRAMEWORKDIR
665PYTHONFRAMEWORKPREFIX
666PYTHONFRAMEWORKINSTALLDIR
667FRAMEWORKINSTALLFIRST
668FRAMEWORKINSTALLLAST
669FRAMEWORKALTINSTALLFIRST
670FRAMEWORKALTINSTALLLAST
671FRAMEWORKUNIXTOOLSPREFIX
672MACHDEP
673SGI_ABI
674EXTRAPLATDIR
675EXTRAMACHDEPPATH
676CONFIGURE_MACOSX_DEPLOYMENT_TARGET
677EXPORT_MACOSX_DEPLOYMENT_TARGET
678CC
679CFLAGS
680LDFLAGS
681CPPFLAGS
682ac_ct_CC
683EXEEXT
684OBJEXT
685CXX
686MAINCC
687CPP
688GREP
689EGREP
690BUILDEXEEXT
691LIBRARY
692LDLIBRARY
693DLLLIBRARY
694BLDLIBRARY
695LDLIBRARYDIR
696INSTSONAME
697RUNSHARED
698LINKCC
699GNULD
700RANLIB
701AR
702ARFLAGS
703SVNVERSION
704INSTALL_PROGRAM
705INSTALL_SCRIPT
706INSTALL_DATA
707LN
708OPT
709BASECFLAGS
710UNIVERSAL_ARCH_FLAGS
711OTHER_LIBTOOL_OPT
712LIBTOOL_CRUFT
713SO
714LDSHARED
715BLDSHARED
716CCSHARED
717LINKFORSHARED
718CFLAGSFORSHARED
719SHLIBS
720USE_SIGNAL_MODULE
721SIGNAL_OBJS
722USE_THREAD_MODULE
723LDLAST
724THREADOBJ
725DLINCLDIR
726DYNLOADFILE
727MACHDEP_OBJS
728TRUE
729LIBOBJS
730HAVE_GETHOSTBYNAME_R_6_ARG
731HAVE_GETHOSTBYNAME_R_5_ARG
732HAVE_GETHOSTBYNAME_R_3_ARG
733HAVE_GETHOSTBYNAME_R
734HAVE_GETHOSTBYNAME
735LIBM
736LIBC
737UNICODE_OBJS
738THREADHEADERS
739SRCDIRS
740LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000741ac_subst_files=''
Martin v. Löwiseba40652007-08-30 20:10:57 +0000742 ac_precious_vars='build_alias
743host_alias
744target_alias
745CC
746CFLAGS
747LDFLAGS
748LIBS
749CPPFLAGS
750CPP'
751
Guido van Rossum627b2d71993-12-24 10:39:16 +0000752
Guido van Rossum7f43da71994-08-01 12:15:30 +0000753# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000754ac_init_help=
755ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000756# The variables have the same names as the options, with
757# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000758cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000759exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000760no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000761no_recursion=
762prefix=NONE
763program_prefix=NONE
764program_suffix=NONE
765program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000766silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000767site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000768srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000769verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000770x_includes=NONE
771x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000772
773# Installation directory options.
774# These are left unexpanded so users can "make install exec_prefix=/foo"
775# and all the variables that are supposed to be based on exec_prefix
776# by default will actually change.
777# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000778# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000779bindir='${exec_prefix}/bin'
780sbindir='${exec_prefix}/sbin'
781libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000782datarootdir='${prefix}/share'
783datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000784sysconfdir='${prefix}/etc'
785sharedstatedir='${prefix}/com'
786localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000787includedir='${prefix}/include'
788oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000789docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
790infodir='${datarootdir}/info'
791htmldir='${docdir}'
792dvidir='${docdir}'
793pdfdir='${docdir}'
794psdir='${docdir}'
795libdir='${exec_prefix}/lib'
796localedir='${datarootdir}/locale'
797mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000798
Guido van Rossum7f43da71994-08-01 12:15:30 +0000799ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000800ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000801for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000802do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803 # If the previous option needs an argument, assign it.
804 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000805 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000806 ac_prev=
807 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000808 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000809
Martin v. Löwiseba40652007-08-30 20:10:57 +0000810 case $ac_option in
811 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
812 *) ac_optarg=yes ;;
813 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000814
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000815 # Accept the important Cygnus configure options, so we can diagnose typos.
816
Martin v. Löwiseba40652007-08-30 20:10:57 +0000817 case $ac_dashdash$ac_option in
818 --)
819 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000820
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000821 -bindir | --bindir | --bindi | --bind | --bin | --bi)
822 ac_prev=bindir ;;
823 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000824 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000825
826 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000827 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000828 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000829 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000830
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000831 -cache-file | --cache-file | --cache-fil | --cache-fi \
832 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
833 ac_prev=cache_file ;;
834 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
835 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000836 cache_file=$ac_optarg ;;
837
838 --config-cache | -C)
839 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000840
Martin v. Löwiseba40652007-08-30 20:10:57 +0000841 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000842 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000843 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000844 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000845
Martin v. Löwiseba40652007-08-30 20:10:57 +0000846 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
847 | --dataroo | --dataro | --datar)
848 ac_prev=datarootdir ;;
849 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
850 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
851 datarootdir=$ac_optarg ;;
852
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853 -disable-* | --disable-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000854 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000855 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000856 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
857 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000858 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000859 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
860 eval enable_$ac_feature=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000861
862 -docdir | --docdir | --docdi | --doc | --do)
863 ac_prev=docdir ;;
864 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
865 docdir=$ac_optarg ;;
866
867 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
868 ac_prev=dvidir ;;
869 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
870 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871
872 -enable-* | --enable-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000873 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000875 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
876 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000877 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000878 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
879 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
882 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
883 | --exec | --exe | --ex)
884 ac_prev=exec_prefix ;;
885 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
886 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
887 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000888 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889
890 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000891 # Obsolete; use --with-gas.
892 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000893
Martin v. Löwis11437992002-04-12 09:54:03 +0000894 -help | --help | --hel | --he | -h)
895 ac_init_help=long ;;
896 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
897 ac_init_help=recursive ;;
898 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
899 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900
901 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000902 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000904 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905
Martin v. Löwiseba40652007-08-30 20:10:57 +0000906 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
907 ac_prev=htmldir ;;
908 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
909 | --ht=*)
910 htmldir=$ac_optarg ;;
911
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000912 -includedir | --includedir | --includedi | --included | --include \
913 | --includ | --inclu | --incl | --inc)
914 ac_prev=includedir ;;
915 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
916 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000917 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000918
919 -infodir | --infodir | --infodi | --infod | --info | --inf)
920 ac_prev=infodir ;;
921 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000922 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000923
924 -libdir | --libdir | --libdi | --libd)
925 ac_prev=libdir ;;
926 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000927 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000928
929 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
930 | --libexe | --libex | --libe)
931 ac_prev=libexecdir ;;
932 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
933 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000934 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935
Martin v. Löwiseba40652007-08-30 20:10:57 +0000936 -localedir | --localedir | --localedi | --localed | --locale)
937 ac_prev=localedir ;;
938 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
939 localedir=$ac_optarg ;;
940
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000941 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000942 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943 ac_prev=localstatedir ;;
944 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000945 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000946 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000947
948 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
949 ac_prev=mandir ;;
950 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000952
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000954 # Obsolete; use --without-fp.
955 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000956
957 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000958 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000959 no_create=yes ;;
960
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000961 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
962 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
963 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000964
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000965 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
966 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
967 | --oldin | --oldi | --old | --ol | --o)
968 ac_prev=oldincludedir ;;
969 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
970 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
971 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000972 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000973
Guido van Rossum7f43da71994-08-01 12:15:30 +0000974 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
975 ac_prev=prefix ;;
976 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000977 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000978
979 -program-prefix | --program-prefix | --program-prefi | --program-pref \
980 | --program-pre | --program-pr | --program-p)
981 ac_prev=program_prefix ;;
982 -program-prefix=* | --program-prefix=* | --program-prefi=* \
983 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000984 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000985
986 -program-suffix | --program-suffix | --program-suffi | --program-suff \
987 | --program-suf | --program-su | --program-s)
988 ac_prev=program_suffix ;;
989 -program-suffix=* | --program-suffix=* | --program-suffi=* \
990 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000991 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992
993 -program-transform-name | --program-transform-name \
994 | --program-transform-nam | --program-transform-na \
995 | --program-transform-n | --program-transform- \
996 | --program-transform | --program-transfor \
997 | --program-transfo | --program-transf \
998 | --program-trans | --program-tran \
999 | --progr-tra | --program-tr | --program-t)
1000 ac_prev=program_transform_name ;;
1001 -program-transform-name=* | --program-transform-name=* \
1002 | --program-transform-nam=* | --program-transform-na=* \
1003 | --program-transform-n=* | --program-transform-=* \
1004 | --program-transform=* | --program-transfor=* \
1005 | --program-transfo=* | --program-transf=* \
1006 | --program-trans=* | --program-tran=* \
1007 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001008 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009
Martin v. Löwiseba40652007-08-30 20:10:57 +00001010 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1011 ac_prev=pdfdir ;;
1012 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1013 pdfdir=$ac_optarg ;;
1014
1015 -psdir | --psdir | --psdi | --psd | --ps)
1016 ac_prev=psdir ;;
1017 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1018 psdir=$ac_optarg ;;
1019
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1021 | -silent | --silent | --silen | --sile | --sil)
1022 silent=yes ;;
1023
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001024 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1025 ac_prev=sbindir ;;
1026 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1027 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001029
1030 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1031 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1032 | --sharedst | --shareds | --shared | --share | --shar \
1033 | --sha | --sh)
1034 ac_prev=sharedstatedir ;;
1035 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1036 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1037 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1038 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001041 -site | --site | --sit)
1042 ac_prev=site ;;
1043 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001045
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1047 ac_prev=srcdir ;;
1048 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001049 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001050
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1052 | --syscon | --sysco | --sysc | --sys | --sy)
1053 ac_prev=sysconfdir ;;
1054 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1055 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001057
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001062
1063 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1064 verbose=yes ;;
1065
Martin v. Löwis11437992002-04-12 09:54:03 +00001066 -version | --version | --versio | --versi | --vers | -V)
1067 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001068
1069 -with-* | --with-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001070 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001071 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001072 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1073 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001075 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1076 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077
1078 -without-* | --without-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001079 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001080 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001081 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1082 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001084 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1085 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001087 --x)
1088 # Obsolete; use --with-x.
1089 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090
1091 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1092 | --x-incl | --x-inc | --x-in | --x-i)
1093 ac_prev=x_includes ;;
1094 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1095 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097
1098 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1099 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1100 ac_prev=x_libraries ;;
1101 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1102 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001105 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001106Try \`$0 --help' for more information." >&2
1107 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108 ;;
1109
Martin v. Löwis11437992002-04-12 09:54:03 +00001110 *=*)
1111 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1112 # Reject names that are not valid shell variable names.
1113 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001114 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001116 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 export $ac_envvar ;;
1118
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001119 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 # FIXME: should be removed in autoconf 3.0.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001121 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001122 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001123 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001125 ;;
1126
1127 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001128done
1129
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001131 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001132 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134fi
1135
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001136# Be sure to have absolute directory names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001137for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1138 datadir sysconfdir sharedstatedir localstatedir includedir \
1139 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1140 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001141do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001142 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001144 [\\/$]* | ?:[\\/]* ) continue;;
1145 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001147 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001148 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001149done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001150
Martin v. Löwis11437992002-04-12 09:54:03 +00001151# There might be people who depend on the old broken behavior: `$host'
1152# used to hold the argument of --host etc.
1153# FIXME: To remove some day.
1154build=$build_alias
1155host=$host_alias
1156target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001157
Martin v. Löwis11437992002-04-12 09:54:03 +00001158# FIXME: To remove some day.
1159if test "x$host_alias" != x; then
1160 if test "x$build_alias" = x; then
1161 cross_compiling=maybe
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001162 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 If a cross compiler is detected then cross compile mode will be used." >&2
1164 elif test "x$build_alias" != "x$host_alias"; then
1165 cross_compiling=yes
1166 fi
1167fi
1168
1169ac_tool_prefix=
1170test -n "$host_alias" && ac_tool_prefix=$host_alias-
1171
1172test "$silent" = yes && exec 6>/dev/null
1173
Guido van Rossum627b2d71993-12-24 10:39:16 +00001174
Martin v. Löwiseba40652007-08-30 20:10:57 +00001175ac_pwd=`pwd` && test -n "$ac_pwd" &&
1176ac_ls_di=`ls -di .` &&
1177ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001178 { echo "$as_me: error: Working directory cannot be determined" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001179 { (exit 1); exit 1; }; }
1180test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001181 { echo "$as_me: error: pwd does not report name of working directory" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001182 { (exit 1); exit 1; }; }
1183
1184
Guido van Rossum627b2d71993-12-24 10:39:16 +00001185# Find the source files, if location was not specified.
1186if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001188 # Try the directory containing this script, then the parent directory.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001189 ac_confdir=`$as_dirname -- "$0" ||
1190$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1191 X"$0" : 'X\(//\)[^/]' \| \
1192 X"$0" : 'X\(//\)$' \| \
1193 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1194echo X"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001195 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1196 s//\1/
1197 q
1198 }
1199 /^X\(\/\/\)[^/].*/{
1200 s//\1/
1201 q
1202 }
1203 /^X\(\/\/\)$/{
1204 s//\1/
1205 q
1206 }
1207 /^X\(\/\).*/{
1208 s//\1/
1209 q
1210 }
1211 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001212 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001213 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001214 srcdir=..
1215 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001216else
1217 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001218fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001219if test ! -r "$srcdir/$ac_unique_file"; then
1220 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001221 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001222 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001223fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001224ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1225ac_abs_confdir=`(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001226 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001227 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001228 pwd)`
1229# When building in place, set srcdir=.
1230if test "$ac_abs_confdir" = "$ac_pwd"; then
1231 srcdir=.
1232fi
1233# Remove unnecessary trailing slashes from srcdir.
1234# Double slashes in file names in object file debugging info
1235# mess up M-x gdb in Emacs.
1236case $srcdir in
1237*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1238esac
1239for ac_var in $ac_precious_vars; do
1240 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1241 eval ac_env_${ac_var}_value=\$${ac_var}
1242 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1243 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1244done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001245
Martin v. Löwis11437992002-04-12 09:54:03 +00001246#
1247# Report the --help message.
1248#
1249if test "$ac_init_help" = "long"; then
1250 # Omit some internal or obsolete options to make the list less imposing.
1251 # This message is too long to be a string in the A/UX 3.1 sh.
1252 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001253\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001254
1255Usage: $0 [OPTION]... [VAR=VALUE]...
1256
1257To assign environment variables (e.g., CC, CFLAGS...), specify them as
1258VAR=VALUE. See below for descriptions of some of the useful variables.
1259
1260Defaults for the options are specified in brackets.
1261
1262Configuration:
1263 -h, --help display this help and exit
1264 --help=short display options specific to this package
1265 --help=recursive display the short help of all the included packages
1266 -V, --version display version information and exit
1267 -q, --quiet, --silent do not print \`checking...' messages
1268 --cache-file=FILE cache test results in FILE [disabled]
1269 -C, --config-cache alias for \`--cache-file=config.cache'
1270 -n, --no-create do not create output files
1271 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1272
Martin v. Löwis11437992002-04-12 09:54:03 +00001273Installation directories:
1274 --prefix=PREFIX install architecture-independent files in PREFIX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001275 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001276 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001277 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001278
1279By default, \`make install' will install all the files in
1280\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1281an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1282for instance \`--prefix=\$HOME'.
1283
1284For better control, use the options below.
1285
1286Fine tuning of the installation directories:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001287 --bindir=DIR user executables [EPREFIX/bin]
1288 --sbindir=DIR system admin executables [EPREFIX/sbin]
1289 --libexecdir=DIR program executables [EPREFIX/libexec]
1290 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1291 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1292 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1293 --libdir=DIR object code libraries [EPREFIX/lib]
1294 --includedir=DIR C header files [PREFIX/include]
1295 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1296 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1297 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1298 --infodir=DIR info documentation [DATAROOTDIR/info]
1299 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1300 --mandir=DIR man documentation [DATAROOTDIR/man]
1301 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1302 --htmldir=DIR html documentation [DOCDIR]
1303 --dvidir=DIR dvi documentation [DOCDIR]
1304 --pdfdir=DIR pdf documentation [DOCDIR]
1305 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001306_ACEOF
1307
1308 cat <<\_ACEOF
1309_ACEOF
1310fi
1311
1312if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001313 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001314 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001315 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001316 cat <<\_ACEOF
1317
1318Optional Features:
1319 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1320 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001321 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001322 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001323 --enable-framework[=INSTALLDIR]
1324 Build (MacOSX|Darwin) framework
1325 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001326 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001327 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1328 --enable-ipv6 Enable ipv6 (with ipv4) support
1329 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001330 --enable-big-digits[=BITS]
1331 use big digits for Python longs [BITS=30]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001332 --enable-unicode[=ucs[24]]
1333 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001334
1335Optional Packages:
1336 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1337 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001338 --with-universal-archs=ARCH
1339 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001340 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001341 --with-framework-name=FRAMEWORK
1342 specify an alternate name of the framework built
1343 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001344 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001345 --with-cxx-main=<compiler>
1346 compile main() and link python executable with C++
1347 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001348 --with-suffix=.exe set executable suffix
1349 --with-pydebug build with Py_DEBUG defined
1350 --with-libs='lib1 ...' link against additional libs
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001351 --with-system-ffi build _ctypes module using an installed ffi library
Benjamin Peterson867475c2009-04-29 20:36:25 +00001352 --with-dbmliborder=db1:db2:...
1353 order to check db backends for dbm. Valid value is a
1354 colon separated string with the backend names
1355 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001356 --with-signal-module disable/enable signal module
1357 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1358 --with(out)-threads[=DIRECTORY]
1359 disable/enable thread support
1360 --with(out)-thread[=DIRECTORY]
1361 deprecated; use --with(out)-threads
1362 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001363 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001364 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001365 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001366 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001367 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001368 --with-fpectl enable SIGFPE catching
1369 --with-libm=STRING math library
1370 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001371
1372Some influential environment variables:
1373 CC C compiler command
1374 CFLAGS C compiler flags
1375 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1376 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001377 LIBS libraries to pass to the linker, e.g. -l<library>
1378 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1379 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001380 CPP C preprocessor
1381
1382Use these variables to override the choices made by `configure' or to help
1383it to find libraries and programs with nonstandard names/locations.
1384
Georg Brandl464432d2009-05-20 18:24:08 +00001385Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001386_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001387ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001388fi
1389
1390if test "$ac_init_help" = "recursive"; then
1391 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001392 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001393 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001394 ac_builddir=.
1395
Martin v. Löwiseba40652007-08-30 20:10:57 +00001396case "$ac_dir" in
1397.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1398*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001399 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001400 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001401 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001402 case $ac_top_builddir_sub in
1403 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1404 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1405 esac ;;
1406esac
1407ac_abs_top_builddir=$ac_pwd
1408ac_abs_builddir=$ac_pwd$ac_dir_suffix
1409# for backward compatibility:
1410ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001411
1412case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001413 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001414 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001415 ac_top_srcdir=$ac_top_builddir_sub
1416 ac_abs_top_srcdir=$ac_pwd ;;
1417 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001418 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001419 ac_top_srcdir=$srcdir
1420 ac_abs_top_srcdir=$srcdir ;;
1421 *) # Relative name.
1422 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1423 ac_top_srcdir=$ac_top_build_prefix$srcdir
1424 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001425esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001426ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001427
Martin v. Löwiseba40652007-08-30 20:10:57 +00001428 cd "$ac_dir" || { ac_status=$?; continue; }
1429 # Check for guested configure.
1430 if test -f "$ac_srcdir/configure.gnu"; then
1431 echo &&
1432 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1433 elif test -f "$ac_srcdir/configure"; then
1434 echo &&
1435 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001436 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001437 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001438 fi || ac_status=$?
1439 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001440 done
1441fi
1442
Martin v. Löwiseba40652007-08-30 20:10:57 +00001443test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001444if $ac_init_version; then
1445 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001446python configure 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001447generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001448
Martin v. Löwiseba40652007-08-30 20:10:57 +00001449Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014502002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001451This configure script is free software; the Free Software Foundation
1452gives unlimited permission to copy, distribute and modify it.
1453_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001454 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001455fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001456cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001457This file contains any messages produced by compilers while
1458running configure, to aid debugging if configure makes a mistake.
1459
Martin v. Löwis174440b2008-10-03 08:59:41 +00001460It was created by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001461generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001462
1463 $ $0 $@
1464
1465_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001466exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001467{
1468cat <<_ASUNAME
1469## --------- ##
1470## Platform. ##
1471## --------- ##
1472
1473hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1474uname -m = `(uname -m) 2>/dev/null || echo unknown`
1475uname -r = `(uname -r) 2>/dev/null || echo unknown`
1476uname -s = `(uname -s) 2>/dev/null || echo unknown`
1477uname -v = `(uname -v) 2>/dev/null || echo unknown`
1478
1479/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1480/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1481
1482/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1483/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1484/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001485/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001486/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1487/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1488/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1489
1490_ASUNAME
1491
1492as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1493for as_dir in $PATH
1494do
1495 IFS=$as_save_IFS
1496 test -z "$as_dir" && as_dir=.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001497 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001498done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001499IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001500
1501} >&5
1502
1503cat >&5 <<_ACEOF
1504
1505
1506## ----------- ##
1507## Core tests. ##
1508## ----------- ##
1509
1510_ACEOF
1511
1512
1513# Keep a trace of the command line.
1514# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001515# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001516# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001517# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001518ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001519ac_configure_args0=
1520ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001521ac_must_keep_next=false
1522for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001523do
Skip Montanaro6dead952003-09-25 14:50:04 +00001524 for ac_arg
1525 do
1526 case $ac_arg in
1527 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1528 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1529 | -silent | --silent | --silen | --sile | --sil)
1530 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001531 *\'*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001532 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001533 esac
1534 case $ac_pass in
1535 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1536 2)
1537 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1538 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001539 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001540 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001541 case $ac_arg in
1542 *=* | --config-cache | -C | -disable-* | --disable-* \
1543 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1544 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1545 | -with-* | --with-* | -without-* | --without-* | --x)
1546 case "$ac_configure_args0 " in
1547 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1548 esac
1549 ;;
1550 -* ) ac_must_keep_next=true ;;
1551 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001552 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001553 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001554 ;;
1555 esac
1556 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001557done
Skip Montanaro6dead952003-09-25 14:50:04 +00001558$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1559$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 +00001560
1561# When interrupted or exit'd, cleanup temporary files, and complete
1562# config.log. We remove comments because anyway the quotes in there
1563# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001564# WARNING: Use '\'' to represent an apostrophe within the trap.
1565# 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 +00001566trap 'exit_status=$?
1567 # Save into config.log some information that might help in debugging.
1568 {
1569 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001570
Martin v. Löwis11437992002-04-12 09:54:03 +00001571 cat <<\_ASBOX
1572## ---------------- ##
1573## Cache variables. ##
1574## ---------------- ##
1575_ASBOX
1576 echo
1577 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001578(
1579 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1580 eval ac_val=\$$ac_var
1581 case $ac_val in #(
1582 *${as_nl}*)
1583 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001584 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1585echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001586 esac
1587 case $ac_var in #(
1588 _ | IFS | as_nl) ;; #(
1589 *) $as_unset $ac_var ;;
1590 esac ;;
1591 esac
1592 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001593 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001594 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1595 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001596 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001597 "s/'\''/'\''\\\\'\'''\''/g;
1598 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1599 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001600 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001601 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001602 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001603 esac |
1604 sort
1605)
Martin v. Löwis11437992002-04-12 09:54:03 +00001606 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001607
1608 cat <<\_ASBOX
1609## ----------------- ##
1610## Output variables. ##
1611## ----------------- ##
1612_ASBOX
1613 echo
1614 for ac_var in $ac_subst_vars
1615 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001616 eval ac_val=\$$ac_var
1617 case $ac_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001618 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001619 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001620 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001621 done | sort
1622 echo
1623
1624 if test -n "$ac_subst_files"; then
1625 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001626## ------------------- ##
1627## File substitutions. ##
1628## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001629_ASBOX
1630 echo
1631 for ac_var in $ac_subst_files
1632 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001633 eval ac_val=\$$ac_var
1634 case $ac_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001635 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001636 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001637 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001638 done | sort
1639 echo
1640 fi
1641
Martin v. Löwis11437992002-04-12 09:54:03 +00001642 if test -s confdefs.h; then
1643 cat <<\_ASBOX
1644## ----------- ##
1645## confdefs.h. ##
1646## ----------- ##
1647_ASBOX
1648 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001649 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001650 echo
1651 fi
1652 test "$ac_signal" != 0 &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001653 echo "$as_me: caught signal $ac_signal"
1654 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001655 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001656 rm -f core *.core core.conftest.* &&
1657 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001658 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001659' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001660for ac_signal in 1 2 13 15; do
1661 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1662done
1663ac_signal=0
1664
1665# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001666rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001667
1668# Predefined preprocessor variables.
1669
1670cat >>confdefs.h <<_ACEOF
1671#define PACKAGE_NAME "$PACKAGE_NAME"
1672_ACEOF
1673
1674
1675cat >>confdefs.h <<_ACEOF
1676#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1677_ACEOF
1678
1679
1680cat >>confdefs.h <<_ACEOF
1681#define PACKAGE_VERSION "$PACKAGE_VERSION"
1682_ACEOF
1683
1684
1685cat >>confdefs.h <<_ACEOF
1686#define PACKAGE_STRING "$PACKAGE_STRING"
1687_ACEOF
1688
1689
1690cat >>confdefs.h <<_ACEOF
1691#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1692_ACEOF
1693
1694
1695# Let the site file select an alternate cache file if it wants to.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001696# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001697if test -n "$CONFIG_SITE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001698 set x "$CONFIG_SITE"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001699elif test "x$prefix" != xNONE; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001700 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001701else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001702 set x "$ac_default_prefix/share/config.site" \
1703 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001704fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001705shift
1706for ac_site_file
Martin v. Löwiseba40652007-08-30 20:10:57 +00001707do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001708 if test -r "$ac_site_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001709 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1710echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001711 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001712 . "$ac_site_file"
1713 fi
1714done
1715
1716if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001717 # Some versions of bash will fail to source /dev/null (special
1718 # files actually), so we avoid doing that.
1719 if test -f "$cache_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001720 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1721echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001722 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001723 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1724 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001725 esac
1726 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001727else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001728 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1729echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001730 >$cache_file
1731fi
1732
1733# Check that the precious variables saved in the cache have kept the same
1734# value.
1735ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001736for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001737 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1738 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001739 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1740 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001741 case $ac_old_set,$ac_new_set in
1742 set,)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001743 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1744echo "$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 +00001745 ac_cache_corrupted=: ;;
1746 ,set)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001747 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1748echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001749 ac_cache_corrupted=: ;;
1750 ,);;
1751 *)
1752 if test "x$ac_old_val" != "x$ac_new_val"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001753 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1754echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1755 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1756echo "$as_me: former value: $ac_old_val" >&2;}
1757 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1758echo "$as_me: current value: $ac_new_val" >&2;}
1759 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001760 fi;;
1761 esac
1762 # Pass precious variables to config.status.
1763 if test "$ac_new_set" = set; then
1764 case $ac_new_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001765 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001766 *) ac_arg=$ac_var=$ac_new_val ;;
1767 esac
1768 case " $ac_configure_args " in
1769 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1770 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1771 esac
1772 fi
1773done
1774if $ac_cache_corrupted; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001775 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1776echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1777 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1778echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001779 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001780fi
1781
Martin v. Löwiseba40652007-08-30 20:10:57 +00001782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
Guido van Rossum7f43da71994-08-01 12:15:30 +00001806ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001807ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001808ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1809ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1810ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001811
Guido van Rossum627b2d71993-12-24 10:39:16 +00001812
Michael W. Hudson54241132001-12-07 15:38:26 +00001813
Martin v. Löwiseba40652007-08-30 20:10:57 +00001814ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001815
1816
Martin v. Löwis11437992002-04-12 09:54:03 +00001817
Georg Brandlbcd64a32009-03-31 21:45:18 +00001818if test "$prefix" != "/"; then
1819 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1820fi
1821
1822
Martin v. Löwis11437992002-04-12 09:54:03 +00001823
1824
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001825
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001826
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001827# We don't use PACKAGE_ variables, and they cause conflicts
1828# with other autoconf-based packages that include Python.h
1829grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1830rm confdefs.h
1831mv confdefs.h.new confdefs.h
1832
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001833
Martin v. Löwis174440b2008-10-03 08:59:41 +00001834VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001835
Martin v. Löwis1142de32002-03-29 16:28:31 +00001836
1837SOVERSION=1.0
1838
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001839# The later defininition of _XOPEN_SOURCE disables certain features
1840# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1841
1842cat >>confdefs.h <<\_ACEOF
1843#define _GNU_SOURCE 1
1844_ACEOF
1845
1846
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001847# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1848# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1849# them.
1850
1851cat >>confdefs.h <<\_ACEOF
1852#define _NETBSD_SOURCE 1
1853_ACEOF
1854
1855
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001856# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1857# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1858# them.
1859
1860cat >>confdefs.h <<\_ACEOF
1861#define __BSD_VISIBLE 1
1862_ACEOF
1863
1864
Martin v. Löwisd6320502004-08-12 13:45:08 +00001865# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1866# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1867
1868cat >>confdefs.h <<\_ACEOF
1869#define _BSD_TYPES 1
1870_ACEOF
1871
1872
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001873# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1874# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1875# them.
1876
1877cat >>confdefs.h <<\_ACEOF
1878#define _DARWIN_C_SOURCE 1
1879_ACEOF
1880
1881
1882
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001883define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001884
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001885# Arguments passed to configure.
1886
1887CONFIG_ARGS="$ac_configure_args"
1888
Martin v. Löwiseba40652007-08-30 20:10:57 +00001889# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001890if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001891 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001892 case $enableval in
1893 yes)
1894 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1895 ;;
1896 esac
1897 case $enableval in
1898 no)
1899 UNIVERSALSDK=
1900 enable_universalsdk=
1901 ;;
1902 *)
1903 UNIVERSALSDK=$enableval
1904 ;;
1905 esac
1906
1907else
1908
1909 UNIVERSALSDK=
1910 enable_universalsdk=
1911
Martin v. Löwiseba40652007-08-30 20:10:57 +00001912fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001913
1914
Martin v. Löwiseba40652007-08-30 20:10:57 +00001915
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00001916
1917
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001918UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00001919
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001920{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1921echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001922
1923# Check whether --with-universal-archs was given.
1924if test "${with_universal_archs+set}" = set; then
1925 withval=$with_universal_archs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001926 { echo "$as_me:$LINENO: result: $withval" >&5
1927echo "${ECHO_T}$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001928 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00001929 if test "${enable_universalsdk}" ; then
1930 :
1931 else
1932 { { echo "$as_me:$LINENO: error: --with-universal-archs without --enable-universalsdk. See Mac/README" >&5
1933echo "$as_me: error: --with-universal-archs without --enable-universalsdk. See Mac/README" >&2;}
1934 { (exit 1); exit 1; }; }
1935 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001936
1937else
1938
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001939 { echo "$as_me:$LINENO: result: 32-bit" >&5
1940echo "${ECHO_T}32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001941
1942fi
1943
1944
1945
1946
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001947
1948# Check whether --with-framework-name was given.
1949if test "${with_framework_name+set}" = set; then
1950 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00001951 if test "${enable_framework}"; then
1952 :
1953 else
1954 { { echo "$as_me:$LINENO: error: --with-framework-name without --enable-framework. See Mac/README" >&5
1955echo "$as_me: error: --with-framework-name without --enable-framework. See Mac/README" >&2;}
1956 { (exit 1); exit 1; }; }
1957 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001958 PYTHONFRAMEWORK=${withval}
1959 PYTHONFRAMEWORKDIR=${withval}.framework
1960 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1961
1962else
1963
1964 PYTHONFRAMEWORK=Python
1965 PYTHONFRAMEWORKDIR=Python.framework
1966 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1967
1968fi
1969
Martin v. Löwiseba40652007-08-30 20:10:57 +00001970# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001971if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001972 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001973 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001974 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001975 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001976 esac
1977 case $enableval in
1978 no)
1979 PYTHONFRAMEWORK=
1980 PYTHONFRAMEWORKDIR=no-framework
1981 PYTHONFRAMEWORKPREFIX=
1982 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001983 FRAMEWORKINSTALLFIRST=
1984 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001985 FRAMEWORKALTINSTALLFIRST=
1986 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001987 if test "x${prefix}" = "xNONE"; then
1988 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1989 else
1990 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1991 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001992 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001993 ;;
1994 *)
1995 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001996 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001997 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001998 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00001999 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2000 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002001
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002002 if test "x${prefix}" = "xNONE" ; then
2003 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2004 else
2005 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2006 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002007 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00002008
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002009 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00002010 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00002011 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002012
Martin v. Löwiseba40652007-08-30 20:10:57 +00002013 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002014
Martin v. Löwiseba40652007-08-30 20:10:57 +00002015 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002016
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002017 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2018
2019 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2020
Jack Jansene578a632001-08-15 01:27:14 +00002021 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002022
Guido van Rossum563e7081996-09-10 18:20:48 +00002023else
Martin v. Löwis11437992002-04-12 09:54:03 +00002024
Jack Jansene578a632001-08-15 01:27:14 +00002025 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002026 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002027 PYTHONFRAMEWORKPREFIX=
2028 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002029 FRAMEWORKINSTALLFIRST=
2030 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002031 FRAMEWORKALTINSTALLFIRST=
2032 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002033 if test "x${prefix}" = "xNONE" ; then
2034 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2035 else
2036 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2037 fi
Jack Jansene578a632001-08-15 01:27:14 +00002038 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002039
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002040
Martin v. Löwiseba40652007-08-30 20:10:57 +00002041fi
2042
Michael W. Hudson54241132001-12-07 15:38:26 +00002043
2044
2045
2046
Jack Jansene578a632001-08-15 01:27:14 +00002047
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002048
2049
Ronald Oussoren5b787322006-06-06 19:50:24 +00002050
2051
2052
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002053
Jack Jansene578a632001-08-15 01:27:14 +00002054##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002055## AC_HELP_STRING(--with-dyld,
2056## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002057##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002058# Set name for machine-dependent library files
2059
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002060{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2061echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002062if test -z "$MACHDEP"
2063then
Guido van Rossum563e7081996-09-10 18:20:48 +00002064 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00002065 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002066 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002067 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002068 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002069 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002070 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002071 ac_md_system=`echo $ac_sys_system |
2072 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2073 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002074 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002075 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002076
Guido van Rossum07397971997-04-29 21:49:50 +00002077 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002078 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002079 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002080 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002081 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002082 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002083 esac
2084fi
Guido van Rossum91922671997-10-09 20:24:13 +00002085
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002086# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2087# disable features if it is defined, without any means to access these
2088# features as extensions. For these systems, we skip the definition of
2089# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2090# some feature, make sure there is no alternative way to access this
2091# feature. Also, when using wildcards, make sure you have verified the
2092# need for not defining _XOPEN_SOURCE on all systems matching the
2093# wildcard, and that the wildcard does not include future systems
2094# (which may remove their limitations).
2095case $ac_sys_system/$ac_sys_release in
2096 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2097 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002098 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Gregory P. Smithcc023f12008-09-07 05:15:58 +00002099 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002100 define_xopen_source=no
2101 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2102 # also defined. This can be overridden by defining _BSD_SOURCE
2103 # As this has a different meaning on Linux, only define it on OpenBSD
2104
2105cat >>confdefs.h <<\_ACEOF
2106#define _BSD_SOURCE 1
2107_ACEOF
2108
2109 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002110 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2111 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2112 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00002113 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 +00002114 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002115 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2116 # of union __?sigval. Reported by Stuart Bishop.
2117 SunOS/5.6)
2118 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002119 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2120 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002121 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002122 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002123 define_xopen_source=no;;
2124 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002125 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002126 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002127 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00002128 # On FreeBSD 4, the math functions C89 does not cover are never defined
2129 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2130 FreeBSD/4.*)
2131 define_xopen_source=no;;
2132 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2133 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2134 # identifies itself as Darwin/7.*
2135 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2136 # disables platform specific features beyond repair.
2137 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2138 # has no effect, don't bother defining them
2139 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002140 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002141 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2142 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2143 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002144 AIX/4)
2145 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002146 AIX/5)
2147 if test `uname -r` -eq 1; then
2148 define_xopen_source=no
2149 fi
2150 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002151 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2152 # defining NI_NUMERICHOST.
2153 QNX/6.3.2)
2154 define_xopen_source=no
2155 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002156
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002157esac
2158
2159if test $define_xopen_source = yes
2160then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002161 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2162 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002163 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2164 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002165 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002166 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002167
2168cat >>confdefs.h <<\_ACEOF
2169#define _XOPEN_SOURCE 500
2170_ACEOF
2171
2172 ;;
2173 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002174
2175cat >>confdefs.h <<\_ACEOF
2176#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002177_ACEOF
2178
Skip Montanarof0d5f792004-08-15 14:08:23 +00002179 ;;
2180 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002181
2182 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2183 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2184 # several APIs are not declared. Since this is also needed in some
2185 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002186 # except for Solaris 10, where it must not be defined,
2187 # as it implies XPG4.2
2188 case $ac_sys_system/$ac_sys_release in
2189 SunOS/5.10)
2190 ;;
2191 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002192
2193cat >>confdefs.h <<\_ACEOF
2194#define _XOPEN_SOURCE_EXTENDED 1
2195_ACEOF
2196
Martin v. Löwis7dece662005-11-26 11:38:24 +00002197 ;;
2198 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002199
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002200
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002201cat >>confdefs.h <<\_ACEOF
2202#define _POSIX_C_SOURCE 200112L
2203_ACEOF
2204
2205
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002206fi
2207
Guido van Rossum91922671997-10-09 20:24:13 +00002208#
2209# SGI compilers allow the specification of the both the ABI and the
2210# ISA on the command line. Depending on the values of these switches,
2211# different and often incompatable code will be generated.
2212#
2213# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2214# thus supply support for various ABI/ISA combinations. The MACHDEP
2215# variable is also adjusted.
2216#
2217
2218if test ! -z "$SGI_ABI"
2219then
2220 CC="cc $SGI_ABI"
2221 LDFLAGS="$SGI_ABI $LDFLAGS"
2222 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2223fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002224{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2225echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002226
Jack Jansen83f898c2002-12-30 22:23:40 +00002227# And add extra plat-mac for darwin
2228
Jack Jansen7b59b422003-03-17 15:44:10 +00002229
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002230{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2231echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002232if test -z "$EXTRAPLATDIR"
2233then
2234 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002235 darwin)
2236 EXTRAPLATDIR="\$(PLATMACDIRS)"
2237 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2238 ;;
2239 *)
2240 EXTRAPLATDIR=""
2241 EXTRAMACHDEPPATH=""
2242 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002243 esac
2244fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002245{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2246echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002247
Jack Jansen6b08a402004-06-03 12:41:45 +00002248# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2249# it may influence the way we can build extensions, so distutils
2250# needs to check it
2251
Ronald Oussoren988117f2006-04-29 11:31:35 +00002252
Jack Jansen6b08a402004-06-03 12:41:45 +00002253CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002254EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002255
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002256{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2257echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002258ac_sys_machine=`uname -m`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002259{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2260echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002261
Guido van Rossum627b2d71993-12-24 10:39:16 +00002262# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002263
2264# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2265# for debug/optimization stuff. BASECFLAGS is for flags that are required
2266# just to get things to compile and link. Users are free to override OPT
2267# when running configure or make. The build should not break if they do.
2268# BASECFLAGS should generally not be messed with, however.
2269
2270# XXX shouldn't some/most/all of this code be merged with the stuff later
2271# on that fiddles with OPT and BASECFLAGS?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002272{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2273echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002274
Martin v. Löwiseba40652007-08-30 20:10:57 +00002275# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002276if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002277 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002278 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00002279 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002280 without_gcc=yes;;
2281 yes) CC=gcc
2282 without_gcc=no;;
2283 *) CC=$withval
2284 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002285 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002286else
Martin v. Löwis11437992002-04-12 09:54:03 +00002287
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002288 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002289 AIX*) CC=cc_r
2290 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002291 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002292 case $BE_HOST_CPU in
2293 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002294 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002295 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002296 BASECFLAGS="$BASECFLAGS -export pragma"
2297 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002298 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002299 ;;
2300 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002301 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002302 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002303 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002304 ;;
2305 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002306 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2307echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002308 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002309 ;;
2310 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002311 AR="\$(srcdir)/Modules/ar_beos"
2312 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002313 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002314 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002315 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002316fi
2317
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002318{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2319echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002320
Guido van Rossum8b131c51995-03-09 14:10:13 +00002321# If the user switches compilers, we can't believe the cache
2322if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2323then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002324 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002325(it is also a good idea to do 'make clean' before compiling)" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002326echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002327(it is also a good idea to do 'make clean' before compiling)" >&2;}
2328 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002329fi
2330
Martin v. Löwis11437992002-04-12 09:54:03 +00002331ac_ext=c
2332ac_cpp='$CPP $CPPFLAGS'
2333ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2334ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2335ac_compiler_gnu=$ac_cv_c_compiler_gnu
2336if test -n "$ac_tool_prefix"; then
2337 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2338set dummy ${ac_tool_prefix}gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002339{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2340echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002341if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002342 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002343else
2344 if test -n "$CC"; then
2345 ac_cv_prog_CC="$CC" # Let the user override the test.
2346else
Martin v. Löwis11437992002-04-12 09:54:03 +00002347as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2348for as_dir in $PATH
2349do
2350 IFS=$as_save_IFS
2351 test -z "$as_dir" && as_dir=.
2352 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002353 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 +00002354 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002355 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002356 break 2
2357 fi
2358done
2359done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002360IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002361
Jack Jansendd19cf82001-12-06 22:36:17 +00002362fi
2363fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002364CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002365if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002366 { echo "$as_me:$LINENO: result: $CC" >&5
2367echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002368else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002369 { echo "$as_me:$LINENO: result: no" >&5
2370echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002371fi
2372
Martin v. Löwiseba40652007-08-30 20:10:57 +00002373
Martin v. Löwis11437992002-04-12 09:54:03 +00002374fi
2375if test -z "$ac_cv_prog_CC"; then
2376 ac_ct_CC=$CC
2377 # Extract the first word of "gcc", so it can be a program name with args.
2378set dummy gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002379{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2380echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002381if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002382 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002383else
2384 if test -n "$ac_ct_CC"; then
2385 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2386else
2387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2388for as_dir in $PATH
2389do
2390 IFS=$as_save_IFS
2391 test -z "$as_dir" && as_dir=.
2392 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002393 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 +00002394 ac_cv_prog_ac_ct_CC="gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002395 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002396 break 2
2397 fi
2398done
2399done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002400IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002401
2402fi
2403fi
2404ac_ct_CC=$ac_cv_prog_ac_ct_CC
2405if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002406 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2407echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002408else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002409 { echo "$as_me:$LINENO: result: no" >&5
2410echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002411fi
2412
Martin v. Löwiseba40652007-08-30 20:10:57 +00002413 if test "x$ac_ct_CC" = x; then
2414 CC=""
2415 else
2416 case $cross_compiling:$ac_tool_warned in
2417yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002418{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2419whose name does not start with the host triplet. If you think this
2420configuration is useful to you, please write to autoconf@gnu.org." >&5
2421echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2422whose name does not start with the host triplet. If you think this
2423configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002424ac_tool_warned=yes ;;
2425esac
2426 CC=$ac_ct_CC
2427 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002428else
2429 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002430fi
2431
Jack Jansendd19cf82001-12-06 22:36:17 +00002432if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002433 if test -n "$ac_tool_prefix"; then
2434 # 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 +00002435set dummy ${ac_tool_prefix}cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002436{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2437echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002438if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002439 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002440else
2441 if test -n "$CC"; then
2442 ac_cv_prog_CC="$CC" # Let the user override the test.
2443else
Martin v. Löwis11437992002-04-12 09:54:03 +00002444as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2445for as_dir in $PATH
2446do
2447 IFS=$as_save_IFS
2448 test -z "$as_dir" && as_dir=.
2449 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002450 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 +00002451 ac_cv_prog_CC="${ac_tool_prefix}cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002452 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002453 break 2
2454 fi
2455done
2456done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002457IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002458
2459fi
2460fi
2461CC=$ac_cv_prog_CC
2462if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002463 { echo "$as_me:$LINENO: result: $CC" >&5
2464echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002465else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002466 { echo "$as_me:$LINENO: result: no" >&5
2467echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002468fi
2469
Martin v. Löwiseba40652007-08-30 20:10:57 +00002470
Martin v. Löwis11437992002-04-12 09:54:03 +00002471 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002472fi
2473if test -z "$CC"; then
2474 # Extract the first word of "cc", so it can be a program name with args.
2475set dummy cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002476{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2477echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002478if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002479 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002480else
2481 if test -n "$CC"; then
2482 ac_cv_prog_CC="$CC" # Let the user override the test.
2483else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002484 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002485as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2486for as_dir in $PATH
2487do
2488 IFS=$as_save_IFS
2489 test -z "$as_dir" && as_dir=.
2490 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002491 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002492 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2493 ac_prog_rejected=yes
2494 continue
2495 fi
2496 ac_cv_prog_CC="cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002497 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002498 break 2
2499 fi
2500done
2501done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002502IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002503
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002504if test $ac_prog_rejected = yes; then
2505 # We found a bogon in the path, so make sure we never use it.
2506 set dummy $ac_cv_prog_CC
2507 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002508 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002509 # We chose a different compiler from the bogus one.
2510 # However, it has the same basename, so the bogon will be chosen
2511 # first if we set CC to just the basename; use the full file name.
2512 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002513 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002514 fi
2515fi
2516fi
2517fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002518CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002519if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002520 { echo "$as_me:$LINENO: result: $CC" >&5
2521echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002522else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002523 { echo "$as_me:$LINENO: result: no" >&5
2524echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002525fi
2526
Martin v. Löwiseba40652007-08-30 20:10:57 +00002527
Martin v. Löwis11437992002-04-12 09:54:03 +00002528fi
2529if test -z "$CC"; then
2530 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002531 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 do
2533 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2534set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002535{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2536echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002537if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002538 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002539else
2540 if test -n "$CC"; then
2541 ac_cv_prog_CC="$CC" # Let the user override the test.
2542else
Martin v. Löwis11437992002-04-12 09:54:03 +00002543as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2544for as_dir in $PATH
2545do
2546 IFS=$as_save_IFS
2547 test -z "$as_dir" && as_dir=.
2548 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002549 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 +00002550 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002551 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002552 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002553 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002554done
2555done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002556IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002557
2558fi
2559fi
2560CC=$ac_cv_prog_CC
2561if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002562 { echo "$as_me:$LINENO: result: $CC" >&5
2563echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002564else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002565 { echo "$as_me:$LINENO: result: no" >&5
2566echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002567fi
2568
Martin v. Löwiseba40652007-08-30 20:10:57 +00002569
Martin v. Löwis11437992002-04-12 09:54:03 +00002570 test -n "$CC" && break
2571 done
2572fi
2573if test -z "$CC"; then
2574 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002575 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002576do
2577 # Extract the first word of "$ac_prog", so it can be a program name with args.
2578set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002579{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2580echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002581if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002582 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002583else
2584 if test -n "$ac_ct_CC"; then
2585 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2586else
2587as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2588for as_dir in $PATH
2589do
2590 IFS=$as_save_IFS
2591 test -z "$as_dir" && as_dir=.
2592 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002593 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 +00002594 ac_cv_prog_ac_ct_CC="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002595 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002596 break 2
2597 fi
2598done
2599done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002600IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002601
Martin v. Löwis11437992002-04-12 09:54:03 +00002602fi
2603fi
2604ac_ct_CC=$ac_cv_prog_ac_ct_CC
2605if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002606 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2607echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002608else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002609 { echo "$as_me:$LINENO: result: no" >&5
2610echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002611fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002612
Martin v. Löwiseba40652007-08-30 20:10:57 +00002613
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 test -n "$ac_ct_CC" && break
2615done
Michael W. Hudson54241132001-12-07 15:38:26 +00002616
Martin v. Löwiseba40652007-08-30 20:10:57 +00002617 if test "x$ac_ct_CC" = x; then
2618 CC=""
2619 else
2620 case $cross_compiling:$ac_tool_warned in
2621yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002622{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2623whose name does not start with the host triplet. If you think this
2624configuration is useful to you, please write to autoconf@gnu.org." >&5
2625echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2626whose name does not start with the host triplet. If you think this
2627configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002628ac_tool_warned=yes ;;
2629esac
2630 CC=$ac_ct_CC
2631 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002632fi
2633
2634fi
2635
2636
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002637test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002638See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002639echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002640See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002641 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002642
2643# Provide some information about the compiler.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002644echo "$as_me:$LINENO: checking for C compiler version" >&5
2645ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002646{ (ac_try="$ac_compiler --version >&5"
2647case "(($ac_try" in
2648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2649 *) ac_try_echo=$ac_try;;
2650esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002652 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002653 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002655 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002656{ (ac_try="$ac_compiler -v >&5"
2657case "(($ac_try" in
2658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2659 *) ac_try_echo=$ac_try;;
2660esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002662 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002663 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002666{ (ac_try="$ac_compiler -V >&5"
2667case "(($ac_try" in
2668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2669 *) ac_try_echo=$ac_try;;
2670esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002672 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002673 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002675 (exit $ac_status); }
2676
2677cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002678/* confdefs.h. */
2679_ACEOF
2680cat confdefs.h >>conftest.$ac_ext
2681cat >>conftest.$ac_ext <<_ACEOF
2682/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002683
Martin v. Löwis11437992002-04-12 09:54:03 +00002684int
2685main ()
2686{
2687
2688 ;
2689 return 0;
2690}
2691_ACEOF
2692ac_clean_files_save=$ac_clean_files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002693ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002694# Try to create an executable without -o first, disregard a.out.
2695# It will help us diagnose broken compilers, and finding out an intuition
2696# of exeext.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002697{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2698echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2699ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2700#
2701# List of possible output files, starting from the most likely.
2702# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2703# only as a last resort. b.out is created by i960 compilers.
2704ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2705#
2706# The IRIX 6 linker writes into existing files which may not be
2707# executable, retaining their permissions. Remove them first so a
2708# subsequent execution test works.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002709ac_rmfiles=
2710for ac_file in $ac_files
2711do
2712 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002713 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002714 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2715 esac
2716done
2717rm -f $ac_rmfiles
2718
2719if { (ac_try="$ac_link_default"
2720case "(($ac_try" in
2721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2722 *) ac_try_echo=$ac_try;;
2723esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002725 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002726 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002728 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002729 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2730# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2731# in a Makefile. We should not override ac_cv_exeext if it was cached,
2732# so that the user can short-circuit this test for compilers unknown to
2733# Autoconf.
2734for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002735do
2736 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002737 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002738 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002739 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002740 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002741 # We found the default executable, but exeext='' is most
2742 # certainly right.
2743 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002744 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002745 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2746 then :; else
2747 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2748 fi
2749 # We set ac_cv_exeext here because the later test for it is not
2750 # safe: cross compilers may not add the suffix if given an `-o'
2751 # argument, so we may need to know it at that point already.
2752 # Even if this section looks crufty: it has the advantage of
2753 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002754 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002755 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002756 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002757 esac
2758done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002759test "$ac_cv_exeext" = no && ac_cv_exeext=
2760
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002761else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002762 ac_file=''
2763fi
2764
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002765{ echo "$as_me:$LINENO: result: $ac_file" >&5
2766echo "${ECHO_T}$ac_file" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002767if test -z "$ac_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002769sed 's/^/| /' conftest.$ac_ext >&5
2770
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002771{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002772See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002773echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002774See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002775 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002776fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002777
Martin v. Löwis11437992002-04-12 09:54:03 +00002778ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002779
Martin v. Löwiseba40652007-08-30 20:10:57 +00002780# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002781# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002782{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2783echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002784# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2785# If not cross compiling, check that we can run a simple program.
2786if test "$cross_compiling" != yes; then
2787 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002788 { (case "(($ac_try" in
2789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2790 *) ac_try_echo=$ac_try;;
2791esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002793 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002794 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002796 (exit $ac_status); }; }; then
2797 cross_compiling=no
2798 else
2799 if test "$cross_compiling" = maybe; then
2800 cross_compiling=yes
2801 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002802 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002803If you meant to cross compile, use \`--host'.
2804See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002805echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002806If you meant to cross compile, use \`--host'.
2807See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002808 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002809 fi
2810 fi
2811fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002812{ echo "$as_me:$LINENO: result: yes" >&5
2813echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002814
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002815rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002816ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002817# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002818# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002819{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2820echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2821{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2822echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002823
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002824{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2825echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002826if { (ac_try="$ac_link"
2827case "(($ac_try" in
2828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2829 *) ac_try_echo=$ac_try;;
2830esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002832 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002833 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002835 (exit $ac_status); }; then
2836 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2837# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2838# work properly (i.e., refer to `conftest.exe'), while it won't with
2839# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002840for ac_file in conftest.exe conftest conftest.*; do
2841 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002842 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002843 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002844 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002845 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002846 * ) break;;
2847 esac
2848done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002849else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002850 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002851See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002852echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002853See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002854 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002855fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002856
Martin v. Löwis11437992002-04-12 09:54:03 +00002857rm -f conftest$ac_cv_exeext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002858{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2859echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002860
2861rm -f conftest.$ac_ext
2862EXEEXT=$ac_cv_exeext
2863ac_exeext=$EXEEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002864{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2865echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002866if test "${ac_cv_objext+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002867 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002868else
Martin v. Löwis11437992002-04-12 09:54:03 +00002869 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002870/* confdefs.h. */
2871_ACEOF
2872cat confdefs.h >>conftest.$ac_ext
2873cat >>conftest.$ac_ext <<_ACEOF
2874/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002875
Martin v. Löwis11437992002-04-12 09:54:03 +00002876int
2877main ()
2878{
2879
2880 ;
2881 return 0;
2882}
2883_ACEOF
2884rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002885if { (ac_try="$ac_compile"
2886case "(($ac_try" in
2887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2888 *) ac_try_echo=$ac_try;;
2889esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002891 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002892 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002894 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002895 for ac_file in conftest.o conftest.obj conftest.*; do
2896 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002897 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002898 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002899 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2900 break;;
2901 esac
2902done
2903else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002904 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002905sed 's/^/| /' conftest.$ac_ext >&5
2906
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002907{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002908See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002909echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002910See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002911 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002912fi
2913
2914rm -f conftest.$ac_cv_objext conftest.$ac_ext
2915fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002916{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2917echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002918OBJEXT=$ac_cv_objext
2919ac_objext=$OBJEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002920{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2921echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002922if test "${ac_cv_c_compiler_gnu+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002923 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002924else
2925 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002926/* confdefs.h. */
2927_ACEOF
2928cat confdefs.h >>conftest.$ac_ext
2929cat >>conftest.$ac_ext <<_ACEOF
2930/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002931
Martin v. Löwis11437992002-04-12 09:54:03 +00002932int
2933main ()
2934{
2935#ifndef __GNUC__
2936 choke me
2937#endif
2938
2939 ;
2940 return 0;
2941}
2942_ACEOF
2943rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002944if { (ac_try="$ac_compile"
2945case "(($ac_try" in
2946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2947 *) ac_try_echo=$ac_try;;
2948esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002950 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002951 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002952 grep -v '^ *+' conftest.er1 >conftest.err
2953 rm -f conftest.er1
2954 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002956 (exit $ac_status); } && {
2957 test -z "$ac_c_werror_flag" ||
2958 test ! -s conftest.err
2959 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002960 ac_compiler_gnu=yes
2961else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002962 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002963sed 's/^/| /' conftest.$ac_ext >&5
2964
Martin v. Löwiseba40652007-08-30 20:10:57 +00002965 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002966fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002967
2968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002969ac_cv_c_compiler_gnu=$ac_compiler_gnu
2970
2971fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002972{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2973echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2974GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002975ac_test_CFLAGS=${CFLAGS+set}
2976ac_save_CFLAGS=$CFLAGS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002977{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2978echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002979if test "${ac_cv_prog_cc_g+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002980 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002981else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002982 ac_save_c_werror_flag=$ac_c_werror_flag
2983 ac_c_werror_flag=yes
2984 ac_cv_prog_cc_g=no
2985 CFLAGS="-g"
2986 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002987/* confdefs.h. */
2988_ACEOF
2989cat confdefs.h >>conftest.$ac_ext
2990cat >>conftest.$ac_ext <<_ACEOF
2991/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002992
Martin v. Löwis11437992002-04-12 09:54:03 +00002993int
2994main ()
2995{
2996
2997 ;
2998 return 0;
2999}
3000_ACEOF
3001rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003002if { (ac_try="$ac_compile"
3003case "(($ac_try" in
3004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3005 *) ac_try_echo=$ac_try;;
3006esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003008 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003009 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003010 grep -v '^ *+' conftest.er1 >conftest.err
3011 rm -f conftest.er1
3012 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003014 (exit $ac_status); } && {
3015 test -z "$ac_c_werror_flag" ||
3016 test ! -s conftest.err
3017 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003018 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003019else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003020 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003021sed 's/^/| /' conftest.$ac_ext >&5
3022
Martin v. Löwiseba40652007-08-30 20:10:57 +00003023 CFLAGS=""
3024 cat >conftest.$ac_ext <<_ACEOF
3025/* confdefs.h. */
3026_ACEOF
3027cat confdefs.h >>conftest.$ac_ext
3028cat >>conftest.$ac_ext <<_ACEOF
3029/* end confdefs.h. */
3030
3031int
3032main ()
3033{
3034
3035 ;
3036 return 0;
3037}
3038_ACEOF
3039rm -f conftest.$ac_objext
3040if { (ac_try="$ac_compile"
3041case "(($ac_try" in
3042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3043 *) ac_try_echo=$ac_try;;
3044esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003046 (eval "$ac_compile") 2>conftest.er1
3047 ac_status=$?
3048 grep -v '^ *+' conftest.er1 >conftest.err
3049 rm -f conftest.er1
3050 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003052 (exit $ac_status); } && {
3053 test -z "$ac_c_werror_flag" ||
3054 test ! -s conftest.err
3055 } && test -s conftest.$ac_objext; then
3056 :
3057else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003058 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003059sed 's/^/| /' conftest.$ac_ext >&5
3060
3061 ac_c_werror_flag=$ac_save_c_werror_flag
3062 CFLAGS="-g"
3063 cat >conftest.$ac_ext <<_ACEOF
3064/* confdefs.h. */
3065_ACEOF
3066cat confdefs.h >>conftest.$ac_ext
3067cat >>conftest.$ac_ext <<_ACEOF
3068/* end confdefs.h. */
3069
3070int
3071main ()
3072{
3073
3074 ;
3075 return 0;
3076}
3077_ACEOF
3078rm -f conftest.$ac_objext
3079if { (ac_try="$ac_compile"
3080case "(($ac_try" in
3081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3082 *) ac_try_echo=$ac_try;;
3083esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003085 (eval "$ac_compile") 2>conftest.er1
3086 ac_status=$?
3087 grep -v '^ *+' conftest.er1 >conftest.err
3088 rm -f conftest.er1
3089 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003091 (exit $ac_status); } && {
3092 test -z "$ac_c_werror_flag" ||
3093 test ! -s conftest.err
3094 } && test -s conftest.$ac_objext; then
3095 ac_cv_prog_cc_g=yes
3096else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003097 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003098sed 's/^/| /' conftest.$ac_ext >&5
3099
3100
Guido van Rossum627b2d71993-12-24 10:39:16 +00003101fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003102
3103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003104fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003105
3106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3107fi
3108
3109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3110 ac_c_werror_flag=$ac_save_c_werror_flag
3111fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003112{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3113echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003114if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003115 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003116elif test $ac_cv_prog_cc_g = yes; then
3117 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003118 CFLAGS="-g -O2"
3119 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003120 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003121 fi
3122else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003123 if test "$GCC" = yes; then
3124 CFLAGS="-O2"
3125 else
3126 CFLAGS=
3127 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003128fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003129{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3130echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003131if test "${ac_cv_prog_cc_c89+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003132 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003133else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003134 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003135ac_save_CC=$CC
3136cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003137/* confdefs.h. */
3138_ACEOF
3139cat confdefs.h >>conftest.$ac_ext
3140cat >>conftest.$ac_ext <<_ACEOF
3141/* end confdefs.h. */
3142#include <stdarg.h>
3143#include <stdio.h>
3144#include <sys/types.h>
3145#include <sys/stat.h>
3146/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3147struct buf { int x; };
3148FILE * (*rcsopen) (struct buf *, struct stat *, int);
3149static char *e (p, i)
3150 char **p;
3151 int i;
3152{
3153 return p[i];
3154}
3155static char *f (char * (*g) (char **, int), char **p, ...)
3156{
3157 char *s;
3158 va_list v;
3159 va_start (v,p);
3160 s = g (p, va_arg (v,int));
3161 va_end (v);
3162 return s;
3163}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003164
3165/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3166 function prototypes and stuff, but not '\xHH' hex character constants.
3167 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003168 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003169 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3170 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003171 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003172int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3173
Martin v. Löwiseba40652007-08-30 20:10:57 +00003174/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3175 inside strings and character constants. */
3176#define FOO(x) 'x'
3177int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3178
Skip Montanaro6dead952003-09-25 14:50:04 +00003179int test (int i, double x);
3180struct s1 {int (*f) (int a);};
3181struct s2 {int (*f) (double a);};
3182int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3183int argc;
3184char **argv;
3185int
3186main ()
3187{
3188return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3189 ;
3190 return 0;
3191}
3192_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003193for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3194 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003195do
3196 CC="$ac_save_CC $ac_arg"
3197 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003198if { (ac_try="$ac_compile"
3199case "(($ac_try" in
3200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3201 *) ac_try_echo=$ac_try;;
3202esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003204 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003205 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003206 grep -v '^ *+' conftest.er1 >conftest.err
3207 rm -f conftest.er1
3208 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003210 (exit $ac_status); } && {
3211 test -z "$ac_c_werror_flag" ||
3212 test ! -s conftest.err
3213 } && test -s conftest.$ac_objext; then
3214 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003215else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003216 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003217sed 's/^/| /' conftest.$ac_ext >&5
3218
Martin v. Löwiseba40652007-08-30 20:10:57 +00003219
Skip Montanaro6dead952003-09-25 14:50:04 +00003220fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003221
3222rm -f core conftest.err conftest.$ac_objext
3223 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003224done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003225rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003226CC=$ac_save_CC
3227
3228fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003229# AC_CACHE_VAL
3230case "x$ac_cv_prog_cc_c89" in
3231 x)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003232 { echo "$as_me:$LINENO: result: none needed" >&5
3233echo "${ECHO_T}none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003234 xno)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003235 { echo "$as_me:$LINENO: result: unsupported" >&5
3236echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003237 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003238 CC="$CC $ac_cv_prog_cc_c89"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003239 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3240echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003241esac
3242
Skip Montanaro6dead952003-09-25 14:50:04 +00003243
Martin v. Löwis11437992002-04-12 09:54:03 +00003244ac_ext=c
3245ac_cpp='$CPP $CPPFLAGS'
3246ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3247ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3248ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003249
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003250
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003251
3252
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003253{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3254echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003255
Martin v. Löwiseba40652007-08-30 20:10:57 +00003256# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003257if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003258 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003259
3260 case $withval in
3261 no) with_cxx_main=no
3262 MAINCC='$(CC)';;
3263 yes) with_cxx_main=yes
3264 MAINCC='$(CXX)';;
3265 *) with_cxx_main=yes
3266 MAINCC=$withval
3267 if test -z "$CXX"
3268 then
3269 CXX=$withval
3270 fi;;
3271 esac
3272else
3273
3274 with_cxx_main=no
3275 MAINCC='$(CC)'
3276
Martin v. Löwiseba40652007-08-30 20:10:57 +00003277fi
3278
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003279{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3280echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003281
3282preset_cxx="$CXX"
3283if test -z "$CXX"
3284then
3285 case "$CC" in
3286 gcc) # Extract the first word of "g++", so it can be a program name with args.
3287set dummy g++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003288{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3289echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003290if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003291 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003292else
3293 case $CXX in
3294 [\\/]* | ?:[\\/]*)
3295 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3296 ;;
3297 *)
3298 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3299for as_dir in notfound
3300do
3301 IFS=$as_save_IFS
3302 test -z "$as_dir" && as_dir=.
3303 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003304 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 +00003305 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003306 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003307 break 2
3308 fi
3309done
3310done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003311IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003312
3313 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3314 ;;
3315esac
3316fi
3317CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003318if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003319 { echo "$as_me:$LINENO: result: $CXX" >&5
3320echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003321else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003322 { echo "$as_me:$LINENO: result: no" >&5
3323echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003324fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003325
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003326 ;;
3327 cc) # Extract the first word of "c++", so it can be a program name with args.
3328set dummy c++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003329{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3330echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003331if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003332 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003333else
3334 case $CXX in
3335 [\\/]* | ?:[\\/]*)
3336 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3337 ;;
3338 *)
3339 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3340for as_dir in notfound
3341do
3342 IFS=$as_save_IFS
3343 test -z "$as_dir" && as_dir=.
3344 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003345 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 +00003346 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003347 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003348 break 2
3349 fi
3350done
3351done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003352IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003353
3354 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3355 ;;
3356esac
3357fi
3358CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003359if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003360 { echo "$as_me:$LINENO: result: $CXX" >&5
3361echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003362else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003363 { echo "$as_me:$LINENO: result: no" >&5
3364echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003365fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003366
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003367 ;;
3368 esac
3369 if test "$CXX" = "notfound"
3370 then
3371 CXX=""
3372 fi
3373fi
3374if test -z "$CXX"
3375then
3376 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3377do
3378 # Extract the first word of "$ac_prog", so it can be a program name with args.
3379set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003380{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3381echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003382if test "${ac_cv_prog_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003383 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003384else
3385 if test -n "$CXX"; then
3386 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3387else
3388as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3389for as_dir in $PATH
3390do
3391 IFS=$as_save_IFS
3392 test -z "$as_dir" && as_dir=.
3393 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003394 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 +00003395 ac_cv_prog_CXX="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003396 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003397 break 2
3398 fi
3399done
3400done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003401IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003402
3403fi
3404fi
3405CXX=$ac_cv_prog_CXX
3406if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003407 { echo "$as_me:$LINENO: result: $CXX" >&5
3408echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003409else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003410 { echo "$as_me:$LINENO: result: no" >&5
3411echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003412fi
3413
Martin v. Löwiseba40652007-08-30 20:10:57 +00003414
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003415 test -n "$CXX" && break
3416done
3417test -n "$CXX" || CXX="notfound"
3418
3419 if test "$CXX" = "notfound"
3420 then
3421 CXX=""
3422 fi
3423fi
3424if test "$preset_cxx" != "$CXX"
3425then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003426 { echo "$as_me:$LINENO: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003427
3428 By default, distutils will build C++ extension modules with \"$CXX\".
3429 If this is not intended, then set CXX on the configure command line.
3430 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003431echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003432
3433 By default, distutils will build C++ extension modules with \"$CXX\".
3434 If this is not intended, then set CXX on the configure command line.
3435 " >&2;}
3436fi
3437
3438
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003439# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003440
3441ac_ext=c
3442ac_cpp='$CPP $CPPFLAGS'
3443ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3444ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3445ac_compiler_gnu=$ac_cv_c_compiler_gnu
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003446{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3447echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003448# On Suns, sometimes $CPP names a directory.
3449if test -n "$CPP" && test -d "$CPP"; then
3450 CPP=
3451fi
3452if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003453 if test "${ac_cv_prog_CPP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003454 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003455else
Martin v. Löwis11437992002-04-12 09:54:03 +00003456 # Double quotes because CPP needs to be expanded
3457 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3458 do
3459 ac_preproc_ok=false
3460for ac_c_preproc_warn_flag in '' yes
3461do
3462 # Use a header file that comes with gcc, so configuring glibc
3463 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003464 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3465 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003466 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003467 # not just through cpp. "Syntax error" is here to catch this case.
3468 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003469/* confdefs.h. */
3470_ACEOF
3471cat confdefs.h >>conftest.$ac_ext
3472cat >>conftest.$ac_ext <<_ACEOF
3473/* end confdefs.h. */
3474#ifdef __STDC__
3475# include <limits.h>
3476#else
3477# include <assert.h>
3478#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003479 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003480_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003481if { (ac_try="$ac_cpp conftest.$ac_ext"
3482case "(($ac_try" in
3483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3484 *) ac_try_echo=$ac_try;;
3485esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003486eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003487 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003488 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003489 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003490 rm -f conftest.er1
3491 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003493 (exit $ac_status); } >/dev/null && {
3494 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3495 test ! -s conftest.err
3496 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003497 :
3498else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003499 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003500sed 's/^/| /' conftest.$ac_ext >&5
3501
Martin v. Löwis11437992002-04-12 09:54:03 +00003502 # Broken: fails on valid input.
3503continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003504fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003505
Martin v. Löwis11437992002-04-12 09:54:03 +00003506rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003507
Martin v. Löwiseba40652007-08-30 20:10:57 +00003508 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003509 # can be detected and how.
3510 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003511/* confdefs.h. */
3512_ACEOF
3513cat confdefs.h >>conftest.$ac_ext
3514cat >>conftest.$ac_ext <<_ACEOF
3515/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003516#include <ac_nonexistent.h>
3517_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003518if { (ac_try="$ac_cpp conftest.$ac_ext"
3519case "(($ac_try" in
3520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3521 *) ac_try_echo=$ac_try;;
3522esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003524 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003525 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003526 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003527 rm -f conftest.er1
3528 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003530 (exit $ac_status); } >/dev/null && {
3531 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3532 test ! -s conftest.err
3533 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003534 # Broken: success on invalid input.
3535continue
3536else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003537 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003538sed 's/^/| /' conftest.$ac_ext >&5
3539
Martin v. Löwis11437992002-04-12 09:54:03 +00003540 # Passes both tests.
3541ac_preproc_ok=:
3542break
3543fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003544
Martin v. Löwis11437992002-04-12 09:54:03 +00003545rm -f conftest.err conftest.$ac_ext
3546
3547done
3548# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3549rm -f conftest.err conftest.$ac_ext
3550if $ac_preproc_ok; then
3551 break
3552fi
3553
3554 done
3555 ac_cv_prog_CPP=$CPP
3556
3557fi
3558 CPP=$ac_cv_prog_CPP
3559else
3560 ac_cv_prog_CPP=$CPP
3561fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003562{ echo "$as_me:$LINENO: result: $CPP" >&5
3563echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003564ac_preproc_ok=false
3565for ac_c_preproc_warn_flag in '' yes
3566do
3567 # Use a header file that comes with gcc, so configuring glibc
3568 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003569 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3570 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003571 # On the NeXT, cc -E runs the code through the compiler's parser,
3572 # not just through cpp. "Syntax error" is here to catch this case.
3573 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003574/* confdefs.h. */
3575_ACEOF
3576cat confdefs.h >>conftest.$ac_ext
3577cat >>conftest.$ac_ext <<_ACEOF
3578/* end confdefs.h. */
3579#ifdef __STDC__
3580# include <limits.h>
3581#else
3582# include <assert.h>
3583#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003584 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003585_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003586if { (ac_try="$ac_cpp conftest.$ac_ext"
3587case "(($ac_try" in
3588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3589 *) ac_try_echo=$ac_try;;
3590esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003592 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003593 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003594 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003595 rm -f conftest.er1
3596 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003598 (exit $ac_status); } >/dev/null && {
3599 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3600 test ! -s conftest.err
3601 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003602 :
3603else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003604 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003605sed 's/^/| /' conftest.$ac_ext >&5
3606
Martin v. Löwis11437992002-04-12 09:54:03 +00003607 # Broken: fails on valid input.
3608continue
3609fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003610
Martin v. Löwis11437992002-04-12 09:54:03 +00003611rm -f conftest.err conftest.$ac_ext
3612
Martin v. Löwiseba40652007-08-30 20:10:57 +00003613 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003614 # can be detected and how.
3615 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003616/* confdefs.h. */
3617_ACEOF
3618cat confdefs.h >>conftest.$ac_ext
3619cat >>conftest.$ac_ext <<_ACEOF
3620/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003621#include <ac_nonexistent.h>
3622_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003623if { (ac_try="$ac_cpp conftest.$ac_ext"
3624case "(($ac_try" in
3625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3626 *) ac_try_echo=$ac_try;;
3627esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003629 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003630 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003631 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003632 rm -f conftest.er1
3633 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003635 (exit $ac_status); } >/dev/null && {
3636 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3637 test ! -s conftest.err
3638 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003639 # Broken: success on invalid input.
3640continue
3641else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003642 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003643sed 's/^/| /' conftest.$ac_ext >&5
3644
Martin v. Löwis11437992002-04-12 09:54:03 +00003645 # Passes both tests.
3646ac_preproc_ok=:
3647break
3648fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003649
Martin v. Löwis11437992002-04-12 09:54:03 +00003650rm -f conftest.err conftest.$ac_ext
3651
3652done
3653# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3654rm -f conftest.err conftest.$ac_ext
3655if $ac_preproc_ok; then
3656 :
3657else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003658 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003659See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003660echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003661See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003662 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003663fi
3664
3665ac_ext=c
3666ac_cpp='$CPP $CPPFLAGS'
3667ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3668ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3669ac_compiler_gnu=$ac_cv_c_compiler_gnu
3670
3671
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003672{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3673echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003674if test "${ac_cv_path_GREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003675 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003676else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003677 # Extract the first word of "grep ggrep" to use in msg output
3678if test -z "$GREP"; then
3679set dummy grep ggrep; ac_prog_name=$2
3680if test "${ac_cv_path_GREP+set}" = set; then
3681 echo $ECHO_N "(cached) $ECHO_C" >&6
3682else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003683 ac_path_GREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003684# Loop through the user's path and test for each of PROGNAME-LIST
3685as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003686for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3687do
3688 IFS=$as_save_IFS
3689 test -z "$as_dir" && as_dir=.
3690 for ac_prog in grep ggrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003691 for ac_exec_ext in '' $ac_executable_extensions; do
3692 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3693 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3694 # Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003695 # Check for GNU $ac_path_GREP
3696case `"$ac_path_GREP" --version 2>&1` in
3697*GNU*)
3698 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3699*)
3700 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003701 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003702 while :
3703 do
3704 cat "conftest.in" "conftest.in" >"conftest.tmp"
3705 mv "conftest.tmp" "conftest.in"
3706 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003707 echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003708 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3709 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3710 ac_count=`expr $ac_count + 1`
3711 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3712 # Best one so far, save it but keep looking for a better one
3713 ac_cv_path_GREP="$ac_path_GREP"
3714 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003715 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003716 # 10*(2^10) chars as input seems more than enough
3717 test $ac_count -gt 10 && break
3718 done
3719 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3720esac
3721
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003722
3723 $ac_path_GREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003724 done
3725done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003726
3727done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003728IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003729
3730
3731fi
3732
3733GREP="$ac_cv_path_GREP"
3734if test -z "$GREP"; then
3735 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3736echo "$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 +00003737 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003738fi
3739
Martin v. Löwiseba40652007-08-30 20:10:57 +00003740else
3741 ac_cv_path_GREP=$GREP
3742fi
3743
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003744
Martin v. Löwiseba40652007-08-30 20:10:57 +00003745fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003746{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3747echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003748 GREP="$ac_cv_path_GREP"
3749
3750
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003751{ echo "$as_me:$LINENO: checking for egrep" >&5
3752echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003753if test "${ac_cv_path_EGREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003754 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00003755else
3756 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3757 then ac_cv_path_EGREP="$GREP -E"
3758 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003759 # Extract the first word of "egrep" to use in msg output
3760if test -z "$EGREP"; then
3761set dummy egrep; ac_prog_name=$2
3762if test "${ac_cv_path_EGREP+set}" = set; then
3763 echo $ECHO_N "(cached) $ECHO_C" >&6
3764else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003765 ac_path_EGREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003766# Loop through the user's path and test for each of PROGNAME-LIST
3767as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003768for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3769do
3770 IFS=$as_save_IFS
3771 test -z "$as_dir" && as_dir=.
3772 for ac_prog in egrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003773 for ac_exec_ext in '' $ac_executable_extensions; do
3774 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3775 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3776 # Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003777 # Check for GNU $ac_path_EGREP
3778case `"$ac_path_EGREP" --version 2>&1` in
3779*GNU*)
3780 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3781*)
3782 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003783 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003784 while :
3785 do
3786 cat "conftest.in" "conftest.in" >"conftest.tmp"
3787 mv "conftest.tmp" "conftest.in"
3788 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003789 echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003790 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3791 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3792 ac_count=`expr $ac_count + 1`
3793 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3794 # Best one so far, save it but keep looking for a better one
3795 ac_cv_path_EGREP="$ac_path_EGREP"
3796 ac_path_EGREP_max=$ac_count
3797 fi
3798 # 10*(2^10) chars as input seems more than enough
3799 test $ac_count -gt 10 && break
3800 done
3801 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3802esac
3803
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003804
3805 $ac_path_EGREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003806 done
3807done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003808
3809done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003810IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003811
3812
3813fi
3814
3815EGREP="$ac_cv_path_EGREP"
3816if test -z "$EGREP"; then
3817 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3818echo "$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 +00003819 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003820fi
3821
Martin v. Löwiseba40652007-08-30 20:10:57 +00003822else
3823 ac_cv_path_EGREP=$EGREP
3824fi
3825
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003826
Martin v. Löwiseba40652007-08-30 20:10:57 +00003827 fi
3828fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003829{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3830echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003831 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003832
3833
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003834
3835{ echo "$as_me:$LINENO: checking for AIX" >&5
3836echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3837cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003838/* confdefs.h. */
3839_ACEOF
3840cat confdefs.h >>conftest.$ac_ext
3841cat >>conftest.$ac_ext <<_ACEOF
3842/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003843#ifdef _AIX
3844 yes
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003845#endif
3846
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003847_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003848if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3849 $EGREP "yes" >/dev/null 2>&1; then
3850 { echo "$as_me:$LINENO: result: yes" >&5
3851echo "${ECHO_T}yes" >&6; }
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003852cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003853#define _ALL_SOURCE 1
3854_ACEOF
3855
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003856else
3857 { echo "$as_me:$LINENO: result: no" >&5
3858echo "${ECHO_T}no" >&6; }
3859fi
Ronald Oussoren92919a62009-12-24 13:30:58 +00003860rm -f -r conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003861
3862
3863
3864# Check for unsupported systems
3865case $ac_sys_system/$ac_sys_release in
3866atheos*|Linux*/1*)
3867 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3868 echo See README for details.
3869 exit 1;;
3870esac
3871
3872
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003873{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3874echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003875
3876# Check whether --with-suffix was given.
3877if test "${with_suffix+set}" = set; then
3878 withval=$with_suffix;
3879 case $withval in
3880 no) EXEEXT=;;
3881 yes) EXEEXT=.exe;;
3882 *) EXEEXT=$withval;;
3883 esac
3884fi
3885
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003886{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3887echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003888
3889# Test whether we're running on a non-case-sensitive system, in which
3890# case we give a warning if no ext is given
3891
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003892{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3893echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003894if test ! -d CaseSensitiveTestDir; then
3895mkdir CaseSensitiveTestDir
3896fi
3897
3898if test -d casesensitivetestdir
3899then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003900 { echo "$as_me:$LINENO: result: yes" >&5
3901echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003902 BUILDEXEEXT=.exe
3903else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003904 { echo "$as_me:$LINENO: result: no" >&5
3905echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003906 BUILDEXEEXT=$EXEEXT
3907fi
3908rmdir CaseSensitiveTestDir
3909
3910case $MACHDEP in
3911bsdos*)
3912 case $CC in
3913 gcc) CC="$CC -D_HAVE_BSDI";;
3914 esac;;
3915esac
3916
3917case $ac_sys_system in
3918hp*|HP*)
3919 case $CC in
3920 cc|*/cc) CC="$CC -Ae";;
3921 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003922SunOS*)
3923 # Some functions have a prototype only with that define, e.g. confstr
3924
3925cat >>confdefs.h <<\_ACEOF
3926#define __EXTENSIONS__ 1
3927_ACEOF
3928
3929 ;;
3930esac
3931
3932
3933
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003934{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3935echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003936if test -z "$LIBRARY"
3937then
3938 LIBRARY='libpython$(VERSION).a'
3939fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003940{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3941echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003942
3943# LDLIBRARY is the name of the library to link against (as opposed to the
3944# name of the library into which to insert object files). BLDLIBRARY is also
3945# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3946# is blank as the main program is not linked directly against LDLIBRARY.
3947# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3948# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3949# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3950# DLLLIBRARY is the shared (i.e., DLL) library.
3951#
3952# RUNSHARED is used to run shared python without installed libraries
3953#
3954# INSTSONAME is the name of the shared library that will be use to install
3955# on the system - some systems like version suffix, others don't
3956
3957
3958
3959
3960
3961
3962LDLIBRARY="$LIBRARY"
3963BLDLIBRARY='$(LDLIBRARY)'
3964INSTSONAME='$(LDLIBRARY)'
3965DLLLIBRARY=''
3966LDLIBRARYDIR=''
3967RUNSHARED=''
3968
3969# LINKCC is the command that links the python executable -- default is $(CC).
3970# If CXX is set, and if it is needed to link a main function that was
3971# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3972# python might then depend on the C++ runtime
3973# This is altered for AIX in order to build the export list before
3974# linking.
3975
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003976{ echo "$as_me:$LINENO: checking LINKCC" >&5
3977echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003978if test -z "$LINKCC"
3979then
3980 LINKCC='$(PURIFY) $(MAINCC)'
3981 case $ac_sys_system in
3982 AIX*)
3983 exp_extra="\"\""
3984 if test $ac_sys_release -ge 5 -o \
3985 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3986 exp_extra="."
3987 fi
3988 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003989 QNX*)
3990 # qcc must be used because the other compilers do not
3991 # support -N.
3992 LINKCC=qcc;;
3993 esac
3994fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003995{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3996echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003997
3998# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3999# make sure we default having it set to "no": this is used by
4000# distutils.unixccompiler to know if it should add --enable-new-dtags
4001# to linker command lines, and failing to detect GNU ld simply results
4002# in the same bahaviour as before.
4003
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004004{ echo "$as_me:$LINENO: checking for GNU ld" >&5
4005echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004006ac_prog=ld
4007if test "$GCC" = yes; then
4008 ac_prog=`$CC -print-prog-name=ld`
4009fi
4010case `"$ac_prog" -V 2>&1 < /dev/null` in
4011 *GNU*)
4012 GNULD=yes;;
4013 *)
4014 GNULD=no;;
4015esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004016{ echo "$as_me:$LINENO: result: $GNULD" >&5
4017echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004018
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004019{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
4020echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004021# Check whether --enable-shared was given.
4022if test "${enable_shared+set}" = set; then
4023 enableval=$enable_shared;
4024fi
4025
4026
4027if test -z "$enable_shared"
4028then
4029 case $ac_sys_system in
4030 CYGWIN* | atheos*)
4031 enable_shared="yes";;
4032 *)
4033 enable_shared="no";;
4034 esac
4035fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004036{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4037echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004038
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004039{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4040echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004041# Check whether --enable-profiling was given.
4042if test "${enable_profiling+set}" = set; then
4043 enableval=$enable_profiling; ac_save_cc="$CC"
4044 CC="$CC -pg"
4045 if test "$cross_compiling" = yes; then
4046 ac_enable_profiling="no"
4047else
4048 cat >conftest.$ac_ext <<_ACEOF
4049/* confdefs.h. */
4050_ACEOF
4051cat confdefs.h >>conftest.$ac_ext
4052cat >>conftest.$ac_ext <<_ACEOF
4053/* end confdefs.h. */
4054int main() { return 0; }
4055_ACEOF
4056rm -f conftest$ac_exeext
4057if { (ac_try="$ac_link"
4058case "(($ac_try" in
4059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4060 *) ac_try_echo=$ac_try;;
4061esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004063 (eval "$ac_link") 2>&5
4064 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004066 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4067 { (case "(($ac_try" in
4068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4069 *) ac_try_echo=$ac_try;;
4070esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004071eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004072 (eval "$ac_try") 2>&5
4073 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004075 (exit $ac_status); }; }; then
4076 ac_enable_profiling="yes"
4077else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004078 echo "$as_me: program exited with status $ac_status" >&5
4079echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004080sed 's/^/| /' conftest.$ac_ext >&5
4081
4082( exit $ac_status )
4083ac_enable_profiling="no"
4084fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004085rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4086fi
4087
4088
4089 CC="$ac_save_cc"
4090fi
4091
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004092{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4093echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004094
4095case "$ac_enable_profiling" in
4096 "yes")
4097 BASECFLAGS="-pg $BASECFLAGS"
4098 LDFLAGS="-pg $LDFLAGS"
4099 ;;
4100esac
4101
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004102{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4103echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004104
4105# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4106# library that we build, but we do not want to link against it (we
4107# will find it with a -framework option). For this reason there is an
4108# extra variable BLDLIBRARY against which Python and the extension
4109# modules are linked, BLDLIBRARY. This is normally the same as
4110# LDLIBRARY, but empty for MacOSX framework builds.
4111if test "$enable_framework"
4112then
4113 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4114 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4115 BLDLIBRARY=''
4116else
4117 BLDLIBRARY='$(LDLIBRARY)'
4118fi
4119
4120# Other platforms follow
4121if test $enable_shared = "yes"; then
4122
4123cat >>confdefs.h <<\_ACEOF
4124#define Py_ENABLE_SHARED 1
4125_ACEOF
4126
4127 case $ac_sys_system in
4128 BeOS*)
4129 LDLIBRARY='libpython$(VERSION).so'
4130 ;;
4131 CYGWIN*)
4132 LDLIBRARY='libpython$(VERSION).dll.a'
4133 DLLLIBRARY='libpython$(VERSION).dll'
4134 ;;
4135 SunOS*)
4136 LDLIBRARY='libpython$(VERSION).so'
4137 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4138 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4139 INSTSONAME="$LDLIBRARY".$SOVERSION
4140 ;;
4141 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4142 LDLIBRARY='libpython$(VERSION).so'
4143 BLDLIBRARY='-L. -lpython$(VERSION)'
4144 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4145 case $ac_sys_system in
4146 FreeBSD*)
4147 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4148 ;;
4149 esac
4150 INSTSONAME="$LDLIBRARY".$SOVERSION
4151 ;;
4152 hp*|HP*)
4153 case `uname -m` in
4154 ia64)
4155 LDLIBRARY='libpython$(VERSION).so'
4156 ;;
4157 *)
4158 LDLIBRARY='libpython$(VERSION).sl'
4159 ;;
4160 esac
4161 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4162 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4163 ;;
4164 OSF*)
4165 LDLIBRARY='libpython$(VERSION).so'
4166 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4167 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4168 ;;
4169 atheos*)
4170 LDLIBRARY='libpython$(VERSION).so'
4171 BLDLIBRARY='-L. -lpython$(VERSION)'
4172 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4173 ;;
4174 Darwin*)
4175 LDLIBRARY='libpython$(VERSION).dylib'
4176 BLDLIBRARY='-L. -lpython$(VERSION)'
4177 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4178 ;;
4179
4180 esac
4181else # shared is disabled
4182 case $ac_sys_system in
4183 CYGWIN*)
4184 BLDLIBRARY='$(LIBRARY)'
4185 LDLIBRARY='libpython$(VERSION).dll.a'
4186 ;;
4187 esac
4188fi
4189
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004190{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4191echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004192
4193if test -n "$ac_tool_prefix"; then
4194 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4195set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004196{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4197echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004198if test "${ac_cv_prog_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004199 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004200else
4201 if test -n "$RANLIB"; then
4202 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4203else
4204as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4205for as_dir in $PATH
4206do
4207 IFS=$as_save_IFS
4208 test -z "$as_dir" && as_dir=.
4209 for ac_exec_ext in '' $ac_executable_extensions; do
4210 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4211 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004212 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004213 break 2
4214 fi
4215done
4216done
4217IFS=$as_save_IFS
4218
4219fi
4220fi
4221RANLIB=$ac_cv_prog_RANLIB
4222if test -n "$RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004223 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4224echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004225else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004226 { echo "$as_me:$LINENO: result: no" >&5
4227echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004228fi
4229
4230
4231fi
4232if test -z "$ac_cv_prog_RANLIB"; then
4233 ac_ct_RANLIB=$RANLIB
4234 # Extract the first word of "ranlib", so it can be a program name with args.
4235set dummy ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004236{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4237echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004238if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004239 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004240else
4241 if test -n "$ac_ct_RANLIB"; then
4242 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4243else
4244as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4245for as_dir in $PATH
4246do
4247 IFS=$as_save_IFS
4248 test -z "$as_dir" && as_dir=.
4249 for ac_exec_ext in '' $ac_executable_extensions; do
4250 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4251 ac_cv_prog_ac_ct_RANLIB="ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004252 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004253 break 2
4254 fi
4255done
4256done
4257IFS=$as_save_IFS
4258
4259fi
4260fi
4261ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4262if test -n "$ac_ct_RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004263 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4264echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004265else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004266 { echo "$as_me:$LINENO: result: no" >&5
4267echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004268fi
4269
4270 if test "x$ac_ct_RANLIB" = x; then
4271 RANLIB=":"
4272 else
4273 case $cross_compiling:$ac_tool_warned in
4274yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004275{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4276whose name does not start with the host triplet. If you think this
4277configuration is useful to you, please write to autoconf@gnu.org." >&5
4278echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4279whose name does not start with the host triplet. If you think this
4280configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004281ac_tool_warned=yes ;;
4282esac
4283 RANLIB=$ac_ct_RANLIB
4284 fi
4285else
4286 RANLIB="$ac_cv_prog_RANLIB"
4287fi
4288
4289
4290for ac_prog in ar aal
4291do
4292 # Extract the first word of "$ac_prog", so it can be a program name with args.
4293set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004294{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4295echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004296if test "${ac_cv_prog_AR+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004297 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004298else
4299 if test -n "$AR"; then
4300 ac_cv_prog_AR="$AR" # Let the user override the test.
4301else
4302as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4303for as_dir in $PATH
4304do
4305 IFS=$as_save_IFS
4306 test -z "$as_dir" && as_dir=.
4307 for ac_exec_ext in '' $ac_executable_extensions; do
4308 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4309 ac_cv_prog_AR="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004310 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004311 break 2
4312 fi
4313done
4314done
4315IFS=$as_save_IFS
4316
4317fi
4318fi
4319AR=$ac_cv_prog_AR
4320if test -n "$AR"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004321 { echo "$as_me:$LINENO: result: $AR" >&5
4322echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004323else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004324 { echo "$as_me:$LINENO: result: no" >&5
4325echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004326fi
4327
4328
4329 test -n "$AR" && break
4330done
4331test -n "$AR" || AR="ar"
4332
4333
4334# tweak ARFLAGS only if the user didn't set it on the command line
4335
4336if test -z "$ARFLAGS"
4337then
4338 ARFLAGS="rc"
4339fi
4340
4341
4342# Extract the first word of "svnversion", so it can be a program name with args.
4343set dummy svnversion; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004344{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4345echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004346if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004347 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004348else
4349 if test -n "$SVNVERSION"; then
4350 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4351else
4352as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4353for as_dir in $PATH
4354do
4355 IFS=$as_save_IFS
4356 test -z "$as_dir" && as_dir=.
4357 for ac_exec_ext in '' $ac_executable_extensions; do
4358 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4359 ac_cv_prog_SVNVERSION="found"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004360 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004361 break 2
4362 fi
4363done
4364done
4365IFS=$as_save_IFS
4366
4367 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4368fi
4369fi
4370SVNVERSION=$ac_cv_prog_SVNVERSION
4371if test -n "$SVNVERSION"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004372 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4373echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004374else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004375 { echo "$as_me:$LINENO: result: no" >&5
4376echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004377fi
4378
4379
4380if test $SVNVERSION = found
4381then
4382 SVNVERSION="svnversion \$(srcdir)"
4383else
4384 SVNVERSION="echo Unversioned directory"
4385fi
4386
4387case $MACHDEP in
4388bsdos*|hp*|HP*)
4389 # install -d does not work on BSDI or HP-UX
4390 if test -z "$INSTALL"
4391 then
4392 INSTALL="${srcdir}/install-sh -c"
4393 fi
4394esac
4395ac_aux_dir=
4396for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4397 if test -f "$ac_dir/install-sh"; then
4398 ac_aux_dir=$ac_dir
4399 ac_install_sh="$ac_aux_dir/install-sh -c"
4400 break
4401 elif test -f "$ac_dir/install.sh"; then
4402 ac_aux_dir=$ac_dir
4403 ac_install_sh="$ac_aux_dir/install.sh -c"
4404 break
4405 elif test -f "$ac_dir/shtool"; then
4406 ac_aux_dir=$ac_dir
4407 ac_install_sh="$ac_aux_dir/shtool install -c"
4408 break
4409 fi
4410done
4411if test -z "$ac_aux_dir"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004412 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4413echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004414 { (exit 1); exit 1; }; }
4415fi
4416
4417# These three variables are undocumented and unsupported,
4418# and are intended to be withdrawn in a future Autoconf release.
4419# They can cause serious problems if a builder's source tree is in a directory
4420# whose full name contains unusual characters.
4421ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4422ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4423ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4424
4425
4426# Find a good install program. We prefer a C program (faster),
4427# so one script is as good as another. But avoid the broken or
4428# incompatible versions:
4429# SysV /etc/install, /usr/sbin/install
4430# SunOS /usr/etc/install
4431# IRIX /sbin/install
4432# AIX /bin/install
4433# AmigaOS /C/install, which installs bootblocks on floppy discs
4434# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4435# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4436# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4437# OS/2's system install, which has a completely different semantic
4438# ./install, which can be erroneously created by make from ./install.sh.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004439{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4440echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004441if test -z "$INSTALL"; then
4442if test "${ac_cv_path_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004443 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004444else
4445 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4446for as_dir in $PATH
4447do
4448 IFS=$as_save_IFS
4449 test -z "$as_dir" && as_dir=.
4450 # Account for people who put trailing slashes in PATH elements.
4451case $as_dir/ in
4452 ./ | .// | /cC/* | \
4453 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4454 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4455 /usr/ucb/* ) ;;
4456 *)
4457 # OSF1 and SCO ODT 3.0 have their own names for install.
4458 # Don't use installbsd from OSF since it installs stuff as root
4459 # by default.
4460 for ac_prog in ginstall scoinst install; do
4461 for ac_exec_ext in '' $ac_executable_extensions; do
4462 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4463 if test $ac_prog = install &&
4464 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4465 # AIX install. It has an incompatible calling convention.
4466 :
4467 elif test $ac_prog = install &&
4468 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4469 # program-specific install script used by HP pwplus--don't use.
4470 :
4471 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004472 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4473 break 3
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004474 fi
4475 fi
4476 done
4477 done
4478 ;;
4479esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004480done
4481IFS=$as_save_IFS
4482
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004483
4484fi
4485 if test "${ac_cv_path_install+set}" = set; then
4486 INSTALL=$ac_cv_path_install
4487 else
4488 # As a last resort, use the slow shell script. Don't cache a
4489 # value for INSTALL within a source directory, because that will
4490 # break other packages using the cache if that directory is
4491 # removed, or if the value is a relative name.
4492 INSTALL=$ac_install_sh
4493 fi
4494fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004495{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4496echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004497
4498# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4499# It thinks the first close brace ends the variable substitution.
4500test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4501
4502test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4503
4504test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4505
4506
4507# Not every filesystem supports hard links
4508
4509if test -z "$LN" ; then
4510 case $ac_sys_system in
4511 BeOS*) LN="ln -s";;
4512 CYGWIN*) LN="ln -s";;
4513 atheos*) LN="ln -s";;
4514 *) LN=ln;;
4515 esac
4516fi
4517
4518# Check for --with-pydebug
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004519{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4520echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004521
4522# Check whether --with-pydebug was given.
4523if test "${with_pydebug+set}" = set; then
4524 withval=$with_pydebug;
4525if test "$withval" != no
4526then
4527
4528cat >>confdefs.h <<\_ACEOF
4529#define Py_DEBUG 1
4530_ACEOF
4531
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004532 { echo "$as_me:$LINENO: result: yes" >&5
4533echo "${ECHO_T}yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004534 Py_DEBUG='true'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004535else { echo "$as_me:$LINENO: result: no" >&5
4536echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004537fi
4538else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004539 { echo "$as_me:$LINENO: result: no" >&5
4540echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004541fi
4542
4543
4544# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4545# merged with this chunk of code?
4546
4547# Optimizer/debugger flags
4548# ------------------------
4549# (The following bit of code is complicated enough - please keep things
4550# indented properly. Just pretend you're editing Python code. ;-)
4551
4552# There are two parallel sets of case statements below, one that checks to
4553# see if OPT was set and one that does BASECFLAGS setting based upon
4554# compiler and platform. BASECFLAGS tweaks need to be made even if the
4555# user set OPT.
4556
4557# tweak OPT based on compiler and platform, only if the user didn't set
4558# it on the command line
4559
4560if test -z "$OPT"
4561then
4562 case $GCC in
4563 yes)
4564 if test "$CC" != 'g++' ; then
4565 STRICT_PROTO="-Wstrict-prototypes"
4566 fi
4567 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4568 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4569 WRAP="-fwrapv"
4570 fi
4571 case $ac_cv_prog_cc_g in
4572 yes)
4573 if test "$Py_DEBUG" = 'true' ; then
4574 # Optimization messes up debuggers, so turn it off for
4575 # debug builds.
4576 OPT="-g -Wall $STRICT_PROTO"
4577 else
4578 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4579 fi
4580 ;;
4581 *)
4582 OPT="-O3 -Wall $STRICT_PROTO"
4583 ;;
4584 esac
4585 case $ac_sys_system in
4586 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4587 ;;
4588 esac
4589 ;;
4590
4591 *)
4592 OPT="-O"
4593 ;;
4594 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004595fi
4596
4597
4598
4599# The -arch flags for universal builds on OSX
4600UNIVERSAL_ARCH_FLAGS=
4601
4602
4603# tweak BASECFLAGS based on compiler and platform
4604case $GCC in
4605yes)
4606 # Python violates C99 rules, by casting between incompatible
4607 # pointer types. GCC may generate bad code as a result of that,
4608 # so use -fno-strict-aliasing if supported.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004609 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4610echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004611 ac_save_cc="$CC"
4612 CC="$CC -fno-strict-aliasing"
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004613 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
4614 echo $ECHO_N "(cached) $ECHO_C" >&6
4615else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004616 cat >conftest.$ac_ext <<_ACEOF
4617/* confdefs.h. */
4618_ACEOF
4619cat confdefs.h >>conftest.$ac_ext
4620cat >>conftest.$ac_ext <<_ACEOF
4621/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004622
4623int
4624main ()
4625{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004626int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004627 ;
4628 return 0;
4629}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004630_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004631rm -f conftest.$ac_objext
4632if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004633case "(($ac_try" in
4634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4635 *) ac_try_echo=$ac_try;;
4636esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004638 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004639 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004640 grep -v '^ *+' conftest.er1 >conftest.err
4641 rm -f conftest.er1
4642 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004644 (exit $ac_status); } && {
4645 test -z "$ac_c_werror_flag" ||
4646 test ! -s conftest.err
4647 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004648 ac_cv_no_strict_aliasing_ok=yes
4649else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004650 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004651sed 's/^/| /' conftest.$ac_ext >&5
4652
Gregory P. Smith373469a2009-11-01 21:03:38 +00004653 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004654fi
4655
Gregory P. Smith373469a2009-11-01 21:03:38 +00004656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004657fi
4658
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004659 CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004660 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4661echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004662 if test $ac_cv_no_strict_aliasing_ok = yes
4663 then
4664 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4665 fi
4666
4667 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4668 # support. Without this, treatment of subnormals doesn't follow
4669 # the standard.
4670 case $ac_sys_machine in
4671 alpha*)
4672 BASECFLAGS="$BASECFLAGS -mieee"
4673 ;;
4674 esac
4675
4676 case $ac_sys_system in
4677 SCO_SV*)
4678 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4679 ;;
4680 # is there any other compiler on Darwin besides gcc?
4681 Darwin*)
4682 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4683 # used to be here, but non-Apple gcc doesn't accept them.
4684
4685
4686 if test "${enable_universalsdk}"; then
4687 UNIVERSAL_ARCH_FLAGS=""
4688 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4689 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4690 ARCH_RUN_32BIT=""
Ronald Oussoren92919a62009-12-24 13:30:58 +00004691 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004692
4693 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4694 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren92919a62009-12-24 13:30:58 +00004695 LIPO_32BIT_FLAGS=""
Ronald Oussoren25967582009-09-06 10:00:26 +00004696 ARCH_RUN_32BIT="true"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004697
4698 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4699 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren92919a62009-12-24 13:30:58 +00004700 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004701 ARCH_RUN_32BIT="arch -i386 -ppc"
4702
Ronald Oussoren23d92532009-09-07 06:12:00 +00004703 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4704 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren92919a62009-12-24 13:30:58 +00004705 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren23d92532009-09-07 06:12:00 +00004706 ARCH_RUN_32BIT="arch -i386"
4707
4708 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4709 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren92919a62009-12-24 13:30:58 +00004710 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
4711 ARCH_RUN_32BIT="arch -i386 -ppc7400"
Ronald Oussoren23d92532009-09-07 06:12:00 +00004712
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004713 else
Ronald Oussorena9cfbde2009-09-20 20:05:44 +00004714 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4715echo "$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 +00004716 { (exit 1); exit 1; }; }
4717
4718 fi
4719
4720
4721 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4722 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4723 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4724 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4725 fi
4726 fi
4727
4728 # Calculate the right deployment target for this build.
4729 #
4730 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4731 if test ${cur_target} '>' 10.2; then
4732 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00004733 if test ${enable_universalsdk}; then
4734 if test "${UNIVERSAL_ARCHS}" = "all"; then
4735 # Ensure that the default platform for a
4736 # 4-way universal build is OSX 10.5,
4737 # that's the first OS release where
4738 # 4-way builds make sense.
4739 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00004740
4741 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4742 cur_target='10.5'
4743
4744 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4745 cur_target='10.5'
4746
4747 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4748 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00004749 fi
4750 else
4751 if test `arch` = "i386"; then
4752 # On Intel macs default to a deployment
4753 # target of 10.4, that's the first OSX
4754 # release with Intel support.
4755 cur_target="10.4"
4756 fi
4757 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004758 fi
4759 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4760
4761 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4762 # environment with a value that is the same as what we'll use
4763 # in the Makefile to ensure that we'll get the same compiler
4764 # environment during configure and build time.
4765 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4766 export MACOSX_DEPLOYMENT_TARGET
4767 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4768
4769 ;;
4770 OSF*)
4771 BASECFLAGS="$BASECFLAGS -mieee"
4772 ;;
4773 esac
4774 ;;
4775
4776*)
4777 case $ac_sys_system in
4778 OpenUNIX*|UnixWare*)
4779 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4780 ;;
4781 OSF*)
4782 BASECFLAGS="$BASECFLAGS -ieee -std"
4783 ;;
4784 SCO_SV*)
4785 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4786 ;;
4787 esac
4788 ;;
4789esac
4790
4791if test "$Py_DEBUG" = 'true'; then
4792 :
4793else
4794 OPT="-DNDEBUG $OPT"
4795fi
4796
4797if test "$ac_arch_flags"
4798then
4799 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4800fi
4801
4802# disable check for icc since it seems to pass, but generates a warning
4803if test "$CC" = icc
4804then
4805 ac_cv_opt_olimit_ok=no
4806fi
4807
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004808{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4809echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004810if test "${ac_cv_opt_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004811 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004812else
4813 ac_save_cc="$CC"
4814CC="$CC -OPT:Olimit=0"
Gregory P. Smith373469a2009-11-01 21:03:38 +00004815cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004816/* confdefs.h. */
4817_ACEOF
4818cat confdefs.h >>conftest.$ac_ext
4819cat >>conftest.$ac_ext <<_ACEOF
4820/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004821
4822int
4823main ()
4824{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004825int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004826 ;
4827 return 0;
4828}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004829_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004830rm -f conftest.$ac_objext
4831if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004832case "(($ac_try" in
4833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4834 *) ac_try_echo=$ac_try;;
4835esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004837 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004838 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004839 grep -v '^ *+' conftest.er1 >conftest.err
4840 rm -f conftest.er1
4841 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004843 (exit $ac_status); } && {
4844 test -z "$ac_c_werror_flag" ||
4845 test ! -s conftest.err
4846 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004847 ac_cv_opt_olimit_ok=yes
4848else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004849 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004850sed 's/^/| /' conftest.$ac_ext >&5
4851
Gregory P. Smith373469a2009-11-01 21:03:38 +00004852 ac_cv_opt_olimit_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004853fi
4854
Gregory P. Smith373469a2009-11-01 21:03:38 +00004855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004856CC="$ac_save_cc"
4857fi
4858
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004859{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4860echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004861if test $ac_cv_opt_olimit_ok = yes; then
4862 case $ac_sys_system in
4863 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4864 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4865 # environment?
4866 Darwin*)
4867 ;;
4868 *)
4869 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4870 ;;
4871 esac
4872else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004873 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4874echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004875 if test "${ac_cv_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004876 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004877else
4878 ac_save_cc="$CC"
4879 CC="$CC -Olimit 1500"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004880 cat >conftest.$ac_ext <<_ACEOF
4881/* confdefs.h. */
4882_ACEOF
4883cat confdefs.h >>conftest.$ac_ext
4884cat >>conftest.$ac_ext <<_ACEOF
4885/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004886
4887int
4888main ()
4889{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004890int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004891 ;
4892 return 0;
4893}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004894_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004895rm -f conftest.$ac_objext
4896if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004897case "(($ac_try" in
4898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4899 *) ac_try_echo=$ac_try;;
4900esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004902 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004903 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004904 grep -v '^ *+' conftest.er1 >conftest.err
4905 rm -f conftest.er1
4906 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004908 (exit $ac_status); } && {
4909 test -z "$ac_c_werror_flag" ||
4910 test ! -s conftest.err
4911 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004912 ac_cv_olimit_ok=yes
4913else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004914 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004915sed 's/^/| /' conftest.$ac_ext >&5
4916
Gregory P. Smith373469a2009-11-01 21:03:38 +00004917 ac_cv_olimit_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004918fi
4919
Gregory P. Smith373469a2009-11-01 21:03:38 +00004920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004921 CC="$ac_save_cc"
4922fi
4923
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004924 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4925echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004926 if test $ac_cv_olimit_ok = yes; then
4927 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4928 fi
4929fi
4930
4931# Check whether GCC supports PyArg_ParseTuple format
4932if test "$GCC" = "yes"
4933then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004934 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4935echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004936 save_CFLAGS=$CFLAGS
4937 CFLAGS="$CFLAGS -Werror"
4938 cat >conftest.$ac_ext <<_ACEOF
4939/* confdefs.h. */
4940_ACEOF
4941cat confdefs.h >>conftest.$ac_ext
4942cat >>conftest.$ac_ext <<_ACEOF
4943/* end confdefs.h. */
4944
4945 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4946
4947int
4948main ()
4949{
4950
4951 ;
4952 return 0;
4953}
4954_ACEOF
4955rm -f conftest.$ac_objext
4956if { (ac_try="$ac_compile"
4957case "(($ac_try" in
4958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4959 *) ac_try_echo=$ac_try;;
4960esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004962 (eval "$ac_compile") 2>conftest.er1
4963 ac_status=$?
4964 grep -v '^ *+' conftest.er1 >conftest.err
4965 rm -f conftest.er1
4966 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004968 (exit $ac_status); } && {
4969 test -z "$ac_c_werror_flag" ||
4970 test ! -s conftest.err
4971 } && test -s conftest.$ac_objext; then
4972
4973cat >>confdefs.h <<\_ACEOF
4974#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4975_ACEOF
4976
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004977 { echo "$as_me:$LINENO: result: yes" >&5
4978echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004979else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004980 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004981sed 's/^/| /' conftest.$ac_ext >&5
4982
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004983 { echo "$as_me:$LINENO: result: no" >&5
4984echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004985
4986fi
4987
4988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4989 CFLAGS=$save_CFLAGS
4990fi
4991
4992# On some compilers, pthreads are available without further options
4993# (e.g. MacOS X). On some of these systems, the compiler will not
4994# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4995# So we have to see first whether pthreads are available without
4996# options before we can check whether -Kpthread improves anything.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004997{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4998echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004999if test "${ac_cv_pthread_is_default+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005000 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005001else
5002 if test "$cross_compiling" = yes; then
5003 ac_cv_pthread_is_default=no
5004else
5005 cat >conftest.$ac_ext <<_ACEOF
5006/* confdefs.h. */
5007_ACEOF
5008cat confdefs.h >>conftest.$ac_ext
5009cat >>conftest.$ac_ext <<_ACEOF
5010/* end confdefs.h. */
5011
5012#include <pthread.h>
5013
5014void* routine(void* p){return NULL;}
5015
5016int main(){
5017 pthread_t p;
5018 if(pthread_create(&p,NULL,routine,NULL)!=0)
5019 return 1;
5020 (void)pthread_detach(p);
5021 return 0;
5022}
5023
5024_ACEOF
5025rm -f conftest$ac_exeext
5026if { (ac_try="$ac_link"
5027case "(($ac_try" in
5028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5029 *) ac_try_echo=$ac_try;;
5030esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005032 (eval "$ac_link") 2>&5
5033 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005035 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5036 { (case "(($ac_try" in
5037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5038 *) ac_try_echo=$ac_try;;
5039esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005041 (eval "$ac_try") 2>&5
5042 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005044 (exit $ac_status); }; }; then
5045
5046 ac_cv_pthread_is_default=yes
5047 ac_cv_kthread=no
5048 ac_cv_pthread=no
5049
5050else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005051 echo "$as_me: program exited with status $ac_status" >&5
5052echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005053sed 's/^/| /' conftest.$ac_ext >&5
5054
5055( exit $ac_status )
5056ac_cv_pthread_is_default=no
5057fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005058rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5059fi
5060
5061
5062
5063fi
5064
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005065{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5066echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005067
5068
5069if test $ac_cv_pthread_is_default = yes
5070then
5071 ac_cv_kpthread=no
5072else
5073# -Kpthread, if available, provides the right #defines
5074# and linker options to make pthread_create available
5075# Some compilers won't report that they do not support -Kpthread,
5076# so we need to run a program to see whether it really made the
5077# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005078{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5079echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005080if test "${ac_cv_kpthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005081 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005082else
5083 ac_save_cc="$CC"
5084CC="$CC -Kpthread"
5085if test "$cross_compiling" = yes; then
5086 ac_cv_kpthread=no
5087else
5088 cat >conftest.$ac_ext <<_ACEOF
5089/* confdefs.h. */
5090_ACEOF
5091cat confdefs.h >>conftest.$ac_ext
5092cat >>conftest.$ac_ext <<_ACEOF
5093/* end confdefs.h. */
5094
5095#include <pthread.h>
5096
5097void* routine(void* p){return NULL;}
5098
5099int main(){
5100 pthread_t p;
5101 if(pthread_create(&p,NULL,routine,NULL)!=0)
5102 return 1;
5103 (void)pthread_detach(p);
5104 return 0;
5105}
5106
5107_ACEOF
5108rm -f conftest$ac_exeext
5109if { (ac_try="$ac_link"
5110case "(($ac_try" in
5111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5112 *) ac_try_echo=$ac_try;;
5113esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005115 (eval "$ac_link") 2>&5
5116 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005118 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5119 { (case "(($ac_try" in
5120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5121 *) ac_try_echo=$ac_try;;
5122esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005124 (eval "$ac_try") 2>&5
5125 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005127 (exit $ac_status); }; }; then
5128 ac_cv_kpthread=yes
5129else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005130 echo "$as_me: program exited with status $ac_status" >&5
5131echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005132sed 's/^/| /' conftest.$ac_ext >&5
5133
5134( exit $ac_status )
5135ac_cv_kpthread=no
5136fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005137rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5138fi
5139
5140
5141CC="$ac_save_cc"
5142fi
5143
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005144{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5145echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005146fi
5147
5148if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5149then
5150# -Kthread, if available, provides the right #defines
5151# and linker options to make pthread_create available
5152# Some compilers won't report that they do not support -Kthread,
5153# so we need to run a program to see whether it really made the
5154# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005155{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5156echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005157if test "${ac_cv_kthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005158 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005159else
5160 ac_save_cc="$CC"
5161CC="$CC -Kthread"
5162if test "$cross_compiling" = yes; then
5163 ac_cv_kthread=no
5164else
5165 cat >conftest.$ac_ext <<_ACEOF
5166/* confdefs.h. */
5167_ACEOF
5168cat confdefs.h >>conftest.$ac_ext
5169cat >>conftest.$ac_ext <<_ACEOF
5170/* end confdefs.h. */
5171
5172#include <pthread.h>
5173
5174void* routine(void* p){return NULL;}
5175
5176int main(){
5177 pthread_t p;
5178 if(pthread_create(&p,NULL,routine,NULL)!=0)
5179 return 1;
5180 (void)pthread_detach(p);
5181 return 0;
5182}
5183
5184_ACEOF
5185rm -f conftest$ac_exeext
5186if { (ac_try="$ac_link"
5187case "(($ac_try" in
5188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5189 *) ac_try_echo=$ac_try;;
5190esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005192 (eval "$ac_link") 2>&5
5193 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005195 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5196 { (case "(($ac_try" in
5197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5198 *) ac_try_echo=$ac_try;;
5199esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005201 (eval "$ac_try") 2>&5
5202 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005204 (exit $ac_status); }; }; then
5205 ac_cv_kthread=yes
5206else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005207 echo "$as_me: program exited with status $ac_status" >&5
5208echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005209sed 's/^/| /' conftest.$ac_ext >&5
5210
5211( exit $ac_status )
5212ac_cv_kthread=no
5213fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005214rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5215fi
5216
5217
5218CC="$ac_save_cc"
5219fi
5220
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005221{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5222echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005223fi
5224
5225if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5226then
5227# -pthread, if available, provides the right #defines
5228# and linker options to make pthread_create available
5229# Some compilers won't report that they do not support -pthread,
5230# so we need to run a program to see whether it really made the
5231# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005232{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5233echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005234if test "${ac_cv_thread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005235 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005236else
5237 ac_save_cc="$CC"
5238CC="$CC -pthread"
5239if test "$cross_compiling" = yes; then
5240 ac_cv_pthread=no
5241else
5242 cat >conftest.$ac_ext <<_ACEOF
5243/* confdefs.h. */
5244_ACEOF
5245cat confdefs.h >>conftest.$ac_ext
5246cat >>conftest.$ac_ext <<_ACEOF
5247/* end confdefs.h. */
5248
5249#include <pthread.h>
5250
5251void* routine(void* p){return NULL;}
5252
5253int main(){
5254 pthread_t p;
5255 if(pthread_create(&p,NULL,routine,NULL)!=0)
5256 return 1;
5257 (void)pthread_detach(p);
5258 return 0;
5259}
5260
5261_ACEOF
5262rm -f conftest$ac_exeext
5263if { (ac_try="$ac_link"
5264case "(($ac_try" in
5265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5266 *) ac_try_echo=$ac_try;;
5267esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005269 (eval "$ac_link") 2>&5
5270 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005272 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5273 { (case "(($ac_try" in
5274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5275 *) ac_try_echo=$ac_try;;
5276esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005278 (eval "$ac_try") 2>&5
5279 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005281 (exit $ac_status); }; }; then
5282 ac_cv_pthread=yes
5283else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005284 echo "$as_me: program exited with status $ac_status" >&5
5285echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005286sed 's/^/| /' conftest.$ac_ext >&5
5287
5288( exit $ac_status )
5289ac_cv_pthread=no
5290fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005291rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5292fi
5293
5294
5295CC="$ac_save_cc"
5296fi
5297
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005298{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5299echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005300fi
5301
5302# If we have set a CC compiler flag for thread support then
5303# check if it works for CXX, too.
5304ac_cv_cxx_thread=no
5305if test ! -z "$CXX"
5306then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005307{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5308echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005309ac_save_cxx="$CXX"
5310
5311if test "$ac_cv_kpthread" = "yes"
5312then
5313 CXX="$CXX -Kpthread"
5314 ac_cv_cxx_thread=yes
5315elif test "$ac_cv_kthread" = "yes"
5316then
5317 CXX="$CXX -Kthread"
5318 ac_cv_cxx_thread=yes
5319elif test "$ac_cv_pthread" = "yes"
5320then
5321 CXX="$CXX -pthread"
5322 ac_cv_cxx_thread=yes
5323fi
5324
5325if test $ac_cv_cxx_thread = yes
5326then
5327 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5328 $CXX -c conftest.$ac_ext 2>&5
5329 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5330 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5331 then
5332 ac_cv_cxx_thread=yes
5333 else
5334 ac_cv_cxx_thread=no
5335 fi
5336 rm -fr conftest*
5337fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005338{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5339echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005340fi
5341CXX="$ac_save_cxx"
5342
5343
5344# checks for header files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005345{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5346echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005347if test "${ac_cv_header_stdc+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005348 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005349else
5350 cat >conftest.$ac_ext <<_ACEOF
5351/* confdefs.h. */
5352_ACEOF
5353cat confdefs.h >>conftest.$ac_ext
5354cat >>conftest.$ac_ext <<_ACEOF
5355/* end confdefs.h. */
5356#include <stdlib.h>
5357#include <stdarg.h>
5358#include <string.h>
5359#include <float.h>
5360
5361int
5362main ()
5363{
5364
5365 ;
5366 return 0;
5367}
5368_ACEOF
5369rm -f conftest.$ac_objext
5370if { (ac_try="$ac_compile"
5371case "(($ac_try" in
5372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5373 *) ac_try_echo=$ac_try;;
5374esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005376 (eval "$ac_compile") 2>conftest.er1
5377 ac_status=$?
5378 grep -v '^ *+' conftest.er1 >conftest.err
5379 rm -f conftest.er1
5380 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005382 (exit $ac_status); } && {
5383 test -z "$ac_c_werror_flag" ||
5384 test ! -s conftest.err
5385 } && test -s conftest.$ac_objext; then
5386 ac_cv_header_stdc=yes
5387else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005388 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005389sed 's/^/| /' conftest.$ac_ext >&5
5390
5391 ac_cv_header_stdc=no
5392fi
5393
5394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5395
5396if test $ac_cv_header_stdc = yes; then
5397 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5398 cat >conftest.$ac_ext <<_ACEOF
5399/* confdefs.h. */
5400_ACEOF
5401cat confdefs.h >>conftest.$ac_ext
5402cat >>conftest.$ac_ext <<_ACEOF
5403/* end confdefs.h. */
5404#include <string.h>
5405
5406_ACEOF
5407if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5408 $EGREP "memchr" >/dev/null 2>&1; then
5409 :
5410else
5411 ac_cv_header_stdc=no
5412fi
Ronald Oussoren92919a62009-12-24 13:30:58 +00005413rm -f -r conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005414
5415fi
5416
5417if test $ac_cv_header_stdc = yes; then
5418 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5419 cat >conftest.$ac_ext <<_ACEOF
5420/* confdefs.h. */
5421_ACEOF
5422cat confdefs.h >>conftest.$ac_ext
5423cat >>conftest.$ac_ext <<_ACEOF
5424/* end confdefs.h. */
5425#include <stdlib.h>
5426
5427_ACEOF
5428if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5429 $EGREP "free" >/dev/null 2>&1; then
5430 :
5431else
5432 ac_cv_header_stdc=no
5433fi
Ronald Oussoren92919a62009-12-24 13:30:58 +00005434rm -f -r conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005435
5436fi
5437
5438if test $ac_cv_header_stdc = yes; then
5439 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5440 if test "$cross_compiling" = yes; then
5441 :
5442else
5443 cat >conftest.$ac_ext <<_ACEOF
5444/* confdefs.h. */
5445_ACEOF
5446cat confdefs.h >>conftest.$ac_ext
5447cat >>conftest.$ac_ext <<_ACEOF
5448/* end confdefs.h. */
5449#include <ctype.h>
5450#include <stdlib.h>
5451#if ((' ' & 0x0FF) == 0x020)
5452# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5453# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5454#else
5455# define ISLOWER(c) \
5456 (('a' <= (c) && (c) <= 'i') \
5457 || ('j' <= (c) && (c) <= 'r') \
5458 || ('s' <= (c) && (c) <= 'z'))
5459# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5460#endif
5461
5462#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5463int
5464main ()
5465{
5466 int i;
5467 for (i = 0; i < 256; i++)
5468 if (XOR (islower (i), ISLOWER (i))
5469 || toupper (i) != TOUPPER (i))
5470 return 2;
5471 return 0;
5472}
5473_ACEOF
5474rm -f conftest$ac_exeext
5475if { (ac_try="$ac_link"
5476case "(($ac_try" in
5477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5478 *) ac_try_echo=$ac_try;;
5479esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005481 (eval "$ac_link") 2>&5
5482 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005484 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5485 { (case "(($ac_try" in
5486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5487 *) ac_try_echo=$ac_try;;
5488esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005490 (eval "$ac_try") 2>&5
5491 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005493 (exit $ac_status); }; }; then
5494 :
5495else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005496 echo "$as_me: program exited with status $ac_status" >&5
5497echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005498sed 's/^/| /' conftest.$ac_ext >&5
5499
5500( exit $ac_status )
5501ac_cv_header_stdc=no
5502fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005503rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5504fi
5505
5506
5507fi
5508fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005509{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5510echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005511if test $ac_cv_header_stdc = yes; then
5512
5513cat >>confdefs.h <<\_ACEOF
5514#define STDC_HEADERS 1
5515_ACEOF
5516
5517fi
5518
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005519# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5530 inttypes.h stdint.h unistd.h
5531do
5532as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5533{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5534echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5535if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5536 echo $ECHO_N "(cached) $ECHO_C" >&6
5537else
5538 cat >conftest.$ac_ext <<_ACEOF
5539/* confdefs.h. */
5540_ACEOF
5541cat confdefs.h >>conftest.$ac_ext
5542cat >>conftest.$ac_ext <<_ACEOF
5543/* end confdefs.h. */
5544$ac_includes_default
5545
5546#include <$ac_header>
5547_ACEOF
5548rm -f conftest.$ac_objext
5549if { (ac_try="$ac_compile"
5550case "(($ac_try" in
5551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5552 *) ac_try_echo=$ac_try;;
5553esac
5554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5555 (eval "$ac_compile") 2>conftest.er1
5556 ac_status=$?
5557 grep -v '^ *+' conftest.er1 >conftest.err
5558 rm -f conftest.er1
5559 cat conftest.err >&5
5560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5561 (exit $ac_status); } && {
5562 test -z "$ac_c_werror_flag" ||
5563 test ! -s conftest.err
5564 } && test -s conftest.$ac_objext; then
5565 eval "$as_ac_Header=yes"
5566else
5567 echo "$as_me: failed program was:" >&5
5568sed 's/^/| /' conftest.$ac_ext >&5
5569
5570 eval "$as_ac_Header=no"
5571fi
5572
5573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5574fi
5575ac_res=`eval echo '${'$as_ac_Header'}'`
5576 { echo "$as_me:$LINENO: result: $ac_res" >&5
5577echo "${ECHO_T}$ac_res" >&6; }
5578if test `eval echo '${'$as_ac_Header'}'` = yes; then
5579 cat >>confdefs.h <<_ACEOF
5580#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5581_ACEOF
5582
5583fi
5584
5585done
5586
5587
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005588
Martin v. Löwis11437992002-04-12 09:54:03 +00005589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
Anthony Baxter8a560de2004-10-13 15:30:56 +00005624
Martin v. Löwisc3001752005-01-23 09:27:24 +00005625
Martin v. Löwis11017b12006-01-14 18:12:57 +00005626
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005627
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005628
5629
5630
5631
5632
5633
5634
5635
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005636
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005637
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005638
5639
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005640
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005641
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005642for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5643fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005644ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005645shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005646unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005647sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5648sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005649sys/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 +00005650sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005651sys/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 +00005652sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005653bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005654do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005655as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005656if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005657 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5658echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
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 $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005661fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005662ac_res=`eval echo '${'$as_ac_Header'}'`
5663 { echo "$as_me:$LINENO: result: $ac_res" >&5
5664echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005665else
Martin v. Löwis11437992002-04-12 09:54:03 +00005666 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005667{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5668echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005669cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005670/* confdefs.h. */
5671_ACEOF
5672cat confdefs.h >>conftest.$ac_ext
5673cat >>conftest.$ac_ext <<_ACEOF
5674/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005675$ac_includes_default
5676#include <$ac_header>
5677_ACEOF
5678rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005679if { (ac_try="$ac_compile"
5680case "(($ac_try" in
5681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5682 *) ac_try_echo=$ac_try;;
5683esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005684eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005685 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005686 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005687 grep -v '^ *+' conftest.er1 >conftest.err
5688 rm -f conftest.er1
5689 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005691 (exit $ac_status); } && {
5692 test -z "$ac_c_werror_flag" ||
5693 test ! -s conftest.err
5694 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005695 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005696else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005697 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005698sed 's/^/| /' conftest.$ac_ext >&5
5699
Martin v. Löwiseba40652007-08-30 20:10:57 +00005700 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005701fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005702
5703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005704{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5705echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005706
5707# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005708{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5709echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005710cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005711/* confdefs.h. */
5712_ACEOF
5713cat confdefs.h >>conftest.$ac_ext
5714cat >>conftest.$ac_ext <<_ACEOF
5715/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005716#include <$ac_header>
5717_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005718if { (ac_try="$ac_cpp conftest.$ac_ext"
5719case "(($ac_try" in
5720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5721 *) ac_try_echo=$ac_try;;
5722esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005724 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005725 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005726 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005727 rm -f conftest.er1
5728 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005730 (exit $ac_status); } >/dev/null && {
5731 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5732 test ! -s conftest.err
5733 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005734 ac_header_preproc=yes
5735else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005736 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005737sed 's/^/| /' conftest.$ac_ext >&5
5738
Martin v. Löwis11437992002-04-12 09:54:03 +00005739 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005740fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005741
Martin v. Löwis11437992002-04-12 09:54:03 +00005742rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005743{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5744echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005745
5746# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005747case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5748 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005749 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5750echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5751 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5752echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005753 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005754 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005755 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005756 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5757echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5758 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5759echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5760 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5761echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5762 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5763echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5764 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5765echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5766 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5767echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005768 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00005769## -------------------------------------- ##
5770## Report this to http://bugs.python.org/ ##
5771## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005772_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005773 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005774 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005775esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005776{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5777echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005778if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005779 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005780else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005781 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005782fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005783ac_res=`eval echo '${'$as_ac_Header'}'`
5784 { echo "$as_me:$LINENO: result: $ac_res" >&5
5785echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005786
5787fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005788if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005789 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005790#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005791_ACEOF
5792
5793fi
5794
Guido van Rossum627b2d71993-12-24 10:39:16 +00005795done
5796
Martin v. Löwis11437992002-04-12 09:54:03 +00005797
5798
5799
5800
5801
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005802ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005803for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005804 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5805{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5806echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005807if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005808 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005809else
Martin v. Löwis11437992002-04-12 09:54:03 +00005810 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005811/* confdefs.h. */
5812_ACEOF
5813cat confdefs.h >>conftest.$ac_ext
5814cat >>conftest.$ac_ext <<_ACEOF
5815/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005816#include <sys/types.h>
5817#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005818
Martin v. Löwis11437992002-04-12 09:54:03 +00005819int
5820main ()
5821{
5822if ((DIR *) 0)
5823return 0;
5824 ;
5825 return 0;
5826}
5827_ACEOF
5828rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005829if { (ac_try="$ac_compile"
5830case "(($ac_try" in
5831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5832 *) ac_try_echo=$ac_try;;
5833esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005835 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005836 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005837 grep -v '^ *+' conftest.er1 >conftest.err
5838 rm -f conftest.er1
5839 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005841 (exit $ac_status); } && {
5842 test -z "$ac_c_werror_flag" ||
5843 test ! -s conftest.err
5844 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005845 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005846else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005848sed 's/^/| /' conftest.$ac_ext >&5
5849
Martin v. Löwiseba40652007-08-30 20:10:57 +00005850 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005851fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005852
5853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005854fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005855ac_res=`eval echo '${'$as_ac_Header'}'`
5856 { echo "$as_me:$LINENO: result: $ac_res" >&5
5857echo "${ECHO_T}$ac_res" >&6; }
5858if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005859 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005860#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005861_ACEOF
5862
5863ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005864fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005865
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005866done
5867# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5868if test $ac_header_dirent = dirent.h; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005869 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5870echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005871if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005872 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005873else
Martin v. Löwis11437992002-04-12 09:54:03 +00005874 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005875cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005876/* confdefs.h. */
5877_ACEOF
5878cat confdefs.h >>conftest.$ac_ext
5879cat >>conftest.$ac_ext <<_ACEOF
5880/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005881
Martin v. Löwiseba40652007-08-30 20:10:57 +00005882/* Override any GCC internal prototype to avoid an error.
5883 Use char because int might match the return type of a GCC
5884 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005885#ifdef __cplusplus
5886extern "C"
5887#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005888char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005889int
5890main ()
5891{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005892return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005893 ;
5894 return 0;
5895}
5896_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005897for ac_lib in '' dir; do
5898 if test -z "$ac_lib"; then
5899 ac_res="none required"
5900 else
5901 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005902 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005903 fi
5904 rm -f conftest.$ac_objext conftest$ac_exeext
5905if { (ac_try="$ac_link"
5906case "(($ac_try" in
5907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5908 *) ac_try_echo=$ac_try;;
5909esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005911 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005912 ac_status=$?
5913 grep -v '^ *+' conftest.er1 >conftest.err
5914 rm -f conftest.er1
5915 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005917 (exit $ac_status); } && {
5918 test -z "$ac_c_werror_flag" ||
5919 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005920 } && test -s conftest$ac_exeext &&
5921 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005922 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005923else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005924 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00005925sed 's/^/| /' conftest.$ac_ext >&5
5926
Martin v. Löwiseba40652007-08-30 20:10:57 +00005927
Brett Cannon19fab762007-06-02 03:02:29 +00005928fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005929
5930rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5931 conftest$ac_exeext
5932 if test "${ac_cv_search_opendir+set}" = set; then
5933 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005934fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005935done
5936if test "${ac_cv_search_opendir+set}" = set; then
5937 :
5938else
5939 ac_cv_search_opendir=no
5940fi
5941rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005942LIBS=$ac_func_search_save_LIBS
5943fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005944{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5945echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005946ac_res=$ac_cv_search_opendir
5947if test "$ac_res" != no; then
5948 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005949
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005950fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005951
Michael W. Hudson54241132001-12-07 15:38:26 +00005952else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005953 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5954echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005955if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005956 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005957else
5958 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005959cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005960/* confdefs.h. */
5961_ACEOF
5962cat confdefs.h >>conftest.$ac_ext
5963cat >>conftest.$ac_ext <<_ACEOF
5964/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005965
Martin v. Löwiseba40652007-08-30 20:10:57 +00005966/* Override any GCC internal prototype to avoid an error.
5967 Use char because int might match the return type of a GCC
5968 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005969#ifdef __cplusplus
5970extern "C"
5971#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005972char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005973int
5974main ()
5975{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005976return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005977 ;
5978 return 0;
5979}
5980_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005981for ac_lib in '' x; do
5982 if test -z "$ac_lib"; then
5983 ac_res="none required"
5984 else
5985 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005986 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005987 fi
5988 rm -f conftest.$ac_objext conftest$ac_exeext
5989if { (ac_try="$ac_link"
5990case "(($ac_try" in
5991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5992 *) ac_try_echo=$ac_try;;
5993esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005995 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005996 ac_status=$?
5997 grep -v '^ *+' conftest.er1 >conftest.err
5998 rm -f conftest.er1
5999 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006001 (exit $ac_status); } && {
6002 test -z "$ac_c_werror_flag" ||
6003 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006004 } && test -s conftest$ac_exeext &&
6005 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006006 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006007else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006008 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006009sed 's/^/| /' conftest.$ac_ext >&5
6010
Martin v. Löwiseba40652007-08-30 20:10:57 +00006011
Brett Cannon19fab762007-06-02 03:02:29 +00006012fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006013
6014rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6015 conftest$ac_exeext
6016 if test "${ac_cv_search_opendir+set}" = set; then
6017 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006018fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006019done
6020if test "${ac_cv_search_opendir+set}" = set; then
6021 :
6022else
6023 ac_cv_search_opendir=no
6024fi
6025rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006026LIBS=$ac_func_search_save_LIBS
6027fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006028{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6029echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006030ac_res=$ac_cv_search_opendir
6031if test "$ac_res" != no; then
6032 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006033
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006034fi
6035
6036fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006037
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006038{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6039echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006040if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006041 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006042else
6043 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006044/* confdefs.h. */
6045_ACEOF
6046cat confdefs.h >>conftest.$ac_ext
6047cat >>conftest.$ac_ext <<_ACEOF
6048/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006049#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006050int
6051main ()
6052{
6053return makedev(0, 0);
6054 ;
6055 return 0;
6056}
6057_ACEOF
6058rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006059if { (ac_try="$ac_link"
6060case "(($ac_try" in
6061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6062 *) ac_try_echo=$ac_try;;
6063esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006065 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006066 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006067 grep -v '^ *+' conftest.er1 >conftest.err
6068 rm -f conftest.er1
6069 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006071 (exit $ac_status); } && {
6072 test -z "$ac_c_werror_flag" ||
6073 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006074 } && test -s conftest$ac_exeext &&
6075 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006076 ac_cv_header_sys_types_h_makedev=yes
6077else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006078 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006079sed 's/^/| /' conftest.$ac_ext >&5
6080
Martin v. Löwiseba40652007-08-30 20:10:57 +00006081 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006082fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006083
6084rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006085 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006086
6087fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006088{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6089echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006090
6091if test $ac_cv_header_sys_types_h_makedev = no; then
6092if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006093 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6094echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006095if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006096 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006097fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006098{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6099echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006100else
6101 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006102{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6103echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006104cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006105/* confdefs.h. */
6106_ACEOF
6107cat confdefs.h >>conftest.$ac_ext
6108cat >>conftest.$ac_ext <<_ACEOF
6109/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006110$ac_includes_default
6111#include <sys/mkdev.h>
6112_ACEOF
6113rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006114if { (ac_try="$ac_compile"
6115case "(($ac_try" in
6116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6117 *) ac_try_echo=$ac_try;;
6118esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006120 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006121 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006122 grep -v '^ *+' conftest.er1 >conftest.err
6123 rm -f conftest.er1
6124 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006126 (exit $ac_status); } && {
6127 test -z "$ac_c_werror_flag" ||
6128 test ! -s conftest.err
6129 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006130 ac_header_compiler=yes
6131else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006132 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006133sed 's/^/| /' conftest.$ac_ext >&5
6134
Martin v. Löwiseba40652007-08-30 20:10:57 +00006135 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006136fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006137
6138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006139{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6140echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006141
6142# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006143{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6144echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006145cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006146/* confdefs.h. */
6147_ACEOF
6148cat confdefs.h >>conftest.$ac_ext
6149cat >>conftest.$ac_ext <<_ACEOF
6150/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006151#include <sys/mkdev.h>
6152_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006153if { (ac_try="$ac_cpp conftest.$ac_ext"
6154case "(($ac_try" in
6155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6156 *) ac_try_echo=$ac_try;;
6157esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006159 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006160 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006161 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006162 rm -f conftest.er1
6163 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006165 (exit $ac_status); } >/dev/null && {
6166 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6167 test ! -s conftest.err
6168 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006169 ac_header_preproc=yes
6170else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006171 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006172sed 's/^/| /' conftest.$ac_ext >&5
6173
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006174 ac_header_preproc=no
6175fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006176
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006177rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006178{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6179echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006180
6181# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006182case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6183 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006184 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6185echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6186 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6187echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006188 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006189 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006190 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006191 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6192echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6193 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6194echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6195 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6196echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6197 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6198echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6199 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6200echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6201 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6202echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006203 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006204## -------------------------------------- ##
6205## Report this to http://bugs.python.org/ ##
6206## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006207_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006208 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006209 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006210esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006211{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6212echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006213if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006214 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006215else
6216 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6217fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006218{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6219echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006220
6221fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006222if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006223
6224cat >>confdefs.h <<\_ACEOF
6225#define MAJOR_IN_MKDEV 1
6226_ACEOF
6227
6228fi
6229
6230
6231
6232 if test $ac_cv_header_sys_mkdev_h = no; then
6233 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006234 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6235echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006236if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006237 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006238fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006239{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6240echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006241else
6242 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006243{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6244echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006245cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006246/* confdefs.h. */
6247_ACEOF
6248cat confdefs.h >>conftest.$ac_ext
6249cat >>conftest.$ac_ext <<_ACEOF
6250/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006251$ac_includes_default
6252#include <sys/sysmacros.h>
6253_ACEOF
6254rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006255if { (ac_try="$ac_compile"
6256case "(($ac_try" in
6257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6258 *) ac_try_echo=$ac_try;;
6259esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006261 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006262 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006263 grep -v '^ *+' conftest.er1 >conftest.err
6264 rm -f conftest.er1
6265 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006267 (exit $ac_status); } && {
6268 test -z "$ac_c_werror_flag" ||
6269 test ! -s conftest.err
6270 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006271 ac_header_compiler=yes
6272else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006273 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006274sed 's/^/| /' conftest.$ac_ext >&5
6275
Martin v. Löwiseba40652007-08-30 20:10:57 +00006276 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006277fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006278
6279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006280{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6281echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006282
6283# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006284{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6285echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006286cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006287/* confdefs.h. */
6288_ACEOF
6289cat confdefs.h >>conftest.$ac_ext
6290cat >>conftest.$ac_ext <<_ACEOF
6291/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006292#include <sys/sysmacros.h>
6293_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006294if { (ac_try="$ac_cpp conftest.$ac_ext"
6295case "(($ac_try" in
6296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6297 *) ac_try_echo=$ac_try;;
6298esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006300 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006301 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006302 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006303 rm -f conftest.er1
6304 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006306 (exit $ac_status); } >/dev/null && {
6307 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6308 test ! -s conftest.err
6309 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006310 ac_header_preproc=yes
6311else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006312 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006313sed 's/^/| /' conftest.$ac_ext >&5
6314
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006315 ac_header_preproc=no
6316fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006317
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006318rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006319{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6320echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006321
6322# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006323case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6324 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006325 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6326echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6327 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6328echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006329 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006330 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006331 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006332 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6333echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6334 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6335echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6336 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6337echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6338 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6339echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6340 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6341echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6342 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6343echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006344 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006345## -------------------------------------- ##
6346## Report this to http://bugs.python.org/ ##
6347## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006348_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006349 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006350 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006351esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006352{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6353echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006354if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006355 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006356else
6357 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6358fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006359{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6360echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006361
6362fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006363if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006364
6365cat >>confdefs.h <<\_ACEOF
6366#define MAJOR_IN_SYSMACROS 1
6367_ACEOF
6368
6369fi
6370
6371
6372 fi
6373fi
6374
Michael W. Hudson54241132001-12-07 15:38:26 +00006375
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006376# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006377
6378for ac_header in term.h
6379do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006380as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6381{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6382echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006383if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006384 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006385else
6386 cat >conftest.$ac_ext <<_ACEOF
6387/* confdefs.h. */
6388_ACEOF
6389cat confdefs.h >>conftest.$ac_ext
6390cat >>conftest.$ac_ext <<_ACEOF
6391/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006392
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006393#ifdef HAVE_CURSES_H
6394#include <curses.h>
6395#endif
6396
6397
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006398#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006399_ACEOF
6400rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006401if { (ac_try="$ac_compile"
6402case "(($ac_try" in
6403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6404 *) ac_try_echo=$ac_try;;
6405esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006407 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006408 ac_status=$?
6409 grep -v '^ *+' conftest.er1 >conftest.err
6410 rm -f conftest.er1
6411 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006413 (exit $ac_status); } && {
6414 test -z "$ac_c_werror_flag" ||
6415 test ! -s conftest.err
6416 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006417 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006418else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006419 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006420sed 's/^/| /' conftest.$ac_ext >&5
6421
Martin v. Löwiseba40652007-08-30 20:10:57 +00006422 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006423fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006424
6425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006426fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006427ac_res=`eval echo '${'$as_ac_Header'}'`
6428 { echo "$as_me:$LINENO: result: $ac_res" >&5
6429echo "${ECHO_T}$ac_res" >&6; }
6430if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006431 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006432#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006433_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006434
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006435fi
6436
6437done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006438
6439
Martin v. Löwis11017b12006-01-14 18:12:57 +00006440# On Linux, netlink.h requires asm/types.h
6441
6442for ac_header in linux/netlink.h
6443do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006444as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6445{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6446echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006447if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006448 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006449else
6450 cat >conftest.$ac_ext <<_ACEOF
6451/* confdefs.h. */
6452_ACEOF
6453cat confdefs.h >>conftest.$ac_ext
6454cat >>conftest.$ac_ext <<_ACEOF
6455/* end confdefs.h. */
6456
6457#ifdef HAVE_ASM_TYPES_H
6458#include <asm/types.h>
6459#endif
6460#ifdef HAVE_SYS_SOCKET_H
6461#include <sys/socket.h>
6462#endif
6463
6464
6465#include <$ac_header>
6466_ACEOF
6467rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006468if { (ac_try="$ac_compile"
6469case "(($ac_try" in
6470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6471 *) ac_try_echo=$ac_try;;
6472esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006474 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006475 ac_status=$?
6476 grep -v '^ *+' conftest.er1 >conftest.err
6477 rm -f conftest.er1
6478 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006480 (exit $ac_status); } && {
6481 test -z "$ac_c_werror_flag" ||
6482 test ! -s conftest.err
6483 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006484 eval "$as_ac_Header=yes"
6485else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006486 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006487sed 's/^/| /' conftest.$ac_ext >&5
6488
Martin v. Löwiseba40652007-08-30 20:10:57 +00006489 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006490fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006491
6492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006493fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006494ac_res=`eval echo '${'$as_ac_Header'}'`
6495 { echo "$as_me:$LINENO: result: $ac_res" >&5
6496echo "${ECHO_T}$ac_res" >&6; }
6497if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006498 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006499#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006500_ACEOF
6501
6502fi
6503
6504done
6505
6506
Guido van Rossum627b2d71993-12-24 10:39:16 +00006507# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006508was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006509{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6510echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006511cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006512/* confdefs.h. */
6513_ACEOF
6514cat confdefs.h >>conftest.$ac_ext
6515cat >>conftest.$ac_ext <<_ACEOF
6516/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006517#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006518
6519_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006520if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006521 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006522 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006523else
Martin v. Löwis11437992002-04-12 09:54:03 +00006524
6525
6526cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006527#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006528_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006529
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006530
Guido van Rossum627b2d71993-12-24 10:39:16 +00006531fi
Ronald Oussoren92919a62009-12-24 13:30:58 +00006532rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006533
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006534{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6535echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006536
Neal Norwitz11690112002-07-30 01:08:28 +00006537# Check whether using makedev requires defining _OSF_SOURCE
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006538{ echo "$as_me:$LINENO: checking for makedev" >&5
6539echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006540cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006541/* confdefs.h. */
6542_ACEOF
6543cat confdefs.h >>conftest.$ac_ext
6544cat >>conftest.$ac_ext <<_ACEOF
6545/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006546#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006547int
6548main ()
6549{
6550 makedev(0, 0)
6551 ;
6552 return 0;
6553}
6554_ACEOF
6555rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006556if { (ac_try="$ac_link"
6557case "(($ac_try" in
6558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6559 *) ac_try_echo=$ac_try;;
6560esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006562 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006563 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006564 grep -v '^ *+' conftest.er1 >conftest.err
6565 rm -f conftest.er1
6566 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006568 (exit $ac_status); } && {
6569 test -z "$ac_c_werror_flag" ||
6570 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006571 } && test -s conftest$ac_exeext &&
6572 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006573 ac_cv_has_makedev=yes
6574else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006575 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006576sed 's/^/| /' conftest.$ac_ext >&5
6577
Martin v. Löwiseba40652007-08-30 20:10:57 +00006578 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006579fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006580
6581rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006582 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006583if test "$ac_cv_has_makedev" = "no"; then
6584 # we didn't link, try if _OSF_SOURCE will allow us to link
6585 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006586/* confdefs.h. */
6587_ACEOF
6588cat confdefs.h >>conftest.$ac_ext
6589cat >>conftest.$ac_ext <<_ACEOF
6590/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006591
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006592#define _OSF_SOURCE 1
6593#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006594
Neal Norwitz11690112002-07-30 01:08:28 +00006595int
6596main ()
6597{
6598 makedev(0, 0)
6599 ;
6600 return 0;
6601}
6602_ACEOF
6603rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006604if { (ac_try="$ac_link"
6605case "(($ac_try" in
6606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6607 *) ac_try_echo=$ac_try;;
6608esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006610 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006611 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006612 grep -v '^ *+' conftest.er1 >conftest.err
6613 rm -f conftest.er1
6614 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006616 (exit $ac_status); } && {
6617 test -z "$ac_c_werror_flag" ||
6618 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006619 } && test -s conftest$ac_exeext &&
6620 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006621 ac_cv_has_makedev=yes
6622else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006623 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006624sed 's/^/| /' conftest.$ac_ext >&5
6625
Martin v. Löwiseba40652007-08-30 20:10:57 +00006626 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006627fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006628
6629rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006630 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006631 if test "$ac_cv_has_makedev" = "yes"; then
6632
6633cat >>confdefs.h <<\_ACEOF
6634#define _OSF_SOURCE 1
6635_ACEOF
6636
6637 fi
6638fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006639{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6640echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006641if test "$ac_cv_has_makedev" = "yes"; then
6642
6643cat >>confdefs.h <<\_ACEOF
6644#define HAVE_MAKEDEV 1
6645_ACEOF
6646
6647fi
6648
Martin v. Löwis399a6892002-10-04 10:22:02 +00006649# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6650# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6651# defined, but the compiler does not support pragma redefine_extname,
6652# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6653# structures (such as rlimit64) without declaring them. As a
6654# work-around, disable LFS on such configurations
6655
6656use_lfs=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006657{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6658echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006659cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006660/* confdefs.h. */
6661_ACEOF
6662cat confdefs.h >>conftest.$ac_ext
6663cat >>conftest.$ac_ext <<_ACEOF
6664/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006665
6666#define _LARGEFILE_SOURCE 1
6667#define _FILE_OFFSET_BITS 64
6668#include <sys/resource.h>
6669
Martin v. Löwis399a6892002-10-04 10:22:02 +00006670int
6671main ()
6672{
6673struct rlimit foo;
6674 ;
6675 return 0;
6676}
6677_ACEOF
6678rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006679if { (ac_try="$ac_compile"
6680case "(($ac_try" in
6681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6682 *) ac_try_echo=$ac_try;;
6683esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006684eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006685 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006686 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006687 grep -v '^ *+' conftest.er1 >conftest.err
6688 rm -f conftest.er1
6689 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006691 (exit $ac_status); } && {
6692 test -z "$ac_c_werror_flag" ||
6693 test ! -s conftest.err
6694 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006695 sol_lfs_bug=no
6696else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006697 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006698sed 's/^/| /' conftest.$ac_ext >&5
6699
Martin v. Löwiseba40652007-08-30 20:10:57 +00006700 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006701fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006702
6703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006704{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6705echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006706if test "$sol_lfs_bug" = "yes"; then
6707 use_lfs=no
6708fi
6709
6710if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006711# Two defines needed to enable largefile support on various platforms
6712# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006713
Martin v. Löwis11437992002-04-12 09:54:03 +00006714cat >>confdefs.h <<\_ACEOF
6715#define _LARGEFILE_SOURCE 1
6716_ACEOF
6717
6718
6719cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006720#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006721_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006722
Martin v. Löwis399a6892002-10-04 10:22:02 +00006723fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006724
Guido van Rossum84e7b241996-08-19 21:59:00 +00006725# Add some code to confdefs.h so that the test for off_t works on SCO
6726cat >> confdefs.h <<\EOF
6727#if defined(SCO_DS)
6728#undef _OFF_T
6729#endif
6730EOF
6731
Guido van Rossumef2255b2000-03-10 22:30:29 +00006732# Type availability checks
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006733{ echo "$as_me:$LINENO: checking for mode_t" >&5
6734echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006735if test "${ac_cv_type_mode_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006736 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006737else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006738 cat >conftest.$ac_ext <<_ACEOF
6739/* confdefs.h. */
6740_ACEOF
6741cat confdefs.h >>conftest.$ac_ext
6742cat >>conftest.$ac_ext <<_ACEOF
6743/* end confdefs.h. */
6744$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006745typedef mode_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006746int
6747main ()
6748{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006749if ((ac__type_new_ *) 0)
6750 return 0;
6751if (sizeof (ac__type_new_))
6752 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006753 ;
6754 return 0;
6755}
6756_ACEOF
6757rm -f conftest.$ac_objext
6758if { (ac_try="$ac_compile"
6759case "(($ac_try" in
6760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6761 *) ac_try_echo=$ac_try;;
6762esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006764 (eval "$ac_compile") 2>conftest.er1
6765 ac_status=$?
6766 grep -v '^ *+' conftest.er1 >conftest.err
6767 rm -f conftest.er1
6768 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006770 (exit $ac_status); } && {
6771 test -z "$ac_c_werror_flag" ||
6772 test ! -s conftest.err
6773 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006774 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006775else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006776 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006777sed 's/^/| /' conftest.$ac_ext >&5
6778
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006779 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006780fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006781
6782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006783fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006784{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6785echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6786if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006787 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006788else
Martin v. Löwis11437992002-04-12 09:54:03 +00006789
6790cat >>confdefs.h <<_ACEOF
6791#define mode_t int
6792_ACEOF
6793
6794fi
6795
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006796{ echo "$as_me:$LINENO: checking for off_t" >&5
6797echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006798if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006799 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006800else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006801 cat >conftest.$ac_ext <<_ACEOF
6802/* confdefs.h. */
6803_ACEOF
6804cat confdefs.h >>conftest.$ac_ext
6805cat >>conftest.$ac_ext <<_ACEOF
6806/* end confdefs.h. */
6807$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006808typedef off_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006809int
6810main ()
6811{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006812if ((ac__type_new_ *) 0)
6813 return 0;
6814if (sizeof (ac__type_new_))
6815 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006816 ;
6817 return 0;
6818}
6819_ACEOF
6820rm -f conftest.$ac_objext
6821if { (ac_try="$ac_compile"
6822case "(($ac_try" in
6823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6824 *) ac_try_echo=$ac_try;;
6825esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006827 (eval "$ac_compile") 2>conftest.er1
6828 ac_status=$?
6829 grep -v '^ *+' conftest.er1 >conftest.err
6830 rm -f conftest.er1
6831 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006833 (exit $ac_status); } && {
6834 test -z "$ac_c_werror_flag" ||
6835 test ! -s conftest.err
6836 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006837 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006838else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006839 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006840sed 's/^/| /' conftest.$ac_ext >&5
6841
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006842 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006843fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006844
6845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006846fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006847{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6848echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6849if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006850 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006851else
Martin v. Löwis11437992002-04-12 09:54:03 +00006852
6853cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006854#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006855_ACEOF
6856
6857fi
6858
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006859{ echo "$as_me:$LINENO: checking for pid_t" >&5
6860echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006861if test "${ac_cv_type_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006862 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006863else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006864 cat >conftest.$ac_ext <<_ACEOF
6865/* confdefs.h. */
6866_ACEOF
6867cat confdefs.h >>conftest.$ac_ext
6868cat >>conftest.$ac_ext <<_ACEOF
6869/* end confdefs.h. */
6870$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006871typedef pid_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006872int
6873main ()
6874{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006875if ((ac__type_new_ *) 0)
6876 return 0;
6877if (sizeof (ac__type_new_))
6878 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006879 ;
6880 return 0;
6881}
6882_ACEOF
6883rm -f conftest.$ac_objext
6884if { (ac_try="$ac_compile"
6885case "(($ac_try" in
6886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6887 *) ac_try_echo=$ac_try;;
6888esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006890 (eval "$ac_compile") 2>conftest.er1
6891 ac_status=$?
6892 grep -v '^ *+' conftest.er1 >conftest.err
6893 rm -f conftest.er1
6894 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006896 (exit $ac_status); } && {
6897 test -z "$ac_c_werror_flag" ||
6898 test ! -s conftest.err
6899 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006900 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006901else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006902 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006903sed 's/^/| /' conftest.$ac_ext >&5
6904
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006905 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006906fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006907
6908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006909fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006910{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6911echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6912if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006913 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006914else
Martin v. Löwis11437992002-04-12 09:54:03 +00006915
6916cat >>confdefs.h <<_ACEOF
6917#define pid_t int
6918_ACEOF
6919
6920fi
6921
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006922{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6923echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006924if test "${ac_cv_type_signal+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006925 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006926else
6927 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006928/* confdefs.h. */
6929_ACEOF
6930cat confdefs.h >>conftest.$ac_ext
6931cat >>conftest.$ac_ext <<_ACEOF
6932/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006933#include <sys/types.h>
6934#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006935
Martin v. Löwis11437992002-04-12 09:54:03 +00006936int
6937main ()
6938{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006939return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006940 ;
6941 return 0;
6942}
6943_ACEOF
6944rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006945if { (ac_try="$ac_compile"
6946case "(($ac_try" in
6947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6948 *) ac_try_echo=$ac_try;;
6949esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006951 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006952 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006953 grep -v '^ *+' conftest.er1 >conftest.err
6954 rm -f conftest.er1
6955 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006957 (exit $ac_status); } && {
6958 test -z "$ac_c_werror_flag" ||
6959 test ! -s conftest.err
6960 } && test -s conftest.$ac_objext; then
6961 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006962else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006963 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006964sed 's/^/| /' conftest.$ac_ext >&5
6965
Martin v. Löwiseba40652007-08-30 20:10:57 +00006966 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006967fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006968
6969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006970fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006971{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6972echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006973
Martin v. Löwis11437992002-04-12 09:54:03 +00006974cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006975#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006976_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006977
Michael W. Hudson54241132001-12-07 15:38:26 +00006978
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006979{ echo "$as_me:$LINENO: checking for size_t" >&5
6980echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006981if test "${ac_cv_type_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006982 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006983else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006984 cat >conftest.$ac_ext <<_ACEOF
6985/* confdefs.h. */
6986_ACEOF
6987cat confdefs.h >>conftest.$ac_ext
6988cat >>conftest.$ac_ext <<_ACEOF
6989/* end confdefs.h. */
6990$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006991typedef size_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006992int
6993main ()
6994{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006995if ((ac__type_new_ *) 0)
6996 return 0;
6997if (sizeof (ac__type_new_))
6998 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006999 ;
7000 return 0;
7001}
7002_ACEOF
7003rm -f conftest.$ac_objext
7004if { (ac_try="$ac_compile"
7005case "(($ac_try" in
7006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7007 *) ac_try_echo=$ac_try;;
7008esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007010 (eval "$ac_compile") 2>conftest.er1
7011 ac_status=$?
7012 grep -v '^ *+' conftest.er1 >conftest.err
7013 rm -f conftest.er1
7014 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007016 (exit $ac_status); } && {
7017 test -z "$ac_c_werror_flag" ||
7018 test ! -s conftest.err
7019 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007020 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007021else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007022 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007023sed 's/^/| /' conftest.$ac_ext >&5
7024
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007025 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007026fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007027
7028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007029fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007030{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7031echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7032if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007033 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007034else
Martin v. Löwis11437992002-04-12 09:54:03 +00007035
7036cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007037#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007038_ACEOF
7039
7040fi
7041
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007042{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7043echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007044if test "${ac_cv_type_uid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007045 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007046else
7047 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007048/* confdefs.h. */
7049_ACEOF
7050cat confdefs.h >>conftest.$ac_ext
7051cat >>conftest.$ac_ext <<_ACEOF
7052/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007053#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007054
7055_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007056if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007057 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007058 ac_cv_type_uid_t=yes
7059else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007060 ac_cv_type_uid_t=no
7061fi
Ronald Oussoren92919a62009-12-24 13:30:58 +00007062rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007063
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007064fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007065{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7066echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007067if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007068
Martin v. Löwis11437992002-04-12 09:54:03 +00007069cat >>confdefs.h <<\_ACEOF
7070#define uid_t int
7071_ACEOF
7072
7073
7074cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007075#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007076_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007077
7078fi
7079
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007080
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007081 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7082echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007083if test "${ac_cv_c_uint32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007084 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007085else
7086 ac_cv_c_uint32_t=no
7087 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7088 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7089 cat >conftest.$ac_ext <<_ACEOF
7090/* confdefs.h. */
7091_ACEOF
7092cat confdefs.h >>conftest.$ac_ext
7093cat >>conftest.$ac_ext <<_ACEOF
7094/* end confdefs.h. */
7095$ac_includes_default
7096int
7097main ()
7098{
7099static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7100test_array [0] = 0
7101
7102 ;
7103 return 0;
7104}
7105_ACEOF
7106rm -f conftest.$ac_objext
7107if { (ac_try="$ac_compile"
7108case "(($ac_try" in
7109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7110 *) ac_try_echo=$ac_try;;
7111esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007113 (eval "$ac_compile") 2>conftest.er1
7114 ac_status=$?
7115 grep -v '^ *+' conftest.er1 >conftest.err
7116 rm -f conftest.er1
7117 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007119 (exit $ac_status); } && {
7120 test -z "$ac_c_werror_flag" ||
7121 test ! -s conftest.err
7122 } && test -s conftest.$ac_objext; then
7123 case $ac_type in
7124 uint32_t) ac_cv_c_uint32_t=yes ;;
7125 *) ac_cv_c_uint32_t=$ac_type ;;
7126esac
7127
7128else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007129 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007130sed 's/^/| /' conftest.$ac_ext >&5
7131
7132
7133fi
7134
7135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7136 test "$ac_cv_c_uint32_t" != no && break
7137 done
7138fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007139{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7140echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007141 case $ac_cv_c_uint32_t in #(
7142 no|yes) ;; #(
7143 *)
7144
7145cat >>confdefs.h <<\_ACEOF
7146#define _UINT32_T 1
7147_ACEOF
7148
7149
7150cat >>confdefs.h <<_ACEOF
7151#define uint32_t $ac_cv_c_uint32_t
7152_ACEOF
7153;;
7154 esac
7155
7156
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007157 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7158echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007159if test "${ac_cv_c_uint64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007160 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007161else
7162 ac_cv_c_uint64_t=no
7163 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7164 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7165 cat >conftest.$ac_ext <<_ACEOF
7166/* confdefs.h. */
7167_ACEOF
7168cat confdefs.h >>conftest.$ac_ext
7169cat >>conftest.$ac_ext <<_ACEOF
7170/* end confdefs.h. */
7171$ac_includes_default
7172int
7173main ()
7174{
7175static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7176test_array [0] = 0
7177
7178 ;
7179 return 0;
7180}
7181_ACEOF
7182rm -f conftest.$ac_objext
7183if { (ac_try="$ac_compile"
7184case "(($ac_try" in
7185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7186 *) ac_try_echo=$ac_try;;
7187esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007189 (eval "$ac_compile") 2>conftest.er1
7190 ac_status=$?
7191 grep -v '^ *+' conftest.er1 >conftest.err
7192 rm -f conftest.er1
7193 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007195 (exit $ac_status); } && {
7196 test -z "$ac_c_werror_flag" ||
7197 test ! -s conftest.err
7198 } && test -s conftest.$ac_objext; then
7199 case $ac_type in
7200 uint64_t) ac_cv_c_uint64_t=yes ;;
7201 *) ac_cv_c_uint64_t=$ac_type ;;
7202esac
7203
7204else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007205 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007206sed 's/^/| /' conftest.$ac_ext >&5
7207
7208
7209fi
7210
7211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7212 test "$ac_cv_c_uint64_t" != no && break
7213 done
7214fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007215{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7216echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007217 case $ac_cv_c_uint64_t in #(
7218 no|yes) ;; #(
7219 *)
7220
7221cat >>confdefs.h <<\_ACEOF
7222#define _UINT64_T 1
7223_ACEOF
7224
7225
7226cat >>confdefs.h <<_ACEOF
7227#define uint64_t $ac_cv_c_uint64_t
7228_ACEOF
7229;;
7230 esac
7231
7232
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007233 { echo "$as_me:$LINENO: checking for int32_t" >&5
7234echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007235if test "${ac_cv_c_int32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007236 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007237else
7238 ac_cv_c_int32_t=no
7239 for ac_type in 'int32_t' 'int' 'long int' \
7240 'long long int' 'short int' 'signed char'; do
7241 cat >conftest.$ac_ext <<_ACEOF
7242/* confdefs.h. */
7243_ACEOF
7244cat confdefs.h >>conftest.$ac_ext
7245cat >>conftest.$ac_ext <<_ACEOF
7246/* end confdefs.h. */
7247$ac_includes_default
7248int
7249main ()
7250{
7251static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7252test_array [0] = 0
7253
7254 ;
7255 return 0;
7256}
7257_ACEOF
7258rm -f conftest.$ac_objext
7259if { (ac_try="$ac_compile"
7260case "(($ac_try" in
7261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7262 *) ac_try_echo=$ac_try;;
7263esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007265 (eval "$ac_compile") 2>conftest.er1
7266 ac_status=$?
7267 grep -v '^ *+' conftest.er1 >conftest.err
7268 rm -f conftest.er1
7269 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007271 (exit $ac_status); } && {
7272 test -z "$ac_c_werror_flag" ||
7273 test ! -s conftest.err
7274 } && test -s conftest.$ac_objext; then
7275 cat >conftest.$ac_ext <<_ACEOF
7276/* confdefs.h. */
7277_ACEOF
7278cat confdefs.h >>conftest.$ac_ext
7279cat >>conftest.$ac_ext <<_ACEOF
7280/* end confdefs.h. */
7281$ac_includes_default
7282int
7283main ()
7284{
7285static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007286 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007287test_array [0] = 0
7288
7289 ;
7290 return 0;
7291}
7292_ACEOF
7293rm -f conftest.$ac_objext
7294if { (ac_try="$ac_compile"
7295case "(($ac_try" in
7296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7297 *) ac_try_echo=$ac_try;;
7298esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007300 (eval "$ac_compile") 2>conftest.er1
7301 ac_status=$?
7302 grep -v '^ *+' conftest.er1 >conftest.err
7303 rm -f conftest.er1
7304 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007306 (exit $ac_status); } && {
7307 test -z "$ac_c_werror_flag" ||
7308 test ! -s conftest.err
7309 } && test -s conftest.$ac_objext; then
7310 :
7311else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007312 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007313sed 's/^/| /' conftest.$ac_ext >&5
7314
7315 case $ac_type in
7316 int32_t) ac_cv_c_int32_t=yes ;;
7317 *) ac_cv_c_int32_t=$ac_type ;;
7318esac
7319
7320fi
7321
7322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7323else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007324 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007325sed 's/^/| /' conftest.$ac_ext >&5
7326
7327
7328fi
7329
7330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7331 test "$ac_cv_c_int32_t" != no && break
7332 done
7333fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007334{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7335echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007336 case $ac_cv_c_int32_t in #(
7337 no|yes) ;; #(
7338 *)
7339
7340cat >>confdefs.h <<_ACEOF
7341#define int32_t $ac_cv_c_int32_t
7342_ACEOF
7343;;
7344 esac
7345
7346
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007347 { echo "$as_me:$LINENO: checking for int64_t" >&5
7348echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007349if test "${ac_cv_c_int64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007350 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007351else
7352 ac_cv_c_int64_t=no
7353 for ac_type in 'int64_t' 'int' 'long int' \
7354 'long long int' 'short int' 'signed char'; do
7355 cat >conftest.$ac_ext <<_ACEOF
7356/* confdefs.h. */
7357_ACEOF
7358cat confdefs.h >>conftest.$ac_ext
7359cat >>conftest.$ac_ext <<_ACEOF
7360/* end confdefs.h. */
7361$ac_includes_default
7362int
7363main ()
7364{
7365static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7366test_array [0] = 0
7367
7368 ;
7369 return 0;
7370}
7371_ACEOF
7372rm -f conftest.$ac_objext
7373if { (ac_try="$ac_compile"
7374case "(($ac_try" in
7375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7376 *) ac_try_echo=$ac_try;;
7377esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007379 (eval "$ac_compile") 2>conftest.er1
7380 ac_status=$?
7381 grep -v '^ *+' conftest.er1 >conftest.err
7382 rm -f conftest.er1
7383 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007385 (exit $ac_status); } && {
7386 test -z "$ac_c_werror_flag" ||
7387 test ! -s conftest.err
7388 } && test -s conftest.$ac_objext; then
7389 cat >conftest.$ac_ext <<_ACEOF
7390/* confdefs.h. */
7391_ACEOF
7392cat confdefs.h >>conftest.$ac_ext
7393cat >>conftest.$ac_ext <<_ACEOF
7394/* end confdefs.h. */
7395$ac_includes_default
7396int
7397main ()
7398{
7399static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007400 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007401test_array [0] = 0
7402
7403 ;
7404 return 0;
7405}
7406_ACEOF
7407rm -f conftest.$ac_objext
7408if { (ac_try="$ac_compile"
7409case "(($ac_try" in
7410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7411 *) ac_try_echo=$ac_try;;
7412esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007414 (eval "$ac_compile") 2>conftest.er1
7415 ac_status=$?
7416 grep -v '^ *+' conftest.er1 >conftest.err
7417 rm -f conftest.er1
7418 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007420 (exit $ac_status); } && {
7421 test -z "$ac_c_werror_flag" ||
7422 test ! -s conftest.err
7423 } && test -s conftest.$ac_objext; then
7424 :
7425else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007426 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007427sed 's/^/| /' conftest.$ac_ext >&5
7428
7429 case $ac_type in
7430 int64_t) ac_cv_c_int64_t=yes ;;
7431 *) ac_cv_c_int64_t=$ac_type ;;
7432esac
7433
7434fi
7435
7436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7437else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007438 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007439sed 's/^/| /' conftest.$ac_ext >&5
7440
7441
7442fi
7443
7444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7445 test "$ac_cv_c_int64_t" != no && break
7446 done
7447fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007448{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7449echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007450 case $ac_cv_c_int64_t in #(
7451 no|yes) ;; #(
7452 *)
7453
7454cat >>confdefs.h <<_ACEOF
7455#define int64_t $ac_cv_c_int64_t
7456_ACEOF
7457;;
7458 esac
7459
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007460{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7461echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007462if test "${ac_cv_type_ssize_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007463 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007464else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007465 cat >conftest.$ac_ext <<_ACEOF
7466/* confdefs.h. */
7467_ACEOF
7468cat confdefs.h >>conftest.$ac_ext
7469cat >>conftest.$ac_ext <<_ACEOF
7470/* end confdefs.h. */
7471$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007472typedef ssize_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007473int
7474main ()
7475{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007476if ((ac__type_new_ *) 0)
7477 return 0;
7478if (sizeof (ac__type_new_))
7479 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007480 ;
7481 return 0;
7482}
7483_ACEOF
7484rm -f conftest.$ac_objext
7485if { (ac_try="$ac_compile"
7486case "(($ac_try" in
7487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7488 *) ac_try_echo=$ac_try;;
7489esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007491 (eval "$ac_compile") 2>conftest.er1
7492 ac_status=$?
7493 grep -v '^ *+' conftest.er1 >conftest.err
7494 rm -f conftest.er1
7495 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007497 (exit $ac_status); } && {
7498 test -z "$ac_c_werror_flag" ||
7499 test ! -s conftest.err
7500 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007501 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007502else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007503 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007504sed 's/^/| /' conftest.$ac_ext >&5
7505
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007506 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007507fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007508
7509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007510fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007511{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7512echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7513if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007514
7515cat >>confdefs.h <<\_ACEOF
7516#define HAVE_SSIZE_T 1
7517_ACEOF
7518
7519fi
7520
Jack Jansendd19cf82001-12-06 22:36:17 +00007521
Michael W. Hudson54241132001-12-07 15:38:26 +00007522# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007523# ANSI C requires sizeof(char) == 1, so no need to check it
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007524{ echo "$as_me:$LINENO: checking for int" >&5
7525echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7526if test "${ac_cv_type_int+set}" = set; then
7527 echo $ECHO_N "(cached) $ECHO_C" >&6
7528else
7529 cat >conftest.$ac_ext <<_ACEOF
7530/* confdefs.h. */
7531_ACEOF
7532cat confdefs.h >>conftest.$ac_ext
7533cat >>conftest.$ac_ext <<_ACEOF
7534/* end confdefs.h. */
7535$ac_includes_default
7536typedef int ac__type_new_;
7537int
7538main ()
7539{
7540if ((ac__type_new_ *) 0)
7541 return 0;
7542if (sizeof (ac__type_new_))
7543 return 0;
7544 ;
7545 return 0;
7546}
7547_ACEOF
7548rm -f conftest.$ac_objext
7549if { (ac_try="$ac_compile"
7550case "(($ac_try" in
7551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7552 *) ac_try_echo=$ac_try;;
7553esac
7554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7555 (eval "$ac_compile") 2>conftest.er1
7556 ac_status=$?
7557 grep -v '^ *+' conftest.er1 >conftest.err
7558 rm -f conftest.er1
7559 cat conftest.err >&5
7560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7561 (exit $ac_status); } && {
7562 test -z "$ac_c_werror_flag" ||
7563 test ! -s conftest.err
7564 } && test -s conftest.$ac_objext; then
7565 ac_cv_type_int=yes
7566else
7567 echo "$as_me: failed program was:" >&5
7568sed 's/^/| /' conftest.$ac_ext >&5
7569
7570 ac_cv_type_int=no
7571fi
7572
7573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7574fi
7575{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7576echo "${ECHO_T}$ac_cv_type_int" >&6; }
7577
Martin v. Löwiseba40652007-08-30 20:10:57 +00007578# The cast to long int works around a bug in the HP C Compiler
7579# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7580# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7581# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007582{ echo "$as_me:$LINENO: checking size of int" >&5
7583echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007584if test "${ac_cv_sizeof_int+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007585 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007586else
Martin v. Löwis11437992002-04-12 09:54:03 +00007587 if test "$cross_compiling" = yes; then
7588 # Depending upon the size, compute the lo and hi bounds.
7589cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007590/* confdefs.h. */
7591_ACEOF
7592cat confdefs.h >>conftest.$ac_ext
7593cat >>conftest.$ac_ext <<_ACEOF
7594/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007595$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007596 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007597int
7598main ()
7599{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007600static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007601test_array [0] = 0
7602
7603 ;
7604 return 0;
7605}
7606_ACEOF
7607rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007608if { (ac_try="$ac_compile"
7609case "(($ac_try" in
7610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7611 *) ac_try_echo=$ac_try;;
7612esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007614 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007616 grep -v '^ *+' conftest.er1 >conftest.err
7617 rm -f conftest.er1
7618 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007620 (exit $ac_status); } && {
7621 test -z "$ac_c_werror_flag" ||
7622 test ! -s conftest.err
7623 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007624 ac_lo=0 ac_mid=0
7625 while :; do
7626 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007627/* confdefs.h. */
7628_ACEOF
7629cat confdefs.h >>conftest.$ac_ext
7630cat >>conftest.$ac_ext <<_ACEOF
7631/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007632$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007633 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007634int
7635main ()
7636{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007637static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007638test_array [0] = 0
7639
7640 ;
7641 return 0;
7642}
7643_ACEOF
7644rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007645if { (ac_try="$ac_compile"
7646case "(($ac_try" in
7647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7648 *) ac_try_echo=$ac_try;;
7649esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007650eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007651 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007652 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007653 grep -v '^ *+' conftest.er1 >conftest.err
7654 rm -f conftest.er1
7655 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007657 (exit $ac_status); } && {
7658 test -z "$ac_c_werror_flag" ||
7659 test ! -s conftest.err
7660 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007661 ac_hi=$ac_mid; break
7662else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007663 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007664sed 's/^/| /' conftest.$ac_ext >&5
7665
Martin v. Löwiseba40652007-08-30 20:10:57 +00007666 ac_lo=`expr $ac_mid + 1`
7667 if test $ac_lo -le $ac_mid; then
7668 ac_lo= ac_hi=
7669 break
7670 fi
7671 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007672fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007673
7674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007675 done
7676else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007677 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007678sed 's/^/| /' conftest.$ac_ext >&5
7679
Martin v. Löwiseba40652007-08-30 20:10:57 +00007680 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007681/* confdefs.h. */
7682_ACEOF
7683cat confdefs.h >>conftest.$ac_ext
7684cat >>conftest.$ac_ext <<_ACEOF
7685/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007686$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007687 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007688int
7689main ()
7690{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007691static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007692test_array [0] = 0
7693
7694 ;
7695 return 0;
7696}
7697_ACEOF
7698rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007699if { (ac_try="$ac_compile"
7700case "(($ac_try" in
7701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7702 *) ac_try_echo=$ac_try;;
7703esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007704eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007705 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007706 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007707 grep -v '^ *+' conftest.er1 >conftest.err
7708 rm -f conftest.er1
7709 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007711 (exit $ac_status); } && {
7712 test -z "$ac_c_werror_flag" ||
7713 test ! -s conftest.err
7714 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007715 ac_hi=-1 ac_mid=-1
7716 while :; do
7717 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007718/* confdefs.h. */
7719_ACEOF
7720cat confdefs.h >>conftest.$ac_ext
7721cat >>conftest.$ac_ext <<_ACEOF
7722/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007723$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007724 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007725int
7726main ()
7727{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007728static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007729test_array [0] = 0
7730
7731 ;
7732 return 0;
7733}
7734_ACEOF
7735rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007736if { (ac_try="$ac_compile"
7737case "(($ac_try" in
7738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7739 *) ac_try_echo=$ac_try;;
7740esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007741eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007742 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007743 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007744 grep -v '^ *+' conftest.er1 >conftest.err
7745 rm -f conftest.er1
7746 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007748 (exit $ac_status); } && {
7749 test -z "$ac_c_werror_flag" ||
7750 test ! -s conftest.err
7751 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007752 ac_lo=$ac_mid; break
7753else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007754 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007755sed 's/^/| /' conftest.$ac_ext >&5
7756
Martin v. Löwiseba40652007-08-30 20:10:57 +00007757 ac_hi=`expr '(' $ac_mid ')' - 1`
7758 if test $ac_mid -le $ac_hi; then
7759 ac_lo= ac_hi=
7760 break
7761 fi
7762 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007763fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007764
7765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007766 done
7767else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007769sed 's/^/| /' conftest.$ac_ext >&5
7770
Martin v. Löwiseba40652007-08-30 20:10:57 +00007771 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007772fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007773
7774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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 +00007778# Binary search between lo and hi bounds.
7779while test "x$ac_lo" != "x$ac_hi"; do
7780 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7781 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007782/* confdefs.h. */
7783_ACEOF
7784cat confdefs.h >>conftest.$ac_ext
7785cat >>conftest.$ac_ext <<_ACEOF
7786/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007787$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007788 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007789int
7790main ()
7791{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007792static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007793test_array [0] = 0
7794
7795 ;
7796 return 0;
7797}
7798_ACEOF
7799rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007800if { (ac_try="$ac_compile"
7801case "(($ac_try" in
7802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7803 *) ac_try_echo=$ac_try;;
7804esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007806 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007807 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007808 grep -v '^ *+' conftest.er1 >conftest.err
7809 rm -f conftest.er1
7810 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007812 (exit $ac_status); } && {
7813 test -z "$ac_c_werror_flag" ||
7814 test ! -s conftest.err
7815 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007816 ac_hi=$ac_mid
7817else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007818 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007819sed 's/^/| /' conftest.$ac_ext >&5
7820
Martin v. Löwiseba40652007-08-30 20:10:57 +00007821 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007822fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007823
7824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007825done
7826case $ac_lo in
7827?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007828'') if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007829 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007830See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007831echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007832See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007833 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007834 else
7835 ac_cv_sizeof_int=0
7836 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007837esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007838else
Martin v. Löwis11437992002-04-12 09:54:03 +00007839 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007840/* confdefs.h. */
7841_ACEOF
7842cat confdefs.h >>conftest.$ac_ext
7843cat >>conftest.$ac_ext <<_ACEOF
7844/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007845$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007846 typedef int ac__type_sizeof_;
7847static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7848static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007849#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007850#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007851int
7852main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007853{
Martin v. Löwis11437992002-04-12 09:54:03 +00007854
7855 FILE *f = fopen ("conftest.val", "w");
7856 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007857 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007858 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007859 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007860 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007861 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007862 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007863 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007864 }
7865 else
7866 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007867 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007868 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007869 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007870 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007871 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007872 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007873
7874 ;
7875 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007876}
Martin v. Löwis11437992002-04-12 09:54:03 +00007877_ACEOF
7878rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007879if { (ac_try="$ac_link"
7880case "(($ac_try" in
7881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7882 *) ac_try_echo=$ac_try;;
7883esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007885 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007886 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007888 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007889 { (case "(($ac_try" in
7890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7891 *) ac_try_echo=$ac_try;;
7892esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007894 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007895 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007897 (exit $ac_status); }; }; then
7898 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007899else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007900 echo "$as_me: program exited with status $ac_status" >&5
7901echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007902sed 's/^/| /' conftest.$ac_ext >&5
7903
Martin v. Löwis11437992002-04-12 09:54:03 +00007904( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007905if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007906 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007907See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007908echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007909See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007910 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007911 else
7912 ac_cv_sizeof_int=0
7913 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007914fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007915rm -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 +00007916fi
7917rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007918fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007919{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7920echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007921
7922
7923
Martin v. Löwis11437992002-04-12 09:54:03 +00007924cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007925#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007926_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007927
7928
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007929{ echo "$as_me:$LINENO: checking for long" >&5
7930echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7931if test "${ac_cv_type_long+set}" = set; then
7932 echo $ECHO_N "(cached) $ECHO_C" >&6
7933else
7934 cat >conftest.$ac_ext <<_ACEOF
7935/* confdefs.h. */
7936_ACEOF
7937cat confdefs.h >>conftest.$ac_ext
7938cat >>conftest.$ac_ext <<_ACEOF
7939/* end confdefs.h. */
7940$ac_includes_default
7941typedef long ac__type_new_;
7942int
7943main ()
7944{
7945if ((ac__type_new_ *) 0)
7946 return 0;
7947if (sizeof (ac__type_new_))
7948 return 0;
7949 ;
7950 return 0;
7951}
7952_ACEOF
7953rm -f conftest.$ac_objext
7954if { (ac_try="$ac_compile"
7955case "(($ac_try" in
7956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7957 *) ac_try_echo=$ac_try;;
7958esac
7959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7960 (eval "$ac_compile") 2>conftest.er1
7961 ac_status=$?
7962 grep -v '^ *+' conftest.er1 >conftest.err
7963 rm -f conftest.er1
7964 cat conftest.err >&5
7965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7966 (exit $ac_status); } && {
7967 test -z "$ac_c_werror_flag" ||
7968 test ! -s conftest.err
7969 } && test -s conftest.$ac_objext; then
7970 ac_cv_type_long=yes
7971else
7972 echo "$as_me: failed program was:" >&5
7973sed 's/^/| /' conftest.$ac_ext >&5
7974
7975 ac_cv_type_long=no
7976fi
7977
7978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7979fi
7980{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7981echo "${ECHO_T}$ac_cv_type_long" >&6; }
7982
Martin v. Löwiseba40652007-08-30 20:10:57 +00007983# The cast to long int works around a bug in the HP C Compiler
7984# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7985# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7986# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007987{ echo "$as_me:$LINENO: checking size of long" >&5
7988echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007989if test "${ac_cv_sizeof_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007990 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007991else
Martin v. Löwis11437992002-04-12 09:54:03 +00007992 if test "$cross_compiling" = yes; then
7993 # Depending upon the size, compute the lo and hi bounds.
7994cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007995/* confdefs.h. */
7996_ACEOF
7997cat confdefs.h >>conftest.$ac_ext
7998cat >>conftest.$ac_ext <<_ACEOF
7999/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008000$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008001 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008002int
8003main ()
8004{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008005static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008006test_array [0] = 0
8007
8008 ;
8009 return 0;
8010}
8011_ACEOF
8012rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008013if { (ac_try="$ac_compile"
8014case "(($ac_try" in
8015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8016 *) ac_try_echo=$ac_try;;
8017esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008019 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008020 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008021 grep -v '^ *+' conftest.er1 >conftest.err
8022 rm -f conftest.er1
8023 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008025 (exit $ac_status); } && {
8026 test -z "$ac_c_werror_flag" ||
8027 test ! -s conftest.err
8028 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008029 ac_lo=0 ac_mid=0
8030 while :; do
8031 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008032/* confdefs.h. */
8033_ACEOF
8034cat confdefs.h >>conftest.$ac_ext
8035cat >>conftest.$ac_ext <<_ACEOF
8036/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008037$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008038 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008039int
8040main ()
8041{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008042static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008043test_array [0] = 0
8044
8045 ;
8046 return 0;
8047}
8048_ACEOF
8049rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008050if { (ac_try="$ac_compile"
8051case "(($ac_try" in
8052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8053 *) ac_try_echo=$ac_try;;
8054esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008056 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008057 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008058 grep -v '^ *+' conftest.er1 >conftest.err
8059 rm -f conftest.er1
8060 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008062 (exit $ac_status); } && {
8063 test -z "$ac_c_werror_flag" ||
8064 test ! -s conftest.err
8065 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008066 ac_hi=$ac_mid; break
8067else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008068 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008069sed 's/^/| /' conftest.$ac_ext >&5
8070
Martin v. Löwiseba40652007-08-30 20:10:57 +00008071 ac_lo=`expr $ac_mid + 1`
8072 if test $ac_lo -le $ac_mid; then
8073 ac_lo= ac_hi=
8074 break
8075 fi
8076 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008077fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008078
8079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008080 done
8081else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008082 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008083sed 's/^/| /' conftest.$ac_ext >&5
8084
Martin v. Löwiseba40652007-08-30 20:10:57 +00008085 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008086/* confdefs.h. */
8087_ACEOF
8088cat confdefs.h >>conftest.$ac_ext
8089cat >>conftest.$ac_ext <<_ACEOF
8090/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008091$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008092 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008093int
8094main ()
8095{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008096static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008097test_array [0] = 0
8098
8099 ;
8100 return 0;
8101}
8102_ACEOF
8103rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008104if { (ac_try="$ac_compile"
8105case "(($ac_try" in
8106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8107 *) ac_try_echo=$ac_try;;
8108esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008110 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008111 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008112 grep -v '^ *+' conftest.er1 >conftest.err
8113 rm -f conftest.er1
8114 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008116 (exit $ac_status); } && {
8117 test -z "$ac_c_werror_flag" ||
8118 test ! -s conftest.err
8119 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008120 ac_hi=-1 ac_mid=-1
8121 while :; do
8122 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008123/* confdefs.h. */
8124_ACEOF
8125cat confdefs.h >>conftest.$ac_ext
8126cat >>conftest.$ac_ext <<_ACEOF
8127/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008128$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008129 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008130int
8131main ()
8132{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008133static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008134test_array [0] = 0
8135
8136 ;
8137 return 0;
8138}
8139_ACEOF
8140rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008141if { (ac_try="$ac_compile"
8142case "(($ac_try" in
8143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8144 *) ac_try_echo=$ac_try;;
8145esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008147 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008148 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008149 grep -v '^ *+' conftest.er1 >conftest.err
8150 rm -f conftest.er1
8151 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008153 (exit $ac_status); } && {
8154 test -z "$ac_c_werror_flag" ||
8155 test ! -s conftest.err
8156 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008157 ac_lo=$ac_mid; break
8158else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008159 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008160sed 's/^/| /' conftest.$ac_ext >&5
8161
Martin v. Löwiseba40652007-08-30 20:10:57 +00008162 ac_hi=`expr '(' $ac_mid ')' - 1`
8163 if test $ac_mid -le $ac_hi; then
8164 ac_lo= ac_hi=
8165 break
8166 fi
8167 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008168fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008169
8170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008171 done
8172else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008173 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008174sed 's/^/| /' conftest.$ac_ext >&5
8175
Martin v. Löwiseba40652007-08-30 20:10:57 +00008176 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008177fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008178
8179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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 +00008183# Binary search between lo and hi bounds.
8184while test "x$ac_lo" != "x$ac_hi"; do
8185 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8186 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008187/* confdefs.h. */
8188_ACEOF
8189cat confdefs.h >>conftest.$ac_ext
8190cat >>conftest.$ac_ext <<_ACEOF
8191/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008192$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008193 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008194int
8195main ()
8196{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008197static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008198test_array [0] = 0
8199
8200 ;
8201 return 0;
8202}
8203_ACEOF
8204rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008205if { (ac_try="$ac_compile"
8206case "(($ac_try" in
8207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8208 *) ac_try_echo=$ac_try;;
8209esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008211 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008212 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008213 grep -v '^ *+' conftest.er1 >conftest.err
8214 rm -f conftest.er1
8215 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008217 (exit $ac_status); } && {
8218 test -z "$ac_c_werror_flag" ||
8219 test ! -s conftest.err
8220 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008221 ac_hi=$ac_mid
8222else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008223 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008224sed 's/^/| /' conftest.$ac_ext >&5
8225
Martin v. Löwiseba40652007-08-30 20:10:57 +00008226 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008227fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008228
8229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008230done
8231case $ac_lo in
8232?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008233'') if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008234 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008235See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008236echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008237See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008238 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008239 else
8240 ac_cv_sizeof_long=0
8241 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008242esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008243else
Martin v. Löwis11437992002-04-12 09:54:03 +00008244 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008245/* confdefs.h. */
8246_ACEOF
8247cat confdefs.h >>conftest.$ac_ext
8248cat >>conftest.$ac_ext <<_ACEOF
8249/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008250$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008251 typedef long ac__type_sizeof_;
8252static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8253static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008254#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008255#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008256int
8257main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008258{
Martin v. Löwis11437992002-04-12 09:54:03 +00008259
8260 FILE *f = fopen ("conftest.val", "w");
8261 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008262 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008263 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008264 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008265 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008266 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008267 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008268 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008269 }
8270 else
8271 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008272 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008273 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008274 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008275 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008276 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008277 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008278
8279 ;
8280 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008281}
Martin v. Löwis11437992002-04-12 09:54:03 +00008282_ACEOF
8283rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008284if { (ac_try="$ac_link"
8285case "(($ac_try" in
8286 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8287 *) ac_try_echo=$ac_try;;
8288esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008289eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008290 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008291 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008293 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008294 { (case "(($ac_try" in
8295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8296 *) ac_try_echo=$ac_try;;
8297esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008299 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008300 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008302 (exit $ac_status); }; }; then
8303 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008304else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008305 echo "$as_me: program exited with status $ac_status" >&5
8306echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008307sed 's/^/| /' conftest.$ac_ext >&5
8308
Martin v. Löwis11437992002-04-12 09:54:03 +00008309( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008310if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008311 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008312See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008313echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008314See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008315 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008316 else
8317 ac_cv_sizeof_long=0
8318 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008319fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008320rm -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 +00008321fi
8322rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008323fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008324{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8325echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008326
8327
8328
Martin v. Löwis11437992002-04-12 09:54:03 +00008329cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008330#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008331_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008332
8333
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008334{ echo "$as_me:$LINENO: checking for void *" >&5
8335echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8336if test "${ac_cv_type_void_p+set}" = set; then
8337 echo $ECHO_N "(cached) $ECHO_C" >&6
8338else
8339 cat >conftest.$ac_ext <<_ACEOF
8340/* confdefs.h. */
8341_ACEOF
8342cat confdefs.h >>conftest.$ac_ext
8343cat >>conftest.$ac_ext <<_ACEOF
8344/* end confdefs.h. */
8345$ac_includes_default
8346typedef void * ac__type_new_;
8347int
8348main ()
8349{
8350if ((ac__type_new_ *) 0)
8351 return 0;
8352if (sizeof (ac__type_new_))
8353 return 0;
8354 ;
8355 return 0;
8356}
8357_ACEOF
8358rm -f conftest.$ac_objext
8359if { (ac_try="$ac_compile"
8360case "(($ac_try" in
8361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8362 *) ac_try_echo=$ac_try;;
8363esac
8364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8365 (eval "$ac_compile") 2>conftest.er1
8366 ac_status=$?
8367 grep -v '^ *+' conftest.er1 >conftest.err
8368 rm -f conftest.er1
8369 cat conftest.err >&5
8370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8371 (exit $ac_status); } && {
8372 test -z "$ac_c_werror_flag" ||
8373 test ! -s conftest.err
8374 } && test -s conftest.$ac_objext; then
8375 ac_cv_type_void_p=yes
8376else
8377 echo "$as_me: failed program was:" >&5
8378sed 's/^/| /' conftest.$ac_ext >&5
8379
8380 ac_cv_type_void_p=no
8381fi
8382
8383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8384fi
8385{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8386echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8387
Martin v. Löwiseba40652007-08-30 20:10:57 +00008388# The cast to long int works around a bug in the HP C Compiler
8389# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8390# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8391# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008392{ echo "$as_me:$LINENO: checking size of void *" >&5
8393echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008394if test "${ac_cv_sizeof_void_p+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008395 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008396else
Martin v. Löwis11437992002-04-12 09:54:03 +00008397 if test "$cross_compiling" = yes; then
8398 # Depending upon the size, compute the lo and hi bounds.
8399cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008400/* confdefs.h. */
8401_ACEOF
8402cat confdefs.h >>conftest.$ac_ext
8403cat >>conftest.$ac_ext <<_ACEOF
8404/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008405$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008406 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008407int
8408main ()
8409{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008410static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008411test_array [0] = 0
8412
8413 ;
8414 return 0;
8415}
8416_ACEOF
8417rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008418if { (ac_try="$ac_compile"
8419case "(($ac_try" in
8420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8421 *) ac_try_echo=$ac_try;;
8422esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008424 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008425 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008426 grep -v '^ *+' conftest.er1 >conftest.err
8427 rm -f conftest.er1
8428 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008430 (exit $ac_status); } && {
8431 test -z "$ac_c_werror_flag" ||
8432 test ! -s conftest.err
8433 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008434 ac_lo=0 ac_mid=0
8435 while :; do
8436 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008437/* confdefs.h. */
8438_ACEOF
8439cat confdefs.h >>conftest.$ac_ext
8440cat >>conftest.$ac_ext <<_ACEOF
8441/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008442$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008443 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008444int
8445main ()
8446{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008447static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008448test_array [0] = 0
8449
8450 ;
8451 return 0;
8452}
8453_ACEOF
8454rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008455if { (ac_try="$ac_compile"
8456case "(($ac_try" in
8457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8458 *) ac_try_echo=$ac_try;;
8459esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008460eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008461 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008462 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008463 grep -v '^ *+' conftest.er1 >conftest.err
8464 rm -f conftest.er1
8465 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008467 (exit $ac_status); } && {
8468 test -z "$ac_c_werror_flag" ||
8469 test ! -s conftest.err
8470 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008471 ac_hi=$ac_mid; break
8472else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008473 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008474sed 's/^/| /' conftest.$ac_ext >&5
8475
Martin v. Löwiseba40652007-08-30 20:10:57 +00008476 ac_lo=`expr $ac_mid + 1`
8477 if test $ac_lo -le $ac_mid; then
8478 ac_lo= ac_hi=
8479 break
8480 fi
8481 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008482fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008483
8484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008485 done
8486else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008487 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008488sed 's/^/| /' conftest.$ac_ext >&5
8489
Martin v. Löwiseba40652007-08-30 20:10:57 +00008490 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008491/* confdefs.h. */
8492_ACEOF
8493cat confdefs.h >>conftest.$ac_ext
8494cat >>conftest.$ac_ext <<_ACEOF
8495/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008496$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008497 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008498int
8499main ()
8500{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008501static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008502test_array [0] = 0
8503
8504 ;
8505 return 0;
8506}
8507_ACEOF
8508rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008509if { (ac_try="$ac_compile"
8510case "(($ac_try" in
8511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8512 *) ac_try_echo=$ac_try;;
8513esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008515 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008516 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008517 grep -v '^ *+' conftest.er1 >conftest.err
8518 rm -f conftest.er1
8519 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008521 (exit $ac_status); } && {
8522 test -z "$ac_c_werror_flag" ||
8523 test ! -s conftest.err
8524 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008525 ac_hi=-1 ac_mid=-1
8526 while :; do
8527 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008528/* confdefs.h. */
8529_ACEOF
8530cat confdefs.h >>conftest.$ac_ext
8531cat >>conftest.$ac_ext <<_ACEOF
8532/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008533$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008534 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008535int
8536main ()
8537{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008538static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008539test_array [0] = 0
8540
8541 ;
8542 return 0;
8543}
8544_ACEOF
8545rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008546if { (ac_try="$ac_compile"
8547case "(($ac_try" in
8548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8549 *) ac_try_echo=$ac_try;;
8550esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008552 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008553 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008554 grep -v '^ *+' conftest.er1 >conftest.err
8555 rm -f conftest.er1
8556 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008558 (exit $ac_status); } && {
8559 test -z "$ac_c_werror_flag" ||
8560 test ! -s conftest.err
8561 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008562 ac_lo=$ac_mid; break
8563else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008564 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008565sed 's/^/| /' conftest.$ac_ext >&5
8566
Martin v. Löwiseba40652007-08-30 20:10:57 +00008567 ac_hi=`expr '(' $ac_mid ')' - 1`
8568 if test $ac_mid -le $ac_hi; then
8569 ac_lo= ac_hi=
8570 break
8571 fi
8572 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008573fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008574
8575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008576 done
8577else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008579sed 's/^/| /' conftest.$ac_ext >&5
8580
Martin v. Löwiseba40652007-08-30 20:10:57 +00008581 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008582fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008583
8584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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 +00008588# Binary search between lo and hi bounds.
8589while test "x$ac_lo" != "x$ac_hi"; do
8590 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8591 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008592/* confdefs.h. */
8593_ACEOF
8594cat confdefs.h >>conftest.$ac_ext
8595cat >>conftest.$ac_ext <<_ACEOF
8596/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008597$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008598 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008599int
8600main ()
8601{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008602static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008603test_array [0] = 0
8604
8605 ;
8606 return 0;
8607}
8608_ACEOF
8609rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008610if { (ac_try="$ac_compile"
8611case "(($ac_try" in
8612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8613 *) ac_try_echo=$ac_try;;
8614esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008616 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008617 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008618 grep -v '^ *+' conftest.er1 >conftest.err
8619 rm -f conftest.er1
8620 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008622 (exit $ac_status); } && {
8623 test -z "$ac_c_werror_flag" ||
8624 test ! -s conftest.err
8625 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008626 ac_hi=$ac_mid
8627else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008628 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008629sed 's/^/| /' conftest.$ac_ext >&5
8630
Martin v. Löwiseba40652007-08-30 20:10:57 +00008631 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008632fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008633
8634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008635done
8636case $ac_lo in
8637?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008638'') if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008639 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008640See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008641echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008642See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008643 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008644 else
8645 ac_cv_sizeof_void_p=0
8646 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008647esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008648else
Martin v. Löwis11437992002-04-12 09:54:03 +00008649 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008650/* confdefs.h. */
8651_ACEOF
8652cat confdefs.h >>conftest.$ac_ext
8653cat >>conftest.$ac_ext <<_ACEOF
8654/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008655$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008656 typedef void * ac__type_sizeof_;
8657static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8658static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008659#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008660#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008661int
8662main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008663{
Martin v. Löwis11437992002-04-12 09:54:03 +00008664
8665 FILE *f = fopen ("conftest.val", "w");
8666 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008667 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008668 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008669 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008670 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008671 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008672 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008673 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008674 }
8675 else
8676 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008677 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008678 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008679 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008680 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008681 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008682 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008683
8684 ;
8685 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008686}
Martin v. Löwis11437992002-04-12 09:54:03 +00008687_ACEOF
8688rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008689if { (ac_try="$ac_link"
8690case "(($ac_try" in
8691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8692 *) ac_try_echo=$ac_try;;
8693esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008694eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008695 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008696 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008698 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008699 { (case "(($ac_try" in
8700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8701 *) ac_try_echo=$ac_try;;
8702esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008704 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008705 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008707 (exit $ac_status); }; }; then
8708 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008709else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008710 echo "$as_me: program exited with status $ac_status" >&5
8711echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008712sed 's/^/| /' conftest.$ac_ext >&5
8713
Martin v. Löwis11437992002-04-12 09:54:03 +00008714( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008715if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008716 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008717See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008718echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008719See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008720 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008721 else
8722 ac_cv_sizeof_void_p=0
8723 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008724fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008725rm -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 +00008726fi
8727rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008728fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008729{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8730echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008731
8732
8733
Martin v. Löwis11437992002-04-12 09:54:03 +00008734cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008735#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008736_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008737
8738
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008739{ echo "$as_me:$LINENO: checking for short" >&5
8740echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8741if test "${ac_cv_type_short+set}" = set; then
8742 echo $ECHO_N "(cached) $ECHO_C" >&6
8743else
8744 cat >conftest.$ac_ext <<_ACEOF
8745/* confdefs.h. */
8746_ACEOF
8747cat confdefs.h >>conftest.$ac_ext
8748cat >>conftest.$ac_ext <<_ACEOF
8749/* end confdefs.h. */
8750$ac_includes_default
8751typedef short ac__type_new_;
8752int
8753main ()
8754{
8755if ((ac__type_new_ *) 0)
8756 return 0;
8757if (sizeof (ac__type_new_))
8758 return 0;
8759 ;
8760 return 0;
8761}
8762_ACEOF
8763rm -f conftest.$ac_objext
8764if { (ac_try="$ac_compile"
8765case "(($ac_try" in
8766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8767 *) ac_try_echo=$ac_try;;
8768esac
8769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8770 (eval "$ac_compile") 2>conftest.er1
8771 ac_status=$?
8772 grep -v '^ *+' conftest.er1 >conftest.err
8773 rm -f conftest.er1
8774 cat conftest.err >&5
8775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8776 (exit $ac_status); } && {
8777 test -z "$ac_c_werror_flag" ||
8778 test ! -s conftest.err
8779 } && test -s conftest.$ac_objext; then
8780 ac_cv_type_short=yes
8781else
8782 echo "$as_me: failed program was:" >&5
8783sed 's/^/| /' conftest.$ac_ext >&5
8784
8785 ac_cv_type_short=no
8786fi
8787
8788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8789fi
8790{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8791echo "${ECHO_T}$ac_cv_type_short" >&6; }
8792
Martin v. Löwiseba40652007-08-30 20:10:57 +00008793# The cast to long int works around a bug in the HP C Compiler
8794# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8795# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8796# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008797{ echo "$as_me:$LINENO: checking size of short" >&5
8798echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008799if test "${ac_cv_sizeof_short+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008800 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008801else
Martin v. Löwis11437992002-04-12 09:54:03 +00008802 if test "$cross_compiling" = yes; then
8803 # Depending upon the size, compute the lo and hi bounds.
8804cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008805/* confdefs.h. */
8806_ACEOF
8807cat confdefs.h >>conftest.$ac_ext
8808cat >>conftest.$ac_ext <<_ACEOF
8809/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008810$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008811 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008812int
8813main ()
8814{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008815static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008816test_array [0] = 0
8817
8818 ;
8819 return 0;
8820}
8821_ACEOF
8822rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008823if { (ac_try="$ac_compile"
8824case "(($ac_try" in
8825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8826 *) ac_try_echo=$ac_try;;
8827esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008829 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008830 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008831 grep -v '^ *+' conftest.er1 >conftest.err
8832 rm -f conftest.er1
8833 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008835 (exit $ac_status); } && {
8836 test -z "$ac_c_werror_flag" ||
8837 test ! -s conftest.err
8838 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008839 ac_lo=0 ac_mid=0
8840 while :; do
8841 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008842/* confdefs.h. */
8843_ACEOF
8844cat confdefs.h >>conftest.$ac_ext
8845cat >>conftest.$ac_ext <<_ACEOF
8846/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008847$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008848 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008849int
8850main ()
8851{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008852static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008853test_array [0] = 0
8854
8855 ;
8856 return 0;
8857}
8858_ACEOF
8859rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008860if { (ac_try="$ac_compile"
8861case "(($ac_try" in
8862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8863 *) ac_try_echo=$ac_try;;
8864esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008866 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008867 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008868 grep -v '^ *+' conftest.er1 >conftest.err
8869 rm -f conftest.er1
8870 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008872 (exit $ac_status); } && {
8873 test -z "$ac_c_werror_flag" ||
8874 test ! -s conftest.err
8875 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008876 ac_hi=$ac_mid; break
8877else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008878 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008879sed 's/^/| /' conftest.$ac_ext >&5
8880
Martin v. Löwiseba40652007-08-30 20:10:57 +00008881 ac_lo=`expr $ac_mid + 1`
8882 if test $ac_lo -le $ac_mid; then
8883 ac_lo= ac_hi=
8884 break
8885 fi
8886 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008887fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008888
8889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008890 done
8891else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008892 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008893sed 's/^/| /' conftest.$ac_ext >&5
8894
Martin v. Löwiseba40652007-08-30 20:10:57 +00008895 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008896/* confdefs.h. */
8897_ACEOF
8898cat confdefs.h >>conftest.$ac_ext
8899cat >>conftest.$ac_ext <<_ACEOF
8900/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008901$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008902 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008903int
8904main ()
8905{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008906static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008907test_array [0] = 0
8908
8909 ;
8910 return 0;
8911}
8912_ACEOF
8913rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008914if { (ac_try="$ac_compile"
8915case "(($ac_try" in
8916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8917 *) ac_try_echo=$ac_try;;
8918esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008920 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008921 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008922 grep -v '^ *+' conftest.er1 >conftest.err
8923 rm -f conftest.er1
8924 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008926 (exit $ac_status); } && {
8927 test -z "$ac_c_werror_flag" ||
8928 test ! -s conftest.err
8929 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008930 ac_hi=-1 ac_mid=-1
8931 while :; do
8932 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008933/* confdefs.h. */
8934_ACEOF
8935cat confdefs.h >>conftest.$ac_ext
8936cat >>conftest.$ac_ext <<_ACEOF
8937/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008938$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008939 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008940int
8941main ()
8942{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008943static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008944test_array [0] = 0
8945
8946 ;
8947 return 0;
8948}
8949_ACEOF
8950rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008951if { (ac_try="$ac_compile"
8952case "(($ac_try" in
8953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8954 *) ac_try_echo=$ac_try;;
8955esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008957 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008958 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008959 grep -v '^ *+' conftest.er1 >conftest.err
8960 rm -f conftest.er1
8961 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008963 (exit $ac_status); } && {
8964 test -z "$ac_c_werror_flag" ||
8965 test ! -s conftest.err
8966 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008967 ac_lo=$ac_mid; break
8968else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008969 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008970sed 's/^/| /' conftest.$ac_ext >&5
8971
Martin v. Löwiseba40652007-08-30 20:10:57 +00008972 ac_hi=`expr '(' $ac_mid ')' - 1`
8973 if test $ac_mid -le $ac_hi; then
8974 ac_lo= ac_hi=
8975 break
8976 fi
8977 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008978fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008979
8980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008981 done
8982else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008983 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008984sed 's/^/| /' conftest.$ac_ext >&5
8985
Martin v. Löwiseba40652007-08-30 20:10:57 +00008986 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008987fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008988
8989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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 +00008993# Binary search between lo and hi bounds.
8994while test "x$ac_lo" != "x$ac_hi"; do
8995 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8996 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008997/* confdefs.h. */
8998_ACEOF
8999cat confdefs.h >>conftest.$ac_ext
9000cat >>conftest.$ac_ext <<_ACEOF
9001/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009002$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009003 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009004int
9005main ()
9006{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009007static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009008test_array [0] = 0
9009
9010 ;
9011 return 0;
9012}
9013_ACEOF
9014rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009015if { (ac_try="$ac_compile"
9016case "(($ac_try" in
9017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9018 *) ac_try_echo=$ac_try;;
9019esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009021 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009022 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009023 grep -v '^ *+' conftest.er1 >conftest.err
9024 rm -f conftest.er1
9025 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009027 (exit $ac_status); } && {
9028 test -z "$ac_c_werror_flag" ||
9029 test ! -s conftest.err
9030 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009031 ac_hi=$ac_mid
9032else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009033 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009034sed 's/^/| /' conftest.$ac_ext >&5
9035
Martin v. Löwiseba40652007-08-30 20:10:57 +00009036 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009037fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009038
9039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009040done
9041case $ac_lo in
9042?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009043'') if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009044 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009045See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009046echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009047See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009048 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009049 else
9050 ac_cv_sizeof_short=0
9051 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009052esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009053else
Martin v. Löwis11437992002-04-12 09:54:03 +00009054 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009055/* confdefs.h. */
9056_ACEOF
9057cat confdefs.h >>conftest.$ac_ext
9058cat >>conftest.$ac_ext <<_ACEOF
9059/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009060$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009061 typedef short ac__type_sizeof_;
9062static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9063static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009064#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009065#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009066int
9067main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009068{
Martin v. Löwis11437992002-04-12 09:54:03 +00009069
9070 FILE *f = fopen ("conftest.val", "w");
9071 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009072 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009073 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009074 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009075 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009076 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009077 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009078 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009079 }
9080 else
9081 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009082 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009083 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009084 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009085 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009086 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009087 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009088
9089 ;
9090 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009091}
Martin v. Löwis11437992002-04-12 09:54:03 +00009092_ACEOF
9093rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009094if { (ac_try="$ac_link"
9095case "(($ac_try" in
9096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9097 *) ac_try_echo=$ac_try;;
9098esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009100 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009101 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009103 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009104 { (case "(($ac_try" in
9105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9106 *) ac_try_echo=$ac_try;;
9107esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009109 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009110 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009112 (exit $ac_status); }; }; then
9113 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009114else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009115 echo "$as_me: program exited with status $ac_status" >&5
9116echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009117sed 's/^/| /' conftest.$ac_ext >&5
9118
Martin v. Löwis11437992002-04-12 09:54:03 +00009119( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009120if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009121 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009122See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009123echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009124See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009125 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009126 else
9127 ac_cv_sizeof_short=0
9128 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009129fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009130rm -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 +00009131fi
9132rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009133fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009134{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9135echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009136
9137
9138
Martin v. Löwis11437992002-04-12 09:54:03 +00009139cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009140#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009141_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009142
9143
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009144{ echo "$as_me:$LINENO: checking for float" >&5
9145echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9146if test "${ac_cv_type_float+set}" = set; then
9147 echo $ECHO_N "(cached) $ECHO_C" >&6
9148else
9149 cat >conftest.$ac_ext <<_ACEOF
9150/* confdefs.h. */
9151_ACEOF
9152cat confdefs.h >>conftest.$ac_ext
9153cat >>conftest.$ac_ext <<_ACEOF
9154/* end confdefs.h. */
9155$ac_includes_default
9156typedef float ac__type_new_;
9157int
9158main ()
9159{
9160if ((ac__type_new_ *) 0)
9161 return 0;
9162if (sizeof (ac__type_new_))
9163 return 0;
9164 ;
9165 return 0;
9166}
9167_ACEOF
9168rm -f conftest.$ac_objext
9169if { (ac_try="$ac_compile"
9170case "(($ac_try" in
9171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9172 *) ac_try_echo=$ac_try;;
9173esac
9174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9175 (eval "$ac_compile") 2>conftest.er1
9176 ac_status=$?
9177 grep -v '^ *+' conftest.er1 >conftest.err
9178 rm -f conftest.er1
9179 cat conftest.err >&5
9180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9181 (exit $ac_status); } && {
9182 test -z "$ac_c_werror_flag" ||
9183 test ! -s conftest.err
9184 } && test -s conftest.$ac_objext; then
9185 ac_cv_type_float=yes
9186else
9187 echo "$as_me: failed program was:" >&5
9188sed 's/^/| /' conftest.$ac_ext >&5
9189
9190 ac_cv_type_float=no
9191fi
9192
9193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9194fi
9195{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9196echo "${ECHO_T}$ac_cv_type_float" >&6; }
9197
Martin v. Löwiseba40652007-08-30 20:10:57 +00009198# The cast to long int works around a bug in the HP C Compiler
9199# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9200# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9201# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009202{ echo "$as_me:$LINENO: checking size of float" >&5
9203echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009204if test "${ac_cv_sizeof_float+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009205 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009206else
Martin v. Löwis11437992002-04-12 09:54:03 +00009207 if test "$cross_compiling" = yes; then
9208 # Depending upon the size, compute the lo and hi bounds.
9209cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009210/* confdefs.h. */
9211_ACEOF
9212cat confdefs.h >>conftest.$ac_ext
9213cat >>conftest.$ac_ext <<_ACEOF
9214/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009215$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009216 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009217int
9218main ()
9219{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009220static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009221test_array [0] = 0
9222
9223 ;
9224 return 0;
9225}
9226_ACEOF
9227rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009228if { (ac_try="$ac_compile"
9229case "(($ac_try" in
9230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9231 *) ac_try_echo=$ac_try;;
9232esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009234 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009235 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009236 grep -v '^ *+' conftest.er1 >conftest.err
9237 rm -f conftest.er1
9238 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009240 (exit $ac_status); } && {
9241 test -z "$ac_c_werror_flag" ||
9242 test ! -s conftest.err
9243 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009244 ac_lo=0 ac_mid=0
9245 while :; do
9246 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009247/* confdefs.h. */
9248_ACEOF
9249cat confdefs.h >>conftest.$ac_ext
9250cat >>conftest.$ac_ext <<_ACEOF
9251/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009252$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009253 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009254int
9255main ()
9256{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009257static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009258test_array [0] = 0
9259
9260 ;
9261 return 0;
9262}
9263_ACEOF
9264rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009265if { (ac_try="$ac_compile"
9266case "(($ac_try" in
9267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9268 *) ac_try_echo=$ac_try;;
9269esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009271 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009272 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009273 grep -v '^ *+' conftest.er1 >conftest.err
9274 rm -f conftest.er1
9275 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009277 (exit $ac_status); } && {
9278 test -z "$ac_c_werror_flag" ||
9279 test ! -s conftest.err
9280 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009281 ac_hi=$ac_mid; break
9282else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009283 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009284sed 's/^/| /' conftest.$ac_ext >&5
9285
Martin v. Löwiseba40652007-08-30 20:10:57 +00009286 ac_lo=`expr $ac_mid + 1`
9287 if test $ac_lo -le $ac_mid; then
9288 ac_lo= ac_hi=
9289 break
9290 fi
9291 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009292fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009293
9294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009295 done
9296else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009297 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009298sed 's/^/| /' conftest.$ac_ext >&5
9299
Martin v. Löwiseba40652007-08-30 20:10:57 +00009300 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009301/* confdefs.h. */
9302_ACEOF
9303cat confdefs.h >>conftest.$ac_ext
9304cat >>conftest.$ac_ext <<_ACEOF
9305/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009306$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009307 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009308int
9309main ()
9310{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009311static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009312test_array [0] = 0
9313
9314 ;
9315 return 0;
9316}
9317_ACEOF
9318rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009319if { (ac_try="$ac_compile"
9320case "(($ac_try" in
9321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9322 *) ac_try_echo=$ac_try;;
9323esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009325 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009326 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009327 grep -v '^ *+' conftest.er1 >conftest.err
9328 rm -f conftest.er1
9329 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009331 (exit $ac_status); } && {
9332 test -z "$ac_c_werror_flag" ||
9333 test ! -s conftest.err
9334 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009335 ac_hi=-1 ac_mid=-1
9336 while :; do
9337 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009338/* confdefs.h. */
9339_ACEOF
9340cat confdefs.h >>conftest.$ac_ext
9341cat >>conftest.$ac_ext <<_ACEOF
9342/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009343$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009344 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009345int
9346main ()
9347{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009348static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009349test_array [0] = 0
9350
9351 ;
9352 return 0;
9353}
9354_ACEOF
9355rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009356if { (ac_try="$ac_compile"
9357case "(($ac_try" in
9358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9359 *) ac_try_echo=$ac_try;;
9360esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009362 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009363 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009364 grep -v '^ *+' conftest.er1 >conftest.err
9365 rm -f conftest.er1
9366 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009368 (exit $ac_status); } && {
9369 test -z "$ac_c_werror_flag" ||
9370 test ! -s conftest.err
9371 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009372 ac_lo=$ac_mid; break
9373else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009374 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009375sed 's/^/| /' conftest.$ac_ext >&5
9376
Martin v. Löwiseba40652007-08-30 20:10:57 +00009377 ac_hi=`expr '(' $ac_mid ')' - 1`
9378 if test $ac_mid -le $ac_hi; then
9379 ac_lo= ac_hi=
9380 break
9381 fi
9382 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009383fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009384
9385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009386 done
9387else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009388 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009389sed 's/^/| /' conftest.$ac_ext >&5
9390
Martin v. Löwiseba40652007-08-30 20:10:57 +00009391 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009392fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009393
9394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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 +00009398# Binary search between lo and hi bounds.
9399while test "x$ac_lo" != "x$ac_hi"; do
9400 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9401 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009402/* confdefs.h. */
9403_ACEOF
9404cat confdefs.h >>conftest.$ac_ext
9405cat >>conftest.$ac_ext <<_ACEOF
9406/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009407$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009408 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009409int
9410main ()
9411{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009412static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009413test_array [0] = 0
9414
9415 ;
9416 return 0;
9417}
9418_ACEOF
9419rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009420if { (ac_try="$ac_compile"
9421case "(($ac_try" in
9422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9423 *) ac_try_echo=$ac_try;;
9424esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009426 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009427 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009428 grep -v '^ *+' conftest.er1 >conftest.err
9429 rm -f conftest.er1
9430 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009432 (exit $ac_status); } && {
9433 test -z "$ac_c_werror_flag" ||
9434 test ! -s conftest.err
9435 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009436 ac_hi=$ac_mid
9437else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009438 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009439sed 's/^/| /' conftest.$ac_ext >&5
9440
Martin v. Löwiseba40652007-08-30 20:10:57 +00009441 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009442fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009443
9444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009445done
9446case $ac_lo in
9447?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009448'') if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009449 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009450See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009451echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009452See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009453 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009454 else
9455 ac_cv_sizeof_float=0
9456 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009457esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009458else
Martin v. Löwis11437992002-04-12 09:54:03 +00009459 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009460/* confdefs.h. */
9461_ACEOF
9462cat confdefs.h >>conftest.$ac_ext
9463cat >>conftest.$ac_ext <<_ACEOF
9464/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009465$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009466 typedef float ac__type_sizeof_;
9467static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9468static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009469#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009470#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009471int
9472main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009473{
Martin v. Löwis11437992002-04-12 09:54:03 +00009474
9475 FILE *f = fopen ("conftest.val", "w");
9476 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009477 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009478 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009479 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009480 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009481 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009482 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009483 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009484 }
9485 else
9486 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009487 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009488 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009489 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009490 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009491 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009492 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009493
9494 ;
9495 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009496}
Martin v. Löwis11437992002-04-12 09:54:03 +00009497_ACEOF
9498rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009499if { (ac_try="$ac_link"
9500case "(($ac_try" in
9501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9502 *) ac_try_echo=$ac_try;;
9503esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009505 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009506 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009508 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009509 { (case "(($ac_try" in
9510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9511 *) ac_try_echo=$ac_try;;
9512esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009514 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009515 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009517 (exit $ac_status); }; }; then
9518 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009519else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009520 echo "$as_me: program exited with status $ac_status" >&5
9521echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009522sed 's/^/| /' conftest.$ac_ext >&5
9523
Martin v. Löwis11437992002-04-12 09:54:03 +00009524( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009525if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009526 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009527See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009528echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009529See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009530 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009531 else
9532 ac_cv_sizeof_float=0
9533 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009534fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009535rm -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 +00009536fi
9537rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009538fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009539{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9540echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009541
9542
9543
Martin v. Löwis11437992002-04-12 09:54:03 +00009544cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009545#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009546_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009547
9548
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009549{ echo "$as_me:$LINENO: checking for double" >&5
9550echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9551if test "${ac_cv_type_double+set}" = set; then
9552 echo $ECHO_N "(cached) $ECHO_C" >&6
9553else
9554 cat >conftest.$ac_ext <<_ACEOF
9555/* confdefs.h. */
9556_ACEOF
9557cat confdefs.h >>conftest.$ac_ext
9558cat >>conftest.$ac_ext <<_ACEOF
9559/* end confdefs.h. */
9560$ac_includes_default
9561typedef double ac__type_new_;
9562int
9563main ()
9564{
9565if ((ac__type_new_ *) 0)
9566 return 0;
9567if (sizeof (ac__type_new_))
9568 return 0;
9569 ;
9570 return 0;
9571}
9572_ACEOF
9573rm -f conftest.$ac_objext
9574if { (ac_try="$ac_compile"
9575case "(($ac_try" in
9576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9577 *) ac_try_echo=$ac_try;;
9578esac
9579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9580 (eval "$ac_compile") 2>conftest.er1
9581 ac_status=$?
9582 grep -v '^ *+' conftest.er1 >conftest.err
9583 rm -f conftest.er1
9584 cat conftest.err >&5
9585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9586 (exit $ac_status); } && {
9587 test -z "$ac_c_werror_flag" ||
9588 test ! -s conftest.err
9589 } && test -s conftest.$ac_objext; then
9590 ac_cv_type_double=yes
9591else
9592 echo "$as_me: failed program was:" >&5
9593sed 's/^/| /' conftest.$ac_ext >&5
9594
9595 ac_cv_type_double=no
9596fi
9597
9598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9599fi
9600{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9601echo "${ECHO_T}$ac_cv_type_double" >&6; }
9602
Martin v. Löwiseba40652007-08-30 20:10:57 +00009603# The cast to long int works around a bug in the HP C Compiler
9604# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9605# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9606# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009607{ echo "$as_me:$LINENO: checking size of double" >&5
9608echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009609if test "${ac_cv_sizeof_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009610 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009611else
Martin v. Löwis11437992002-04-12 09:54:03 +00009612 if test "$cross_compiling" = yes; then
9613 # Depending upon the size, compute the lo and hi bounds.
9614cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009615/* confdefs.h. */
9616_ACEOF
9617cat confdefs.h >>conftest.$ac_ext
9618cat >>conftest.$ac_ext <<_ACEOF
9619/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009620$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009621 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009622int
9623main ()
9624{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009625static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009626test_array [0] = 0
9627
9628 ;
9629 return 0;
9630}
9631_ACEOF
9632rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009633if { (ac_try="$ac_compile"
9634case "(($ac_try" in
9635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9636 *) ac_try_echo=$ac_try;;
9637esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009639 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009640 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009641 grep -v '^ *+' conftest.er1 >conftest.err
9642 rm -f conftest.er1
9643 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009645 (exit $ac_status); } && {
9646 test -z "$ac_c_werror_flag" ||
9647 test ! -s conftest.err
9648 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009649 ac_lo=0 ac_mid=0
9650 while :; do
9651 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009652/* confdefs.h. */
9653_ACEOF
9654cat confdefs.h >>conftest.$ac_ext
9655cat >>conftest.$ac_ext <<_ACEOF
9656/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009657$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009658 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009659int
9660main ()
9661{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009662static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009663test_array [0] = 0
9664
9665 ;
9666 return 0;
9667}
9668_ACEOF
9669rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009670if { (ac_try="$ac_compile"
9671case "(($ac_try" in
9672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9673 *) ac_try_echo=$ac_try;;
9674esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009676 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009677 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009678 grep -v '^ *+' conftest.er1 >conftest.err
9679 rm -f conftest.er1
9680 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009682 (exit $ac_status); } && {
9683 test -z "$ac_c_werror_flag" ||
9684 test ! -s conftest.err
9685 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009686 ac_hi=$ac_mid; break
9687else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009688 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009689sed 's/^/| /' conftest.$ac_ext >&5
9690
Martin v. Löwiseba40652007-08-30 20:10:57 +00009691 ac_lo=`expr $ac_mid + 1`
9692 if test $ac_lo -le $ac_mid; then
9693 ac_lo= ac_hi=
9694 break
9695 fi
9696 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009697fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009698
9699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009700 done
9701else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009702 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009703sed 's/^/| /' conftest.$ac_ext >&5
9704
Martin v. Löwiseba40652007-08-30 20:10:57 +00009705 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009706/* confdefs.h. */
9707_ACEOF
9708cat confdefs.h >>conftest.$ac_ext
9709cat >>conftest.$ac_ext <<_ACEOF
9710/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009711$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009712 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009713int
9714main ()
9715{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009716static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009717test_array [0] = 0
9718
9719 ;
9720 return 0;
9721}
9722_ACEOF
9723rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009724if { (ac_try="$ac_compile"
9725case "(($ac_try" in
9726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9727 *) ac_try_echo=$ac_try;;
9728esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009730 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009731 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009732 grep -v '^ *+' conftest.er1 >conftest.err
9733 rm -f conftest.er1
9734 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009736 (exit $ac_status); } && {
9737 test -z "$ac_c_werror_flag" ||
9738 test ! -s conftest.err
9739 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009740 ac_hi=-1 ac_mid=-1
9741 while :; do
9742 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009743/* confdefs.h. */
9744_ACEOF
9745cat confdefs.h >>conftest.$ac_ext
9746cat >>conftest.$ac_ext <<_ACEOF
9747/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009748$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009749 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009750int
9751main ()
9752{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009753static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009754test_array [0] = 0
9755
9756 ;
9757 return 0;
9758}
9759_ACEOF
9760rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009761if { (ac_try="$ac_compile"
9762case "(($ac_try" in
9763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9764 *) ac_try_echo=$ac_try;;
9765esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009767 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009768 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009769 grep -v '^ *+' conftest.er1 >conftest.err
9770 rm -f conftest.er1
9771 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009773 (exit $ac_status); } && {
9774 test -z "$ac_c_werror_flag" ||
9775 test ! -s conftest.err
9776 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009777 ac_lo=$ac_mid; break
9778else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009779 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009780sed 's/^/| /' conftest.$ac_ext >&5
9781
Martin v. Löwiseba40652007-08-30 20:10:57 +00009782 ac_hi=`expr '(' $ac_mid ')' - 1`
9783 if test $ac_mid -le $ac_hi; then
9784 ac_lo= ac_hi=
9785 break
9786 fi
9787 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009788fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009789
9790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009791 done
9792else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009793 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009794sed 's/^/| /' conftest.$ac_ext >&5
9795
Martin v. Löwiseba40652007-08-30 20:10:57 +00009796 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009797fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009798
9799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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 +00009803# Binary search between lo and hi bounds.
9804while test "x$ac_lo" != "x$ac_hi"; do
9805 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9806 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009807/* confdefs.h. */
9808_ACEOF
9809cat confdefs.h >>conftest.$ac_ext
9810cat >>conftest.$ac_ext <<_ACEOF
9811/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009812$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009813 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009814int
9815main ()
9816{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009817static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009818test_array [0] = 0
9819
9820 ;
9821 return 0;
9822}
9823_ACEOF
9824rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009825if { (ac_try="$ac_compile"
9826case "(($ac_try" in
9827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9828 *) ac_try_echo=$ac_try;;
9829esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009831 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009832 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009833 grep -v '^ *+' conftest.er1 >conftest.err
9834 rm -f conftest.er1
9835 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009837 (exit $ac_status); } && {
9838 test -z "$ac_c_werror_flag" ||
9839 test ! -s conftest.err
9840 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009841 ac_hi=$ac_mid
9842else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009843 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009844sed 's/^/| /' conftest.$ac_ext >&5
9845
Martin v. Löwiseba40652007-08-30 20:10:57 +00009846 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009847fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009848
9849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009850done
9851case $ac_lo in
9852?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009853'') if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009854 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009855See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009856echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009857See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009858 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009859 else
9860 ac_cv_sizeof_double=0
9861 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009862esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009863else
Martin v. Löwis11437992002-04-12 09:54:03 +00009864 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009865/* confdefs.h. */
9866_ACEOF
9867cat confdefs.h >>conftest.$ac_ext
9868cat >>conftest.$ac_ext <<_ACEOF
9869/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009870$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009871 typedef double ac__type_sizeof_;
9872static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9873static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009874#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009875#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009876int
9877main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009878{
Martin v. Löwis11437992002-04-12 09:54:03 +00009879
9880 FILE *f = fopen ("conftest.val", "w");
9881 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009882 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009883 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009884 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009885 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009886 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009887 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009888 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009889 }
9890 else
9891 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009892 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009893 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009894 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009895 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009896 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009897 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009898
9899 ;
9900 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009901}
Martin v. Löwis11437992002-04-12 09:54:03 +00009902_ACEOF
9903rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009904if { (ac_try="$ac_link"
9905case "(($ac_try" in
9906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9907 *) ac_try_echo=$ac_try;;
9908esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009910 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009911 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009913 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009914 { (case "(($ac_try" in
9915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9916 *) ac_try_echo=$ac_try;;
9917esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009919 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009920 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009922 (exit $ac_status); }; }; then
9923 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009924else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009925 echo "$as_me: program exited with status $ac_status" >&5
9926echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009927sed 's/^/| /' conftest.$ac_ext >&5
9928
Martin v. Löwis11437992002-04-12 09:54:03 +00009929( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009930if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009931 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009932See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009933echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009934See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009935 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009936 else
9937 ac_cv_sizeof_double=0
9938 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009939fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009940rm -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 +00009941fi
9942rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009943fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009944{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9945echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009946
9947
9948
Martin v. Löwis11437992002-04-12 09:54:03 +00009949cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009950#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009951_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009952
9953
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009954{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9955echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9956if test "${ac_cv_type_fpos_t+set}" = set; then
9957 echo $ECHO_N "(cached) $ECHO_C" >&6
9958else
9959 cat >conftest.$ac_ext <<_ACEOF
9960/* confdefs.h. */
9961_ACEOF
9962cat confdefs.h >>conftest.$ac_ext
9963cat >>conftest.$ac_ext <<_ACEOF
9964/* end confdefs.h. */
9965$ac_includes_default
9966typedef fpos_t ac__type_new_;
9967int
9968main ()
9969{
9970if ((ac__type_new_ *) 0)
9971 return 0;
9972if (sizeof (ac__type_new_))
9973 return 0;
9974 ;
9975 return 0;
9976}
9977_ACEOF
9978rm -f conftest.$ac_objext
9979if { (ac_try="$ac_compile"
9980case "(($ac_try" in
9981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9982 *) ac_try_echo=$ac_try;;
9983esac
9984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9985 (eval "$ac_compile") 2>conftest.er1
9986 ac_status=$?
9987 grep -v '^ *+' conftest.er1 >conftest.err
9988 rm -f conftest.er1
9989 cat conftest.err >&5
9990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9991 (exit $ac_status); } && {
9992 test -z "$ac_c_werror_flag" ||
9993 test ! -s conftest.err
9994 } && test -s conftest.$ac_objext; then
9995 ac_cv_type_fpos_t=yes
9996else
9997 echo "$as_me: failed program was:" >&5
9998sed 's/^/| /' conftest.$ac_ext >&5
9999
10000 ac_cv_type_fpos_t=no
10001fi
10002
10003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10004fi
10005{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
10006echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
10007
Martin v. Löwiseba40652007-08-30 20:10:57 +000010008# The cast to long int works around a bug in the HP C Compiler
10009# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10010# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10011# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010012{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
10013echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010014if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010015 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010016else
Martin v. Löwis11437992002-04-12 09:54:03 +000010017 if test "$cross_compiling" = yes; then
10018 # Depending upon the size, compute the lo and hi bounds.
10019cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010020/* confdefs.h. */
10021_ACEOF
10022cat confdefs.h >>conftest.$ac_ext
10023cat >>conftest.$ac_ext <<_ACEOF
10024/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010025$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010026 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010027int
10028main ()
10029{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010030static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010031test_array [0] = 0
10032
10033 ;
10034 return 0;
10035}
10036_ACEOF
10037rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010038if { (ac_try="$ac_compile"
10039case "(($ac_try" in
10040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10041 *) ac_try_echo=$ac_try;;
10042esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010044 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010045 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010046 grep -v '^ *+' conftest.er1 >conftest.err
10047 rm -f conftest.er1
10048 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010050 (exit $ac_status); } && {
10051 test -z "$ac_c_werror_flag" ||
10052 test ! -s conftest.err
10053 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010054 ac_lo=0 ac_mid=0
10055 while :; do
10056 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010057/* confdefs.h. */
10058_ACEOF
10059cat confdefs.h >>conftest.$ac_ext
10060cat >>conftest.$ac_ext <<_ACEOF
10061/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010062$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010063 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010064int
10065main ()
10066{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010067static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010068test_array [0] = 0
10069
10070 ;
10071 return 0;
10072}
10073_ACEOF
10074rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010075if { (ac_try="$ac_compile"
10076case "(($ac_try" in
10077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10078 *) ac_try_echo=$ac_try;;
10079esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010081 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010082 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010083 grep -v '^ *+' conftest.er1 >conftest.err
10084 rm -f conftest.er1
10085 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010087 (exit $ac_status); } && {
10088 test -z "$ac_c_werror_flag" ||
10089 test ! -s conftest.err
10090 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010091 ac_hi=$ac_mid; break
10092else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010093 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010094sed 's/^/| /' conftest.$ac_ext >&5
10095
Martin v. Löwiseba40652007-08-30 20:10:57 +000010096 ac_lo=`expr $ac_mid + 1`
10097 if test $ac_lo -le $ac_mid; then
10098 ac_lo= ac_hi=
10099 break
10100 fi
10101 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010102fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010103
10104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010105 done
10106else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010107 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010108sed 's/^/| /' conftest.$ac_ext >&5
10109
Martin v. Löwiseba40652007-08-30 20:10:57 +000010110 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010111/* confdefs.h. */
10112_ACEOF
10113cat confdefs.h >>conftest.$ac_ext
10114cat >>conftest.$ac_ext <<_ACEOF
10115/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010116$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010117 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010118int
10119main ()
10120{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010121static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010122test_array [0] = 0
10123
10124 ;
10125 return 0;
10126}
10127_ACEOF
10128rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010129if { (ac_try="$ac_compile"
10130case "(($ac_try" in
10131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10132 *) ac_try_echo=$ac_try;;
10133esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010135 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010136 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010137 grep -v '^ *+' conftest.er1 >conftest.err
10138 rm -f conftest.er1
10139 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010141 (exit $ac_status); } && {
10142 test -z "$ac_c_werror_flag" ||
10143 test ! -s conftest.err
10144 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010145 ac_hi=-1 ac_mid=-1
10146 while :; do
10147 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010148/* confdefs.h. */
10149_ACEOF
10150cat confdefs.h >>conftest.$ac_ext
10151cat >>conftest.$ac_ext <<_ACEOF
10152/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010153$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010154 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010155int
10156main ()
10157{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010158static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010159test_array [0] = 0
10160
10161 ;
10162 return 0;
10163}
10164_ACEOF
10165rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010166if { (ac_try="$ac_compile"
10167case "(($ac_try" in
10168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10169 *) ac_try_echo=$ac_try;;
10170esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010172 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010173 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010174 grep -v '^ *+' conftest.er1 >conftest.err
10175 rm -f conftest.er1
10176 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010178 (exit $ac_status); } && {
10179 test -z "$ac_c_werror_flag" ||
10180 test ! -s conftest.err
10181 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010182 ac_lo=$ac_mid; break
10183else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010184 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010185sed 's/^/| /' conftest.$ac_ext >&5
10186
Martin v. Löwiseba40652007-08-30 20:10:57 +000010187 ac_hi=`expr '(' $ac_mid ')' - 1`
10188 if test $ac_mid -le $ac_hi; then
10189 ac_lo= ac_hi=
10190 break
10191 fi
10192 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010193fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010194
10195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010196 done
10197else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010198 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010199sed 's/^/| /' conftest.$ac_ext >&5
10200
Martin v. Löwiseba40652007-08-30 20:10:57 +000010201 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010202fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010203
10204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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 +000010208# Binary search between lo and hi bounds.
10209while test "x$ac_lo" != "x$ac_hi"; do
10210 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10211 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010212/* confdefs.h. */
10213_ACEOF
10214cat confdefs.h >>conftest.$ac_ext
10215cat >>conftest.$ac_ext <<_ACEOF
10216/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010217$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010218 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010219int
10220main ()
10221{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010222static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010223test_array [0] = 0
10224
10225 ;
10226 return 0;
10227}
10228_ACEOF
10229rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010230if { (ac_try="$ac_compile"
10231case "(($ac_try" in
10232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10233 *) ac_try_echo=$ac_try;;
10234esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010236 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010237 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010238 grep -v '^ *+' conftest.er1 >conftest.err
10239 rm -f conftest.er1
10240 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010242 (exit $ac_status); } && {
10243 test -z "$ac_c_werror_flag" ||
10244 test ! -s conftest.err
10245 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010246 ac_hi=$ac_mid
10247else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010248 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010249sed 's/^/| /' conftest.$ac_ext >&5
10250
Martin v. Löwiseba40652007-08-30 20:10:57 +000010251 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010252fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010253
10254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010255done
10256case $ac_lo in
10257?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010258'') if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010259 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010260See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010261echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010262See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010263 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010264 else
10265 ac_cv_sizeof_fpos_t=0
10266 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010267esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010268else
Martin v. Löwis11437992002-04-12 09:54:03 +000010269 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010270/* confdefs.h. */
10271_ACEOF
10272cat confdefs.h >>conftest.$ac_ext
10273cat >>conftest.$ac_ext <<_ACEOF
10274/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010275$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010276 typedef fpos_t ac__type_sizeof_;
10277static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10278static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010279#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010280#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010281int
10282main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010283{
Martin v. Löwis11437992002-04-12 09:54:03 +000010284
10285 FILE *f = fopen ("conftest.val", "w");
10286 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010287 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010288 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010289 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010290 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010291 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010292 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010293 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010294 }
10295 else
10296 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010297 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010298 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010299 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010300 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010301 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010302 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010303
10304 ;
10305 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010306}
Martin v. Löwis11437992002-04-12 09:54:03 +000010307_ACEOF
10308rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010309if { (ac_try="$ac_link"
10310case "(($ac_try" in
10311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10312 *) ac_try_echo=$ac_try;;
10313esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010314eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010315 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010316 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010318 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010319 { (case "(($ac_try" in
10320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10321 *) ac_try_echo=$ac_try;;
10322esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010324 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010325 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010327 (exit $ac_status); }; }; then
10328 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010329else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010330 echo "$as_me: program exited with status $ac_status" >&5
10331echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010332sed 's/^/| /' conftest.$ac_ext >&5
10333
Martin v. Löwis11437992002-04-12 09:54:03 +000010334( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010335if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010336 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010337See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010338echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010339See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010340 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010341 else
10342 ac_cv_sizeof_fpos_t=0
10343 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010344fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010345rm -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 +000010346fi
10347rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010348fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010349{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10350echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010351
10352
10353
Martin v. Löwis11437992002-04-12 09:54:03 +000010354cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010355#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010356_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010357
Michael W. Hudson54241132001-12-07 15:38:26 +000010358
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010359{ echo "$as_me:$LINENO: checking for size_t" >&5
10360echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10361if test "${ac_cv_type_size_t+set}" = set; then
10362 echo $ECHO_N "(cached) $ECHO_C" >&6
10363else
10364 cat >conftest.$ac_ext <<_ACEOF
10365/* confdefs.h. */
10366_ACEOF
10367cat confdefs.h >>conftest.$ac_ext
10368cat >>conftest.$ac_ext <<_ACEOF
10369/* end confdefs.h. */
10370$ac_includes_default
10371typedef size_t ac__type_new_;
10372int
10373main ()
10374{
10375if ((ac__type_new_ *) 0)
10376 return 0;
10377if (sizeof (ac__type_new_))
10378 return 0;
10379 ;
10380 return 0;
10381}
10382_ACEOF
10383rm -f conftest.$ac_objext
10384if { (ac_try="$ac_compile"
10385case "(($ac_try" in
10386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10387 *) ac_try_echo=$ac_try;;
10388esac
10389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10390 (eval "$ac_compile") 2>conftest.er1
10391 ac_status=$?
10392 grep -v '^ *+' conftest.er1 >conftest.err
10393 rm -f conftest.er1
10394 cat conftest.err >&5
10395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10396 (exit $ac_status); } && {
10397 test -z "$ac_c_werror_flag" ||
10398 test ! -s conftest.err
10399 } && test -s conftest.$ac_objext; then
10400 ac_cv_type_size_t=yes
10401else
10402 echo "$as_me: failed program was:" >&5
10403sed 's/^/| /' conftest.$ac_ext >&5
10404
10405 ac_cv_type_size_t=no
10406fi
10407
10408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10409fi
10410{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10411echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10412
Martin v. Löwiseba40652007-08-30 20:10:57 +000010413# The cast to long int works around a bug in the HP C Compiler
10414# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10415# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10416# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010417{ echo "$as_me:$LINENO: checking size of size_t" >&5
10418echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010419if test "${ac_cv_sizeof_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010420 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010421else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010422 if test "$cross_compiling" = yes; then
10423 # Depending upon the size, compute the lo and hi bounds.
10424cat >conftest.$ac_ext <<_ACEOF
10425/* confdefs.h. */
10426_ACEOF
10427cat confdefs.h >>conftest.$ac_ext
10428cat >>conftest.$ac_ext <<_ACEOF
10429/* end confdefs.h. */
10430$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010431 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010432int
10433main ()
10434{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010435static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010436test_array [0] = 0
10437
10438 ;
10439 return 0;
10440}
10441_ACEOF
10442rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010443if { (ac_try="$ac_compile"
10444case "(($ac_try" in
10445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10446 *) ac_try_echo=$ac_try;;
10447esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010449 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010450 ac_status=$?
10451 grep -v '^ *+' conftest.er1 >conftest.err
10452 rm -f conftest.er1
10453 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010455 (exit $ac_status); } && {
10456 test -z "$ac_c_werror_flag" ||
10457 test ! -s conftest.err
10458 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010459 ac_lo=0 ac_mid=0
10460 while :; do
10461 cat >conftest.$ac_ext <<_ACEOF
10462/* confdefs.h. */
10463_ACEOF
10464cat confdefs.h >>conftest.$ac_ext
10465cat >>conftest.$ac_ext <<_ACEOF
10466/* end confdefs.h. */
10467$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010468 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010469int
10470main ()
10471{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010472static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010473test_array [0] = 0
10474
10475 ;
10476 return 0;
10477}
10478_ACEOF
10479rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010480if { (ac_try="$ac_compile"
10481case "(($ac_try" in
10482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10483 *) ac_try_echo=$ac_try;;
10484esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010486 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010487 ac_status=$?
10488 grep -v '^ *+' conftest.er1 >conftest.err
10489 rm -f conftest.er1
10490 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010492 (exit $ac_status); } && {
10493 test -z "$ac_c_werror_flag" ||
10494 test ! -s conftest.err
10495 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010496 ac_hi=$ac_mid; break
10497else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010498 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010499sed 's/^/| /' conftest.$ac_ext >&5
10500
Martin v. Löwiseba40652007-08-30 20:10:57 +000010501 ac_lo=`expr $ac_mid + 1`
10502 if test $ac_lo -le $ac_mid; then
10503 ac_lo= ac_hi=
10504 break
10505 fi
10506 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010507fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010508
10509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010510 done
10511else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010512 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010513sed 's/^/| /' conftest.$ac_ext >&5
10514
Martin v. Löwiseba40652007-08-30 20:10:57 +000010515 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010516/* confdefs.h. */
10517_ACEOF
10518cat confdefs.h >>conftest.$ac_ext
10519cat >>conftest.$ac_ext <<_ACEOF
10520/* end confdefs.h. */
10521$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010522 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010523int
10524main ()
10525{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010526static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010527test_array [0] = 0
10528
10529 ;
10530 return 0;
10531}
10532_ACEOF
10533rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010534if { (ac_try="$ac_compile"
10535case "(($ac_try" in
10536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10537 *) ac_try_echo=$ac_try;;
10538esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010540 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010541 ac_status=$?
10542 grep -v '^ *+' conftest.er1 >conftest.err
10543 rm -f conftest.er1
10544 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010546 (exit $ac_status); } && {
10547 test -z "$ac_c_werror_flag" ||
10548 test ! -s conftest.err
10549 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010550 ac_hi=-1 ac_mid=-1
10551 while :; do
10552 cat >conftest.$ac_ext <<_ACEOF
10553/* confdefs.h. */
10554_ACEOF
10555cat confdefs.h >>conftest.$ac_ext
10556cat >>conftest.$ac_ext <<_ACEOF
10557/* end confdefs.h. */
10558$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010559 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010560int
10561main ()
10562{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010563static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010564test_array [0] = 0
10565
10566 ;
10567 return 0;
10568}
10569_ACEOF
10570rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010571if { (ac_try="$ac_compile"
10572case "(($ac_try" in
10573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10574 *) ac_try_echo=$ac_try;;
10575esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010577 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010578 ac_status=$?
10579 grep -v '^ *+' conftest.er1 >conftest.err
10580 rm -f conftest.er1
10581 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010583 (exit $ac_status); } && {
10584 test -z "$ac_c_werror_flag" ||
10585 test ! -s conftest.err
10586 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010587 ac_lo=$ac_mid; break
10588else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010589 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010590sed 's/^/| /' conftest.$ac_ext >&5
10591
Martin v. Löwiseba40652007-08-30 20:10:57 +000010592 ac_hi=`expr '(' $ac_mid ')' - 1`
10593 if test $ac_mid -le $ac_hi; then
10594 ac_lo= ac_hi=
10595 break
10596 fi
10597 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010598fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010599
10600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010601 done
10602else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010603 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010604sed 's/^/| /' conftest.$ac_ext >&5
10605
Martin v. Löwiseba40652007-08-30 20:10:57 +000010606 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010607fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010608
10609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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 +000010613# Binary search between lo and hi bounds.
10614while test "x$ac_lo" != "x$ac_hi"; do
10615 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10616 cat >conftest.$ac_ext <<_ACEOF
10617/* confdefs.h. */
10618_ACEOF
10619cat confdefs.h >>conftest.$ac_ext
10620cat >>conftest.$ac_ext <<_ACEOF
10621/* end confdefs.h. */
10622$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010623 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010624int
10625main ()
10626{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010627static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010628test_array [0] = 0
10629
10630 ;
10631 return 0;
10632}
10633_ACEOF
10634rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010635if { (ac_try="$ac_compile"
10636case "(($ac_try" in
10637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10638 *) ac_try_echo=$ac_try;;
10639esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010641 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010642 ac_status=$?
10643 grep -v '^ *+' conftest.er1 >conftest.err
10644 rm -f conftest.er1
10645 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010647 (exit $ac_status); } && {
10648 test -z "$ac_c_werror_flag" ||
10649 test ! -s conftest.err
10650 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010651 ac_hi=$ac_mid
10652else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010653 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010654sed 's/^/| /' conftest.$ac_ext >&5
10655
Martin v. Löwiseba40652007-08-30 20:10:57 +000010656 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010657fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010658
10659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010660done
10661case $ac_lo in
10662?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010663'') if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010664 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010665See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010666echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010667See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010668 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010669 else
10670 ac_cv_sizeof_size_t=0
10671 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010672esac
10673else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010674 cat >conftest.$ac_ext <<_ACEOF
10675/* confdefs.h. */
10676_ACEOF
10677cat confdefs.h >>conftest.$ac_ext
10678cat >>conftest.$ac_ext <<_ACEOF
10679/* end confdefs.h. */
10680$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010681 typedef size_t ac__type_sizeof_;
10682static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10683static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010684#include <stdio.h>
10685#include <stdlib.h>
10686int
10687main ()
10688{
10689
10690 FILE *f = fopen ("conftest.val", "w");
10691 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010692 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010693 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010694 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010695 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010696 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010697 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010698 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010699 }
10700 else
10701 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010702 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010703 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010704 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010705 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010706 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010707 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010708
10709 ;
10710 return 0;
10711}
10712_ACEOF
10713rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010714if { (ac_try="$ac_link"
10715case "(($ac_try" in
10716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10717 *) ac_try_echo=$ac_try;;
10718esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010720 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010721 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010723 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010724 { (case "(($ac_try" in
10725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10726 *) ac_try_echo=$ac_try;;
10727esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010729 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010730 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010732 (exit $ac_status); }; }; then
10733 ac_cv_sizeof_size_t=`cat conftest.val`
10734else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010735 echo "$as_me: program exited with status $ac_status" >&5
10736echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010737sed 's/^/| /' conftest.$ac_ext >&5
10738
10739( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010740if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010741 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010742See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010743echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010744See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010745 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010746 else
10747 ac_cv_sizeof_size_t=0
10748 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010749fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010750rm -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 +000010751fi
10752rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010753fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010754{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10755echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010756
10757
10758
Martin v. Löwis18e16552006-02-15 17:27:45 +000010759cat >>confdefs.h <<_ACEOF
10760#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10761_ACEOF
10762
10763
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010764{ echo "$as_me:$LINENO: checking for pid_t" >&5
10765echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10766if test "${ac_cv_type_pid_t+set}" = set; then
10767 echo $ECHO_N "(cached) $ECHO_C" >&6
10768else
10769 cat >conftest.$ac_ext <<_ACEOF
10770/* confdefs.h. */
10771_ACEOF
10772cat confdefs.h >>conftest.$ac_ext
10773cat >>conftest.$ac_ext <<_ACEOF
10774/* end confdefs.h. */
10775$ac_includes_default
10776typedef pid_t ac__type_new_;
10777int
10778main ()
10779{
10780if ((ac__type_new_ *) 0)
10781 return 0;
10782if (sizeof (ac__type_new_))
10783 return 0;
10784 ;
10785 return 0;
10786}
10787_ACEOF
10788rm -f conftest.$ac_objext
10789if { (ac_try="$ac_compile"
10790case "(($ac_try" in
10791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10792 *) ac_try_echo=$ac_try;;
10793esac
10794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10795 (eval "$ac_compile") 2>conftest.er1
10796 ac_status=$?
10797 grep -v '^ *+' conftest.er1 >conftest.err
10798 rm -f conftest.er1
10799 cat conftest.err >&5
10800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10801 (exit $ac_status); } && {
10802 test -z "$ac_c_werror_flag" ||
10803 test ! -s conftest.err
10804 } && test -s conftest.$ac_objext; then
10805 ac_cv_type_pid_t=yes
10806else
10807 echo "$as_me: failed program was:" >&5
10808sed 's/^/| /' conftest.$ac_ext >&5
10809
10810 ac_cv_type_pid_t=no
10811fi
10812
10813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10814fi
10815{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10816echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10817
Christian Heimes951cc0f2008-01-31 23:08:23 +000010818# The cast to long int works around a bug in the HP C Compiler
10819# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10820# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10821# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010822{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10823echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000010824if test "${ac_cv_sizeof_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010825 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +000010826else
10827 if test "$cross_compiling" = yes; then
10828 # Depending upon the size, compute the lo and hi bounds.
10829cat >conftest.$ac_ext <<_ACEOF
10830/* confdefs.h. */
10831_ACEOF
10832cat confdefs.h >>conftest.$ac_ext
10833cat >>conftest.$ac_ext <<_ACEOF
10834/* end confdefs.h. */
10835$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010836 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010837int
10838main ()
10839{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010840static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010841test_array [0] = 0
10842
10843 ;
10844 return 0;
10845}
10846_ACEOF
10847rm -f conftest.$ac_objext
10848if { (ac_try="$ac_compile"
10849case "(($ac_try" in
10850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10851 *) ac_try_echo=$ac_try;;
10852esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010854 (eval "$ac_compile") 2>conftest.er1
10855 ac_status=$?
10856 grep -v '^ *+' conftest.er1 >conftest.err
10857 rm -f conftest.er1
10858 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010860 (exit $ac_status); } && {
10861 test -z "$ac_c_werror_flag" ||
10862 test ! -s conftest.err
10863 } && test -s conftest.$ac_objext; then
10864 ac_lo=0 ac_mid=0
10865 while :; do
10866 cat >conftest.$ac_ext <<_ACEOF
10867/* confdefs.h. */
10868_ACEOF
10869cat confdefs.h >>conftest.$ac_ext
10870cat >>conftest.$ac_ext <<_ACEOF
10871/* end confdefs.h. */
10872$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010873 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010874int
10875main ()
10876{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010877static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010878test_array [0] = 0
10879
10880 ;
10881 return 0;
10882}
10883_ACEOF
10884rm -f conftest.$ac_objext
10885if { (ac_try="$ac_compile"
10886case "(($ac_try" in
10887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10888 *) ac_try_echo=$ac_try;;
10889esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010891 (eval "$ac_compile") 2>conftest.er1
10892 ac_status=$?
10893 grep -v '^ *+' conftest.er1 >conftest.err
10894 rm -f conftest.er1
10895 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010897 (exit $ac_status); } && {
10898 test -z "$ac_c_werror_flag" ||
10899 test ! -s conftest.err
10900 } && test -s conftest.$ac_objext; then
10901 ac_hi=$ac_mid; break
10902else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010903 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010904sed 's/^/| /' conftest.$ac_ext >&5
10905
10906 ac_lo=`expr $ac_mid + 1`
10907 if test $ac_lo -le $ac_mid; then
10908 ac_lo= ac_hi=
10909 break
10910 fi
10911 ac_mid=`expr 2 '*' $ac_mid + 1`
10912fi
10913
10914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10915 done
10916else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010917 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010918sed 's/^/| /' conftest.$ac_ext >&5
10919
10920 cat >conftest.$ac_ext <<_ACEOF
10921/* confdefs.h. */
10922_ACEOF
10923cat confdefs.h >>conftest.$ac_ext
10924cat >>conftest.$ac_ext <<_ACEOF
10925/* end confdefs.h. */
10926$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010927 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010928int
10929main ()
10930{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010931static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010932test_array [0] = 0
10933
10934 ;
10935 return 0;
10936}
10937_ACEOF
10938rm -f conftest.$ac_objext
10939if { (ac_try="$ac_compile"
10940case "(($ac_try" in
10941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10942 *) ac_try_echo=$ac_try;;
10943esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010945 (eval "$ac_compile") 2>conftest.er1
10946 ac_status=$?
10947 grep -v '^ *+' conftest.er1 >conftest.err
10948 rm -f conftest.er1
10949 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010951 (exit $ac_status); } && {
10952 test -z "$ac_c_werror_flag" ||
10953 test ! -s conftest.err
10954 } && test -s conftest.$ac_objext; then
10955 ac_hi=-1 ac_mid=-1
10956 while :; do
10957 cat >conftest.$ac_ext <<_ACEOF
10958/* confdefs.h. */
10959_ACEOF
10960cat confdefs.h >>conftest.$ac_ext
10961cat >>conftest.$ac_ext <<_ACEOF
10962/* end confdefs.h. */
10963$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010964 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010965int
10966main ()
10967{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010968static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010969test_array [0] = 0
10970
10971 ;
10972 return 0;
10973}
10974_ACEOF
10975rm -f conftest.$ac_objext
10976if { (ac_try="$ac_compile"
10977case "(($ac_try" in
10978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10979 *) ac_try_echo=$ac_try;;
10980esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010982 (eval "$ac_compile") 2>conftest.er1
10983 ac_status=$?
10984 grep -v '^ *+' conftest.er1 >conftest.err
10985 rm -f conftest.er1
10986 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010988 (exit $ac_status); } && {
10989 test -z "$ac_c_werror_flag" ||
10990 test ! -s conftest.err
10991 } && test -s conftest.$ac_objext; then
10992 ac_lo=$ac_mid; break
10993else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010994 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010995sed 's/^/| /' conftest.$ac_ext >&5
10996
10997 ac_hi=`expr '(' $ac_mid ')' - 1`
10998 if test $ac_mid -le $ac_hi; then
10999 ac_lo= ac_hi=
11000 break
11001 fi
11002 ac_mid=`expr 2 '*' $ac_mid`
11003fi
11004
11005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11006 done
11007else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011008 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011009sed 's/^/| /' conftest.$ac_ext >&5
11010
11011 ac_lo= ac_hi=
11012fi
11013
11014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11015fi
11016
11017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11018# Binary search between lo and hi bounds.
11019while test "x$ac_lo" != "x$ac_hi"; do
11020 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11021 cat >conftest.$ac_ext <<_ACEOF
11022/* confdefs.h. */
11023_ACEOF
11024cat confdefs.h >>conftest.$ac_ext
11025cat >>conftest.$ac_ext <<_ACEOF
11026/* end confdefs.h. */
11027$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011028 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011029int
11030main ()
11031{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011032static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011033test_array [0] = 0
11034
11035 ;
11036 return 0;
11037}
11038_ACEOF
11039rm -f conftest.$ac_objext
11040if { (ac_try="$ac_compile"
11041case "(($ac_try" in
11042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11043 *) ac_try_echo=$ac_try;;
11044esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011046 (eval "$ac_compile") 2>conftest.er1
11047 ac_status=$?
11048 grep -v '^ *+' conftest.er1 >conftest.err
11049 rm -f conftest.er1
11050 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011052 (exit $ac_status); } && {
11053 test -z "$ac_c_werror_flag" ||
11054 test ! -s conftest.err
11055 } && test -s conftest.$ac_objext; then
11056 ac_hi=$ac_mid
11057else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011058 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011059sed 's/^/| /' conftest.$ac_ext >&5
11060
11061 ac_lo=`expr '(' $ac_mid ')' + 1`
11062fi
11063
11064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11065done
11066case $ac_lo in
11067?*) ac_cv_sizeof_pid_t=$ac_lo;;
11068'') if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011069 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011070See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011071echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011072See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011073 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011074 else
11075 ac_cv_sizeof_pid_t=0
11076 fi ;;
11077esac
11078else
11079 cat >conftest.$ac_ext <<_ACEOF
11080/* confdefs.h. */
11081_ACEOF
11082cat confdefs.h >>conftest.$ac_ext
11083cat >>conftest.$ac_ext <<_ACEOF
11084/* end confdefs.h. */
11085$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011086 typedef pid_t ac__type_sizeof_;
11087static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11088static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011089#include <stdio.h>
11090#include <stdlib.h>
11091int
11092main ()
11093{
11094
11095 FILE *f = fopen ("conftest.val", "w");
11096 if (! f)
11097 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011098 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011099 {
11100 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011101 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011102 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011103 fprintf (f, "%ld\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011104 }
11105 else
11106 {
11107 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011108 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011109 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011110 fprintf (f, "%lu\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011111 }
11112 return ferror (f) || fclose (f) != 0;
11113
11114 ;
11115 return 0;
11116}
11117_ACEOF
11118rm -f conftest$ac_exeext
11119if { (ac_try="$ac_link"
11120case "(($ac_try" in
11121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11122 *) ac_try_echo=$ac_try;;
11123esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011125 (eval "$ac_link") 2>&5
11126 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011128 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11129 { (case "(($ac_try" in
11130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11131 *) ac_try_echo=$ac_try;;
11132esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011134 (eval "$ac_try") 2>&5
11135 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011137 (exit $ac_status); }; }; then
11138 ac_cv_sizeof_pid_t=`cat conftest.val`
11139else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011140 echo "$as_me: program exited with status $ac_status" >&5
11141echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011142sed 's/^/| /' conftest.$ac_ext >&5
11143
11144( exit $ac_status )
11145if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011146 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011147See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011148echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011149See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011150 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011151 else
11152 ac_cv_sizeof_pid_t=0
11153 fi
11154fi
11155rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11156fi
11157rm -f conftest.val
11158fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011159{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11160echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011161
11162
11163
11164cat >>confdefs.h <<_ACEOF
11165#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11166_ACEOF
11167
11168
Michael W. Hudson54241132001-12-07 15:38:26 +000011169
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011170{ echo "$as_me:$LINENO: checking for long long support" >&5
11171echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011172have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011173cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011174/* confdefs.h. */
11175_ACEOF
11176cat confdefs.h >>conftest.$ac_ext
11177cat >>conftest.$ac_ext <<_ACEOF
11178/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011179
Martin v. Löwis11437992002-04-12 09:54:03 +000011180int
11181main ()
11182{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011183long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011184 ;
11185 return 0;
11186}
11187_ACEOF
11188rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011189if { (ac_try="$ac_compile"
11190case "(($ac_try" in
11191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11192 *) ac_try_echo=$ac_try;;
11193esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011195 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011196 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011197 grep -v '^ *+' conftest.er1 >conftest.err
11198 rm -f conftest.er1
11199 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011201 (exit $ac_status); } && {
11202 test -z "$ac_c_werror_flag" ||
11203 test ! -s conftest.err
11204 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011205
11206
11207cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011208#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011209_ACEOF
11210
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011211 have_long_long=yes
11212
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011213else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011214 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011215sed 's/^/| /' conftest.$ac_ext >&5
11216
Martin v. Löwiseba40652007-08-30 20:10:57 +000011217
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011218fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011219
11220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011221{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11222echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011223if test "$have_long_long" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011224{ echo "$as_me:$LINENO: checking for long long" >&5
11225echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11226if test "${ac_cv_type_long_long+set}" = set; then
11227 echo $ECHO_N "(cached) $ECHO_C" >&6
11228else
11229 cat >conftest.$ac_ext <<_ACEOF
11230/* confdefs.h. */
11231_ACEOF
11232cat confdefs.h >>conftest.$ac_ext
11233cat >>conftest.$ac_ext <<_ACEOF
11234/* end confdefs.h. */
11235$ac_includes_default
11236typedef long long ac__type_new_;
11237int
11238main ()
11239{
11240if ((ac__type_new_ *) 0)
11241 return 0;
11242if (sizeof (ac__type_new_))
11243 return 0;
11244 ;
11245 return 0;
11246}
11247_ACEOF
11248rm -f conftest.$ac_objext
11249if { (ac_try="$ac_compile"
11250case "(($ac_try" in
11251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11252 *) ac_try_echo=$ac_try;;
11253esac
11254eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11255 (eval "$ac_compile") 2>conftest.er1
11256 ac_status=$?
11257 grep -v '^ *+' conftest.er1 >conftest.err
11258 rm -f conftest.er1
11259 cat conftest.err >&5
11260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11261 (exit $ac_status); } && {
11262 test -z "$ac_c_werror_flag" ||
11263 test ! -s conftest.err
11264 } && test -s conftest.$ac_objext; then
11265 ac_cv_type_long_long=yes
11266else
11267 echo "$as_me: failed program was:" >&5
11268sed 's/^/| /' conftest.$ac_ext >&5
11269
11270 ac_cv_type_long_long=no
11271fi
11272
11273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11274fi
11275{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11276echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11277
Martin v. Löwiseba40652007-08-30 20:10:57 +000011278# The cast to long int works around a bug in the HP C Compiler
11279# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11280# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11281# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011282{ echo "$as_me:$LINENO: checking size of long long" >&5
11283echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011284if test "${ac_cv_sizeof_long_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011285 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011286else
Martin v. Löwis11437992002-04-12 09:54:03 +000011287 if test "$cross_compiling" = yes; then
11288 # Depending upon the size, compute the lo and hi bounds.
11289cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011290/* confdefs.h. */
11291_ACEOF
11292cat confdefs.h >>conftest.$ac_ext
11293cat >>conftest.$ac_ext <<_ACEOF
11294/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011295$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011296 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011297int
11298main ()
11299{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011300static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011301test_array [0] = 0
11302
11303 ;
11304 return 0;
11305}
11306_ACEOF
11307rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011308if { (ac_try="$ac_compile"
11309case "(($ac_try" in
11310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11311 *) ac_try_echo=$ac_try;;
11312esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011314 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011315 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011316 grep -v '^ *+' conftest.er1 >conftest.err
11317 rm -f conftest.er1
11318 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011320 (exit $ac_status); } && {
11321 test -z "$ac_c_werror_flag" ||
11322 test ! -s conftest.err
11323 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011324 ac_lo=0 ac_mid=0
11325 while :; do
11326 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011327/* confdefs.h. */
11328_ACEOF
11329cat confdefs.h >>conftest.$ac_ext
11330cat >>conftest.$ac_ext <<_ACEOF
11331/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011332$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011333 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011334int
11335main ()
11336{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011337static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011338test_array [0] = 0
11339
11340 ;
11341 return 0;
11342}
11343_ACEOF
11344rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011345if { (ac_try="$ac_compile"
11346case "(($ac_try" in
11347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11348 *) ac_try_echo=$ac_try;;
11349esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011351 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011352 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011353 grep -v '^ *+' conftest.er1 >conftest.err
11354 rm -f conftest.er1
11355 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011357 (exit $ac_status); } && {
11358 test -z "$ac_c_werror_flag" ||
11359 test ! -s conftest.err
11360 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011361 ac_hi=$ac_mid; break
11362else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011363 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011364sed 's/^/| /' conftest.$ac_ext >&5
11365
Martin v. Löwiseba40652007-08-30 20:10:57 +000011366 ac_lo=`expr $ac_mid + 1`
11367 if test $ac_lo -le $ac_mid; then
11368 ac_lo= ac_hi=
11369 break
11370 fi
11371 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011372fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011373
11374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011375 done
11376else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011377 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011378sed 's/^/| /' conftest.$ac_ext >&5
11379
Martin v. Löwiseba40652007-08-30 20:10:57 +000011380 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011381/* confdefs.h. */
11382_ACEOF
11383cat confdefs.h >>conftest.$ac_ext
11384cat >>conftest.$ac_ext <<_ACEOF
11385/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011386$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011387 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011388int
11389main ()
11390{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011391static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011392test_array [0] = 0
11393
11394 ;
11395 return 0;
11396}
11397_ACEOF
11398rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011399if { (ac_try="$ac_compile"
11400case "(($ac_try" in
11401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11402 *) ac_try_echo=$ac_try;;
11403esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011405 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011406 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011407 grep -v '^ *+' conftest.er1 >conftest.err
11408 rm -f conftest.er1
11409 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011411 (exit $ac_status); } && {
11412 test -z "$ac_c_werror_flag" ||
11413 test ! -s conftest.err
11414 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011415 ac_hi=-1 ac_mid=-1
11416 while :; do
11417 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011418/* confdefs.h. */
11419_ACEOF
11420cat confdefs.h >>conftest.$ac_ext
11421cat >>conftest.$ac_ext <<_ACEOF
11422/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011423$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011424 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011425int
11426main ()
11427{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011428static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011429test_array [0] = 0
11430
11431 ;
11432 return 0;
11433}
11434_ACEOF
11435rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011436if { (ac_try="$ac_compile"
11437case "(($ac_try" in
11438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11439 *) ac_try_echo=$ac_try;;
11440esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011442 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011443 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011444 grep -v '^ *+' conftest.er1 >conftest.err
11445 rm -f conftest.er1
11446 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011448 (exit $ac_status); } && {
11449 test -z "$ac_c_werror_flag" ||
11450 test ! -s conftest.err
11451 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011452 ac_lo=$ac_mid; break
11453else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011454 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011455sed 's/^/| /' conftest.$ac_ext >&5
11456
Martin v. Löwiseba40652007-08-30 20:10:57 +000011457 ac_hi=`expr '(' $ac_mid ')' - 1`
11458 if test $ac_mid -le $ac_hi; then
11459 ac_lo= ac_hi=
11460 break
11461 fi
11462 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011463fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011464
11465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011466 done
11467else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011468 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011469sed 's/^/| /' conftest.$ac_ext >&5
11470
Martin v. Löwiseba40652007-08-30 20:10:57 +000011471 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011472fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011473
11474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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 +000011478# Binary search between lo and hi bounds.
11479while test "x$ac_lo" != "x$ac_hi"; do
11480 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11481 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011482/* confdefs.h. */
11483_ACEOF
11484cat confdefs.h >>conftest.$ac_ext
11485cat >>conftest.$ac_ext <<_ACEOF
11486/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011487$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011488 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011489int
11490main ()
11491{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011492static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011493test_array [0] = 0
11494
11495 ;
11496 return 0;
11497}
11498_ACEOF
11499rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011500if { (ac_try="$ac_compile"
11501case "(($ac_try" in
11502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11503 *) ac_try_echo=$ac_try;;
11504esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011505eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011506 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011507 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011508 grep -v '^ *+' conftest.er1 >conftest.err
11509 rm -f conftest.er1
11510 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011512 (exit $ac_status); } && {
11513 test -z "$ac_c_werror_flag" ||
11514 test ! -s conftest.err
11515 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011516 ac_hi=$ac_mid
11517else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011518 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011519sed 's/^/| /' conftest.$ac_ext >&5
11520
Martin v. Löwiseba40652007-08-30 20:10:57 +000011521 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011522fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011523
11524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011525done
11526case $ac_lo in
11527?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011528'') if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011529 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011530See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011531echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011532See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011533 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011534 else
11535 ac_cv_sizeof_long_long=0
11536 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011537esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011538else
Martin v. Löwis11437992002-04-12 09:54:03 +000011539 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011540/* confdefs.h. */
11541_ACEOF
11542cat confdefs.h >>conftest.$ac_ext
11543cat >>conftest.$ac_ext <<_ACEOF
11544/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011545$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011546 typedef long long ac__type_sizeof_;
11547static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11548static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011549#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011550#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011551int
11552main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011553{
Martin v. Löwis11437992002-04-12 09:54:03 +000011554
11555 FILE *f = fopen ("conftest.val", "w");
11556 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011557 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011558 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011559 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011560 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011561 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011562 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011563 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011564 }
11565 else
11566 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011567 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011568 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011569 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011570 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011571 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011572 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011573
11574 ;
11575 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011576}
Martin v. Löwis11437992002-04-12 09:54:03 +000011577_ACEOF
11578rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011579if { (ac_try="$ac_link"
11580case "(($ac_try" in
11581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11582 *) ac_try_echo=$ac_try;;
11583esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011585 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011586 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011588 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011589 { (case "(($ac_try" in
11590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11591 *) ac_try_echo=$ac_try;;
11592esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011593eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011594 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011595 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011597 (exit $ac_status); }; }; then
11598 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011599else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011600 echo "$as_me: program exited with status $ac_status" >&5
11601echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011602sed 's/^/| /' conftest.$ac_ext >&5
11603
Martin v. Löwis11437992002-04-12 09:54:03 +000011604( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011605if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011606 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011607See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011608echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011609See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011610 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011611 else
11612 ac_cv_sizeof_long_long=0
11613 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011614fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011615rm -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 +000011616fi
11617rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011618fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011619{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11620echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011621
11622
11623
Martin v. Löwis11437992002-04-12 09:54:03 +000011624cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011625#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011626_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011627
Michael W. Hudson54241132001-12-07 15:38:26 +000011628
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011629fi
11630
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011631{ echo "$as_me:$LINENO: checking for long double support" >&5
11632echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011633have_long_double=no
11634cat >conftest.$ac_ext <<_ACEOF
11635/* confdefs.h. */
11636_ACEOF
11637cat confdefs.h >>conftest.$ac_ext
11638cat >>conftest.$ac_ext <<_ACEOF
11639/* end confdefs.h. */
11640
11641int
11642main ()
11643{
11644long double x; x = (long double)0.;
11645 ;
11646 return 0;
11647}
11648_ACEOF
11649rm -f conftest.$ac_objext
11650if { (ac_try="$ac_compile"
11651case "(($ac_try" in
11652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11653 *) ac_try_echo=$ac_try;;
11654esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011656 (eval "$ac_compile") 2>conftest.er1
11657 ac_status=$?
11658 grep -v '^ *+' conftest.er1 >conftest.err
11659 rm -f conftest.er1
11660 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011662 (exit $ac_status); } && {
11663 test -z "$ac_c_werror_flag" ||
11664 test ! -s conftest.err
11665 } && test -s conftest.$ac_objext; then
11666
11667
11668cat >>confdefs.h <<\_ACEOF
11669#define HAVE_LONG_DOUBLE 1
11670_ACEOF
11671
11672 have_long_double=yes
11673
11674else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011675 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011676sed 's/^/| /' conftest.$ac_ext >&5
11677
11678
11679fi
11680
11681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011682{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11683echo "${ECHO_T}$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011684if test "$have_long_double" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011685{ echo "$as_me:$LINENO: checking for long double" >&5
11686echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11687if test "${ac_cv_type_long_double+set}" = set; then
11688 echo $ECHO_N "(cached) $ECHO_C" >&6
11689else
11690 cat >conftest.$ac_ext <<_ACEOF
11691/* confdefs.h. */
11692_ACEOF
11693cat confdefs.h >>conftest.$ac_ext
11694cat >>conftest.$ac_ext <<_ACEOF
11695/* end confdefs.h. */
11696$ac_includes_default
11697typedef long double ac__type_new_;
11698int
11699main ()
11700{
11701if ((ac__type_new_ *) 0)
11702 return 0;
11703if (sizeof (ac__type_new_))
11704 return 0;
11705 ;
11706 return 0;
11707}
11708_ACEOF
11709rm -f conftest.$ac_objext
11710if { (ac_try="$ac_compile"
11711case "(($ac_try" in
11712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11713 *) ac_try_echo=$ac_try;;
11714esac
11715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11716 (eval "$ac_compile") 2>conftest.er1
11717 ac_status=$?
11718 grep -v '^ *+' conftest.er1 >conftest.err
11719 rm -f conftest.er1
11720 cat conftest.err >&5
11721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11722 (exit $ac_status); } && {
11723 test -z "$ac_c_werror_flag" ||
11724 test ! -s conftest.err
11725 } && test -s conftest.$ac_objext; then
11726 ac_cv_type_long_double=yes
11727else
11728 echo "$as_me: failed program was:" >&5
11729sed 's/^/| /' conftest.$ac_ext >&5
11730
11731 ac_cv_type_long_double=no
11732fi
11733
11734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11735fi
11736{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11737echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11738
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011739# The cast to long int works around a bug in the HP C Compiler
11740# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11741# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11742# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011743{ echo "$as_me:$LINENO: checking size of long double" >&5
11744echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011745if test "${ac_cv_sizeof_long_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011746 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011747else
11748 if test "$cross_compiling" = yes; then
11749 # Depending upon the size, compute the lo and hi bounds.
11750cat >conftest.$ac_ext <<_ACEOF
11751/* confdefs.h. */
11752_ACEOF
11753cat confdefs.h >>conftest.$ac_ext
11754cat >>conftest.$ac_ext <<_ACEOF
11755/* end confdefs.h. */
11756$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011757 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011758int
11759main ()
11760{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011761static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011762test_array [0] = 0
11763
11764 ;
11765 return 0;
11766}
11767_ACEOF
11768rm -f conftest.$ac_objext
11769if { (ac_try="$ac_compile"
11770case "(($ac_try" in
11771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11772 *) ac_try_echo=$ac_try;;
11773esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011775 (eval "$ac_compile") 2>conftest.er1
11776 ac_status=$?
11777 grep -v '^ *+' conftest.er1 >conftest.err
11778 rm -f conftest.er1
11779 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011781 (exit $ac_status); } && {
11782 test -z "$ac_c_werror_flag" ||
11783 test ! -s conftest.err
11784 } && test -s conftest.$ac_objext; then
11785 ac_lo=0 ac_mid=0
11786 while :; do
11787 cat >conftest.$ac_ext <<_ACEOF
11788/* confdefs.h. */
11789_ACEOF
11790cat confdefs.h >>conftest.$ac_ext
11791cat >>conftest.$ac_ext <<_ACEOF
11792/* end confdefs.h. */
11793$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011794 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011795int
11796main ()
11797{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011798static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011799test_array [0] = 0
11800
11801 ;
11802 return 0;
11803}
11804_ACEOF
11805rm -f conftest.$ac_objext
11806if { (ac_try="$ac_compile"
11807case "(($ac_try" in
11808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11809 *) ac_try_echo=$ac_try;;
11810esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011812 (eval "$ac_compile") 2>conftest.er1
11813 ac_status=$?
11814 grep -v '^ *+' conftest.er1 >conftest.err
11815 rm -f conftest.er1
11816 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011818 (exit $ac_status); } && {
11819 test -z "$ac_c_werror_flag" ||
11820 test ! -s conftest.err
11821 } && test -s conftest.$ac_objext; then
11822 ac_hi=$ac_mid; break
11823else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011824 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011825sed 's/^/| /' conftest.$ac_ext >&5
11826
11827 ac_lo=`expr $ac_mid + 1`
11828 if test $ac_lo -le $ac_mid; then
11829 ac_lo= ac_hi=
11830 break
11831 fi
11832 ac_mid=`expr 2 '*' $ac_mid + 1`
11833fi
11834
11835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11836 done
11837else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011838 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011839sed 's/^/| /' conftest.$ac_ext >&5
11840
11841 cat >conftest.$ac_ext <<_ACEOF
11842/* confdefs.h. */
11843_ACEOF
11844cat confdefs.h >>conftest.$ac_ext
11845cat >>conftest.$ac_ext <<_ACEOF
11846/* end confdefs.h. */
11847$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011848 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011849int
11850main ()
11851{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011852static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011853test_array [0] = 0
11854
11855 ;
11856 return 0;
11857}
11858_ACEOF
11859rm -f conftest.$ac_objext
11860if { (ac_try="$ac_compile"
11861case "(($ac_try" in
11862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11863 *) ac_try_echo=$ac_try;;
11864esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011866 (eval "$ac_compile") 2>conftest.er1
11867 ac_status=$?
11868 grep -v '^ *+' conftest.er1 >conftest.err
11869 rm -f conftest.er1
11870 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011872 (exit $ac_status); } && {
11873 test -z "$ac_c_werror_flag" ||
11874 test ! -s conftest.err
11875 } && test -s conftest.$ac_objext; then
11876 ac_hi=-1 ac_mid=-1
11877 while :; do
11878 cat >conftest.$ac_ext <<_ACEOF
11879/* confdefs.h. */
11880_ACEOF
11881cat confdefs.h >>conftest.$ac_ext
11882cat >>conftest.$ac_ext <<_ACEOF
11883/* end confdefs.h. */
11884$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011885 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011886int
11887main ()
11888{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011889static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011890test_array [0] = 0
11891
11892 ;
11893 return 0;
11894}
11895_ACEOF
11896rm -f conftest.$ac_objext
11897if { (ac_try="$ac_compile"
11898case "(($ac_try" in
11899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11900 *) ac_try_echo=$ac_try;;
11901esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011903 (eval "$ac_compile") 2>conftest.er1
11904 ac_status=$?
11905 grep -v '^ *+' conftest.er1 >conftest.err
11906 rm -f conftest.er1
11907 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011909 (exit $ac_status); } && {
11910 test -z "$ac_c_werror_flag" ||
11911 test ! -s conftest.err
11912 } && test -s conftest.$ac_objext; then
11913 ac_lo=$ac_mid; break
11914else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011915 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011916sed 's/^/| /' conftest.$ac_ext >&5
11917
11918 ac_hi=`expr '(' $ac_mid ')' - 1`
11919 if test $ac_mid -le $ac_hi; then
11920 ac_lo= ac_hi=
11921 break
11922 fi
11923 ac_mid=`expr 2 '*' $ac_mid`
11924fi
11925
11926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11927 done
11928else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011929 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011930sed 's/^/| /' conftest.$ac_ext >&5
11931
11932 ac_lo= ac_hi=
11933fi
11934
11935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11936fi
11937
11938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11939# Binary search between lo and hi bounds.
11940while test "x$ac_lo" != "x$ac_hi"; do
11941 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11942 cat >conftest.$ac_ext <<_ACEOF
11943/* confdefs.h. */
11944_ACEOF
11945cat confdefs.h >>conftest.$ac_ext
11946cat >>conftest.$ac_ext <<_ACEOF
11947/* end confdefs.h. */
11948$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011949 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011950int
11951main ()
11952{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011953static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011954test_array [0] = 0
11955
11956 ;
11957 return 0;
11958}
11959_ACEOF
11960rm -f conftest.$ac_objext
11961if { (ac_try="$ac_compile"
11962case "(($ac_try" in
11963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11964 *) ac_try_echo=$ac_try;;
11965esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011967 (eval "$ac_compile") 2>conftest.er1
11968 ac_status=$?
11969 grep -v '^ *+' conftest.er1 >conftest.err
11970 rm -f conftest.er1
11971 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011973 (exit $ac_status); } && {
11974 test -z "$ac_c_werror_flag" ||
11975 test ! -s conftest.err
11976 } && test -s conftest.$ac_objext; then
11977 ac_hi=$ac_mid
11978else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011979 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011980sed 's/^/| /' conftest.$ac_ext >&5
11981
11982 ac_lo=`expr '(' $ac_mid ')' + 1`
11983fi
11984
11985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11986done
11987case $ac_lo in
11988?*) ac_cv_sizeof_long_double=$ac_lo;;
11989'') if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011990 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011991See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011992echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011993See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011994 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011995 else
11996 ac_cv_sizeof_long_double=0
11997 fi ;;
11998esac
11999else
12000 cat >conftest.$ac_ext <<_ACEOF
12001/* confdefs.h. */
12002_ACEOF
12003cat confdefs.h >>conftest.$ac_ext
12004cat >>conftest.$ac_ext <<_ACEOF
12005/* end confdefs.h. */
12006$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012007 typedef long double ac__type_sizeof_;
12008static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12009static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012010#include <stdio.h>
12011#include <stdlib.h>
12012int
12013main ()
12014{
12015
12016 FILE *f = fopen ("conftest.val", "w");
12017 if (! f)
12018 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012019 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012020 {
12021 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012022 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012023 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012024 fprintf (f, "%ld\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012025 }
12026 else
12027 {
12028 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012029 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012030 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012031 fprintf (f, "%lu\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012032 }
12033 return ferror (f) || fclose (f) != 0;
12034
12035 ;
12036 return 0;
12037}
12038_ACEOF
12039rm -f conftest$ac_exeext
12040if { (ac_try="$ac_link"
12041case "(($ac_try" in
12042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12043 *) ac_try_echo=$ac_try;;
12044esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012046 (eval "$ac_link") 2>&5
12047 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012049 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12050 { (case "(($ac_try" in
12051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12052 *) ac_try_echo=$ac_try;;
12053esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012055 (eval "$ac_try") 2>&5
12056 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012058 (exit $ac_status); }; }; then
12059 ac_cv_sizeof_long_double=`cat conftest.val`
12060else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012061 echo "$as_me: program exited with status $ac_status" >&5
12062echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012063sed 's/^/| /' conftest.$ac_ext >&5
12064
12065( exit $ac_status )
12066if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012067 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012068See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012069echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012070See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012071 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012072 else
12073 ac_cv_sizeof_long_double=0
12074 fi
12075fi
12076rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12077fi
12078rm -f conftest.val
12079fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012080{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12081echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012082
12083
12084
12085cat >>confdefs.h <<_ACEOF
12086#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12087_ACEOF
12088
12089
12090fi
12091
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012092{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12093echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012094have_c99_bool=no
12095cat >conftest.$ac_ext <<_ACEOF
12096/* confdefs.h. */
12097_ACEOF
12098cat confdefs.h >>conftest.$ac_ext
12099cat >>conftest.$ac_ext <<_ACEOF
12100/* end confdefs.h. */
12101
12102int
12103main ()
12104{
12105_Bool x; x = (_Bool)0;
12106 ;
12107 return 0;
12108}
12109_ACEOF
12110rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012111if { (ac_try="$ac_compile"
12112case "(($ac_try" in
12113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12114 *) ac_try_echo=$ac_try;;
12115esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012117 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012118 ac_status=$?
12119 grep -v '^ *+' conftest.er1 >conftest.err
12120 rm -f conftest.er1
12121 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012123 (exit $ac_status); } && {
12124 test -z "$ac_c_werror_flag" ||
12125 test ! -s conftest.err
12126 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012127
12128
12129cat >>confdefs.h <<\_ACEOF
12130#define HAVE_C99_BOOL 1
12131_ACEOF
12132
12133 have_c99_bool=yes
12134
12135else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012136 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012137sed 's/^/| /' conftest.$ac_ext >&5
12138
Martin v. Löwiseba40652007-08-30 20:10:57 +000012139
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012140fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012141
12142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012143{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12144echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012145if test "$have_c99_bool" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012146{ echo "$as_me:$LINENO: checking for _Bool" >&5
12147echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12148if test "${ac_cv_type__Bool+set}" = set; then
12149 echo $ECHO_N "(cached) $ECHO_C" >&6
12150else
12151 cat >conftest.$ac_ext <<_ACEOF
12152/* confdefs.h. */
12153_ACEOF
12154cat confdefs.h >>conftest.$ac_ext
12155cat >>conftest.$ac_ext <<_ACEOF
12156/* end confdefs.h. */
12157$ac_includes_default
12158typedef _Bool ac__type_new_;
12159int
12160main ()
12161{
12162if ((ac__type_new_ *) 0)
12163 return 0;
12164if (sizeof (ac__type_new_))
12165 return 0;
12166 ;
12167 return 0;
12168}
12169_ACEOF
12170rm -f conftest.$ac_objext
12171if { (ac_try="$ac_compile"
12172case "(($ac_try" in
12173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12174 *) ac_try_echo=$ac_try;;
12175esac
12176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12177 (eval "$ac_compile") 2>conftest.er1
12178 ac_status=$?
12179 grep -v '^ *+' conftest.er1 >conftest.err
12180 rm -f conftest.er1
12181 cat conftest.err >&5
12182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12183 (exit $ac_status); } && {
12184 test -z "$ac_c_werror_flag" ||
12185 test ! -s conftest.err
12186 } && test -s conftest.$ac_objext; then
12187 ac_cv_type__Bool=yes
12188else
12189 echo "$as_me: failed program was:" >&5
12190sed 's/^/| /' conftest.$ac_ext >&5
12191
12192 ac_cv_type__Bool=no
12193fi
12194
12195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12196fi
12197{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12198echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12199
Martin v. Löwiseba40652007-08-30 20:10:57 +000012200# The cast to long int works around a bug in the HP C Compiler
12201# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12202# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12203# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012204{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12205echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012206if test "${ac_cv_sizeof__Bool+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012207 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012208else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012209 if test "$cross_compiling" = yes; then
12210 # Depending upon the size, compute the lo and hi bounds.
12211cat >conftest.$ac_ext <<_ACEOF
12212/* confdefs.h. */
12213_ACEOF
12214cat confdefs.h >>conftest.$ac_ext
12215cat >>conftest.$ac_ext <<_ACEOF
12216/* end confdefs.h. */
12217$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012218 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012219int
12220main ()
12221{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012222static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012223test_array [0] = 0
12224
12225 ;
12226 return 0;
12227}
12228_ACEOF
12229rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012230if { (ac_try="$ac_compile"
12231case "(($ac_try" in
12232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12233 *) ac_try_echo=$ac_try;;
12234esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012236 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012237 ac_status=$?
12238 grep -v '^ *+' conftest.er1 >conftest.err
12239 rm -f conftest.er1
12240 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012242 (exit $ac_status); } && {
12243 test -z "$ac_c_werror_flag" ||
12244 test ! -s conftest.err
12245 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012246 ac_lo=0 ac_mid=0
12247 while :; do
12248 cat >conftest.$ac_ext <<_ACEOF
12249/* confdefs.h. */
12250_ACEOF
12251cat confdefs.h >>conftest.$ac_ext
12252cat >>conftest.$ac_ext <<_ACEOF
12253/* end confdefs.h. */
12254$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012255 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012256int
12257main ()
12258{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012259static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012260test_array [0] = 0
12261
12262 ;
12263 return 0;
12264}
12265_ACEOF
12266rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012267if { (ac_try="$ac_compile"
12268case "(($ac_try" in
12269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12270 *) ac_try_echo=$ac_try;;
12271esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012273 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012274 ac_status=$?
12275 grep -v '^ *+' conftest.er1 >conftest.err
12276 rm -f conftest.er1
12277 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012279 (exit $ac_status); } && {
12280 test -z "$ac_c_werror_flag" ||
12281 test ! -s conftest.err
12282 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012283 ac_hi=$ac_mid; break
12284else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012285 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012286sed 's/^/| /' conftest.$ac_ext >&5
12287
Martin v. Löwiseba40652007-08-30 20:10:57 +000012288 ac_lo=`expr $ac_mid + 1`
12289 if test $ac_lo -le $ac_mid; then
12290 ac_lo= ac_hi=
12291 break
12292 fi
12293 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012294fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012295
12296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012297 done
12298else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012299 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012300sed 's/^/| /' conftest.$ac_ext >&5
12301
Martin v. Löwiseba40652007-08-30 20:10:57 +000012302 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012303/* confdefs.h. */
12304_ACEOF
12305cat confdefs.h >>conftest.$ac_ext
12306cat >>conftest.$ac_ext <<_ACEOF
12307/* end confdefs.h. */
12308$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012309 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012310int
12311main ()
12312{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012313static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012314test_array [0] = 0
12315
12316 ;
12317 return 0;
12318}
12319_ACEOF
12320rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012321if { (ac_try="$ac_compile"
12322case "(($ac_try" in
12323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12324 *) ac_try_echo=$ac_try;;
12325esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012327 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012328 ac_status=$?
12329 grep -v '^ *+' conftest.er1 >conftest.err
12330 rm -f conftest.er1
12331 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012333 (exit $ac_status); } && {
12334 test -z "$ac_c_werror_flag" ||
12335 test ! -s conftest.err
12336 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012337 ac_hi=-1 ac_mid=-1
12338 while :; do
12339 cat >conftest.$ac_ext <<_ACEOF
12340/* confdefs.h. */
12341_ACEOF
12342cat confdefs.h >>conftest.$ac_ext
12343cat >>conftest.$ac_ext <<_ACEOF
12344/* end confdefs.h. */
12345$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012346 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012347int
12348main ()
12349{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012350static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012351test_array [0] = 0
12352
12353 ;
12354 return 0;
12355}
12356_ACEOF
12357rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012358if { (ac_try="$ac_compile"
12359case "(($ac_try" in
12360 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12361 *) ac_try_echo=$ac_try;;
12362esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012363eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012364 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012365 ac_status=$?
12366 grep -v '^ *+' conftest.er1 >conftest.err
12367 rm -f conftest.er1
12368 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012370 (exit $ac_status); } && {
12371 test -z "$ac_c_werror_flag" ||
12372 test ! -s conftest.err
12373 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012374 ac_lo=$ac_mid; break
12375else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012376 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012377sed 's/^/| /' conftest.$ac_ext >&5
12378
Martin v. Löwiseba40652007-08-30 20:10:57 +000012379 ac_hi=`expr '(' $ac_mid ')' - 1`
12380 if test $ac_mid -le $ac_hi; then
12381 ac_lo= ac_hi=
12382 break
12383 fi
12384 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012385fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012386
12387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012388 done
12389else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012390 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012391sed 's/^/| /' conftest.$ac_ext >&5
12392
Martin v. Löwiseba40652007-08-30 20:10:57 +000012393 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012394fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012395
12396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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 +000012400# Binary search between lo and hi bounds.
12401while test "x$ac_lo" != "x$ac_hi"; do
12402 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12403 cat >conftest.$ac_ext <<_ACEOF
12404/* confdefs.h. */
12405_ACEOF
12406cat confdefs.h >>conftest.$ac_ext
12407cat >>conftest.$ac_ext <<_ACEOF
12408/* end confdefs.h. */
12409$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012410 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012411int
12412main ()
12413{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012414static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012415test_array [0] = 0
12416
12417 ;
12418 return 0;
12419}
12420_ACEOF
12421rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012422if { (ac_try="$ac_compile"
12423case "(($ac_try" in
12424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12425 *) ac_try_echo=$ac_try;;
12426esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012428 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012429 ac_status=$?
12430 grep -v '^ *+' conftest.er1 >conftest.err
12431 rm -f conftest.er1
12432 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012434 (exit $ac_status); } && {
12435 test -z "$ac_c_werror_flag" ||
12436 test ! -s conftest.err
12437 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012438 ac_hi=$ac_mid
12439else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012440 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012441sed 's/^/| /' conftest.$ac_ext >&5
12442
Martin v. Löwiseba40652007-08-30 20:10:57 +000012443 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012444fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012445
12446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012447done
12448case $ac_lo in
12449?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012450'') if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012451 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012452See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012453echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012454See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012455 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012456 else
12457 ac_cv_sizeof__Bool=0
12458 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012459esac
12460else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012461 cat >conftest.$ac_ext <<_ACEOF
12462/* confdefs.h. */
12463_ACEOF
12464cat confdefs.h >>conftest.$ac_ext
12465cat >>conftest.$ac_ext <<_ACEOF
12466/* end confdefs.h. */
12467$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012468 typedef _Bool ac__type_sizeof_;
12469static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12470static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012471#include <stdio.h>
12472#include <stdlib.h>
12473int
12474main ()
12475{
12476
12477 FILE *f = fopen ("conftest.val", "w");
12478 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012479 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012480 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012481 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012482 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012483 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012484 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012485 fprintf (f, "%ld\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012486 }
12487 else
12488 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012489 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012490 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012491 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012492 fprintf (f, "%lu\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012493 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012494 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012495
12496 ;
12497 return 0;
12498}
12499_ACEOF
12500rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012501if { (ac_try="$ac_link"
12502case "(($ac_try" in
12503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12504 *) ac_try_echo=$ac_try;;
12505esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012507 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012508 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012510 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012511 { (case "(($ac_try" in
12512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12513 *) ac_try_echo=$ac_try;;
12514esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012516 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012517 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012519 (exit $ac_status); }; }; then
12520 ac_cv_sizeof__Bool=`cat conftest.val`
12521else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012522 echo "$as_me: program exited with status $ac_status" >&5
12523echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012524sed 's/^/| /' conftest.$ac_ext >&5
12525
12526( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012527if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012528 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012529See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012530echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012531See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012532 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012533 else
12534 ac_cv_sizeof__Bool=0
12535 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012536fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012537rm -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 +000012538fi
12539rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012540fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012541{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12542echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012543
12544
12545
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012546cat >>confdefs.h <<_ACEOF
12547#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12548_ACEOF
12549
12550
12551fi
12552
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012553{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12554echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012555if test "${ac_cv_type_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012556 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebe26702006-10-02 14:55:51 +000012557else
12558 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012559/* confdefs.h. */
12560_ACEOF
12561cat confdefs.h >>conftest.$ac_ext
12562cat >>conftest.$ac_ext <<_ACEOF
12563/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012564#ifdef HAVE_STDINT_H
12565 #include <stdint.h>
12566 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012567
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012568typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012569int
12570main ()
12571{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012572if ((ac__type_new_ *) 0)
12573 return 0;
12574if (sizeof (ac__type_new_))
12575 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012576 ;
12577 return 0;
12578}
12579_ACEOF
12580rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012581if { (ac_try="$ac_compile"
12582case "(($ac_try" in
12583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12584 *) ac_try_echo=$ac_try;;
12585esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012587 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012588 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012589 grep -v '^ *+' conftest.er1 >conftest.err
12590 rm -f conftest.er1
12591 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012593 (exit $ac_status); } && {
12594 test -z "$ac_c_werror_flag" ||
12595 test ! -s conftest.err
12596 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012597 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012598else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012599 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012600sed 's/^/| /' conftest.$ac_ext >&5
12601
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012602 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012603fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012604
12605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012606fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012607{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12608echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12609if test $ac_cv_type_uintptr_t = yes; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012610
12611cat >>confdefs.h <<_ACEOF
12612#define HAVE_UINTPTR_T 1
12613_ACEOF
12614
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012615{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12616echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12617if test "${ac_cv_type_uintptr_t+set}" = set; then
12618 echo $ECHO_N "(cached) $ECHO_C" >&6
12619else
12620 cat >conftest.$ac_ext <<_ACEOF
12621/* confdefs.h. */
12622_ACEOF
12623cat confdefs.h >>conftest.$ac_ext
12624cat >>conftest.$ac_ext <<_ACEOF
12625/* end confdefs.h. */
12626$ac_includes_default
12627typedef uintptr_t ac__type_new_;
12628int
12629main ()
12630{
12631if ((ac__type_new_ *) 0)
12632 return 0;
12633if (sizeof (ac__type_new_))
12634 return 0;
12635 ;
12636 return 0;
12637}
12638_ACEOF
12639rm -f conftest.$ac_objext
12640if { (ac_try="$ac_compile"
12641case "(($ac_try" in
12642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12643 *) ac_try_echo=$ac_try;;
12644esac
12645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12646 (eval "$ac_compile") 2>conftest.er1
12647 ac_status=$?
12648 grep -v '^ *+' conftest.er1 >conftest.err
12649 rm -f conftest.er1
12650 cat conftest.err >&5
12651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12652 (exit $ac_status); } && {
12653 test -z "$ac_c_werror_flag" ||
12654 test ! -s conftest.err
12655 } && test -s conftest.$ac_objext; then
12656 ac_cv_type_uintptr_t=yes
12657else
12658 echo "$as_me: failed program was:" >&5
12659sed 's/^/| /' conftest.$ac_ext >&5
12660
12661 ac_cv_type_uintptr_t=no
12662fi
12663
12664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12665fi
12666{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12667echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12668
Martin v. Löwiseba40652007-08-30 20:10:57 +000012669# The cast to long int works around a bug in the HP C Compiler
12670# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12671# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12672# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012673{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12674echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012675if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012676 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012677else
Martin v. Löwis11437992002-04-12 09:54:03 +000012678 if test "$cross_compiling" = yes; then
12679 # Depending upon the size, compute the lo and hi bounds.
12680cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012681/* confdefs.h. */
12682_ACEOF
12683cat confdefs.h >>conftest.$ac_ext
12684cat >>conftest.$ac_ext <<_ACEOF
12685/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012686$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012687 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012688int
12689main ()
12690{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012691static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012692test_array [0] = 0
12693
12694 ;
12695 return 0;
12696}
12697_ACEOF
12698rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012699if { (ac_try="$ac_compile"
12700case "(($ac_try" in
12701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12702 *) ac_try_echo=$ac_try;;
12703esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012704eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012705 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012706 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012707 grep -v '^ *+' conftest.er1 >conftest.err
12708 rm -f conftest.er1
12709 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012711 (exit $ac_status); } && {
12712 test -z "$ac_c_werror_flag" ||
12713 test ! -s conftest.err
12714 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012715 ac_lo=0 ac_mid=0
12716 while :; do
12717 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012718/* confdefs.h. */
12719_ACEOF
12720cat confdefs.h >>conftest.$ac_ext
12721cat >>conftest.$ac_ext <<_ACEOF
12722/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012723$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012724 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012725int
12726main ()
12727{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012728static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012729test_array [0] = 0
12730
12731 ;
12732 return 0;
12733}
12734_ACEOF
12735rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012736if { (ac_try="$ac_compile"
12737case "(($ac_try" in
12738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12739 *) ac_try_echo=$ac_try;;
12740esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012741eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012742 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012743 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012744 grep -v '^ *+' conftest.er1 >conftest.err
12745 rm -f conftest.er1
12746 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012748 (exit $ac_status); } && {
12749 test -z "$ac_c_werror_flag" ||
12750 test ! -s conftest.err
12751 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012752 ac_hi=$ac_mid; break
12753else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012754 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012755sed 's/^/| /' conftest.$ac_ext >&5
12756
Martin v. Löwiseba40652007-08-30 20:10:57 +000012757 ac_lo=`expr $ac_mid + 1`
12758 if test $ac_lo -le $ac_mid; then
12759 ac_lo= ac_hi=
12760 break
12761 fi
12762 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012763fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012764
12765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012766 done
12767else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012769sed 's/^/| /' conftest.$ac_ext >&5
12770
Martin v. Löwiseba40652007-08-30 20:10:57 +000012771 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012772/* confdefs.h. */
12773_ACEOF
12774cat confdefs.h >>conftest.$ac_ext
12775cat >>conftest.$ac_ext <<_ACEOF
12776/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012777$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012778 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012779int
12780main ()
12781{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012782static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012783test_array [0] = 0
12784
12785 ;
12786 return 0;
12787}
12788_ACEOF
12789rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012790if { (ac_try="$ac_compile"
12791case "(($ac_try" in
12792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12793 *) ac_try_echo=$ac_try;;
12794esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012796 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012797 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012798 grep -v '^ *+' conftest.er1 >conftest.err
12799 rm -f conftest.er1
12800 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012802 (exit $ac_status); } && {
12803 test -z "$ac_c_werror_flag" ||
12804 test ! -s conftest.err
12805 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012806 ac_hi=-1 ac_mid=-1
12807 while :; do
12808 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012809/* confdefs.h. */
12810_ACEOF
12811cat confdefs.h >>conftest.$ac_ext
12812cat >>conftest.$ac_ext <<_ACEOF
12813/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012814$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012815 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012816int
12817main ()
12818{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012819static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012820test_array [0] = 0
12821
12822 ;
12823 return 0;
12824}
12825_ACEOF
12826rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012827if { (ac_try="$ac_compile"
12828case "(($ac_try" in
12829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12830 *) ac_try_echo=$ac_try;;
12831esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012833 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012834 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012835 grep -v '^ *+' conftest.er1 >conftest.err
12836 rm -f conftest.er1
12837 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012839 (exit $ac_status); } && {
12840 test -z "$ac_c_werror_flag" ||
12841 test ! -s conftest.err
12842 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012843 ac_lo=$ac_mid; break
12844else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012845 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012846sed 's/^/| /' conftest.$ac_ext >&5
12847
Martin v. Löwiseba40652007-08-30 20:10:57 +000012848 ac_hi=`expr '(' $ac_mid ')' - 1`
12849 if test $ac_mid -le $ac_hi; then
12850 ac_lo= ac_hi=
12851 break
12852 fi
12853 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012854fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012855
12856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012857 done
12858else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012859 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012860sed 's/^/| /' conftest.$ac_ext >&5
12861
Martin v. Löwiseba40652007-08-30 20:10:57 +000012862 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012863fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012864
12865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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 +000012869# Binary search between lo and hi bounds.
12870while test "x$ac_lo" != "x$ac_hi"; do
12871 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12872 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012873/* confdefs.h. */
12874_ACEOF
12875cat confdefs.h >>conftest.$ac_ext
12876cat >>conftest.$ac_ext <<_ACEOF
12877/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012878$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012879 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012880int
12881main ()
12882{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012883static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012884test_array [0] = 0
12885
12886 ;
12887 return 0;
12888}
12889_ACEOF
12890rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012891if { (ac_try="$ac_compile"
12892case "(($ac_try" in
12893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12894 *) ac_try_echo=$ac_try;;
12895esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012897 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012898 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012899 grep -v '^ *+' conftest.er1 >conftest.err
12900 rm -f conftest.er1
12901 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012903 (exit $ac_status); } && {
12904 test -z "$ac_c_werror_flag" ||
12905 test ! -s conftest.err
12906 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012907 ac_hi=$ac_mid
12908else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012909 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012910sed 's/^/| /' conftest.$ac_ext >&5
12911
Martin v. Löwiseba40652007-08-30 20:10:57 +000012912 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012913fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012914
12915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012916done
12917case $ac_lo in
12918?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012919'') if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012920 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012921See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012922echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012923See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012924 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012925 else
12926 ac_cv_sizeof_uintptr_t=0
12927 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012928esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012929else
Martin v. Löwis11437992002-04-12 09:54:03 +000012930 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012931/* confdefs.h. */
12932_ACEOF
12933cat confdefs.h >>conftest.$ac_ext
12934cat >>conftest.$ac_ext <<_ACEOF
12935/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012936$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012937 typedef uintptr_t ac__type_sizeof_;
12938static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12939static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012940#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012941#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012942int
12943main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012944{
Martin v. Löwis11437992002-04-12 09:54:03 +000012945
12946 FILE *f = fopen ("conftest.val", "w");
12947 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012948 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012949 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012950 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012951 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012952 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012953 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012954 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012955 }
12956 else
12957 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012958 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012959 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012960 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012961 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012962 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012963 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012964
12965 ;
12966 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012967}
Martin v. Löwis11437992002-04-12 09:54:03 +000012968_ACEOF
12969rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012970if { (ac_try="$ac_link"
12971case "(($ac_try" in
12972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12973 *) ac_try_echo=$ac_try;;
12974esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012976 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012977 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012979 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012980 { (case "(($ac_try" in
12981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12982 *) ac_try_echo=$ac_try;;
12983esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012985 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012986 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012988 (exit $ac_status); }; }; then
12989 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012990else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012991 echo "$as_me: program exited with status $ac_status" >&5
12992echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012993sed 's/^/| /' conftest.$ac_ext >&5
12994
Martin v. Löwis11437992002-04-12 09:54:03 +000012995( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012996if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012997 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012998See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012999echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013000See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013001 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013002 else
13003 ac_cv_sizeof_uintptr_t=0
13004 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013005fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013006rm -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 +000013007fi
13008rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013009fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013010{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13011echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013012
13013
13014
Martin v. Löwis11437992002-04-12 09:54:03 +000013015cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013016#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013017_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013018
Michael W. Hudson54241132001-12-07 15:38:26 +000013019
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013020fi
13021
Martin v. Löwisebe26702006-10-02 14:55:51 +000013022
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013023{ echo "$as_me:$LINENO: checking for off_t" >&5
13024echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
13025if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013026 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013027else
Martin v. Löwis11437992002-04-12 09:54:03 +000013028 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013029/* confdefs.h. */
13030_ACEOF
13031cat confdefs.h >>conftest.$ac_ext
13032cat >>conftest.$ac_ext <<_ACEOF
13033/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013034
13035#ifdef HAVE_SYS_TYPES_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013036#include <sys/types.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013037#endif
13038
13039
13040typedef off_t ac__type_new_;
13041int
13042main ()
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013043{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013044if ((ac__type_new_ *) 0)
13045 return 0;
13046if (sizeof (ac__type_new_))
13047 return 0;
13048 ;
13049 return 0;
13050}
13051_ACEOF
13052rm -f conftest.$ac_objext
13053if { (ac_try="$ac_compile"
13054case "(($ac_try" in
13055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13056 *) ac_try_echo=$ac_try;;
13057esac
13058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13059 (eval "$ac_compile") 2>conftest.er1
13060 ac_status=$?
13061 grep -v '^ *+' conftest.er1 >conftest.err
13062 rm -f conftest.er1
13063 cat conftest.err >&5
13064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13065 (exit $ac_status); } && {
13066 test -z "$ac_c_werror_flag" ||
13067 test ! -s conftest.err
13068 } && test -s conftest.$ac_objext; then
13069 ac_cv_type_off_t=yes
13070else
13071 echo "$as_me: failed program was:" >&5
13072sed 's/^/| /' conftest.$ac_ext >&5
13073
13074 ac_cv_type_off_t=no
13075fi
13076
13077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13078fi
13079{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13080echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13081
13082# The cast to long int works around a bug in the HP C Compiler
13083# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13084# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13085# This bug is HP SR number 8606223364.
13086{ echo "$as_me:$LINENO: checking size of off_t" >&5
13087echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
13088if test "${ac_cv_sizeof_off_t+set}" = set; then
13089 echo $ECHO_N "(cached) $ECHO_C" >&6
13090else
13091 if test "$cross_compiling" = yes; then
13092 # Depending upon the size, compute the lo and hi bounds.
13093cat >conftest.$ac_ext <<_ACEOF
13094/* confdefs.h. */
13095_ACEOF
13096cat confdefs.h >>conftest.$ac_ext
13097cat >>conftest.$ac_ext <<_ACEOF
13098/* end confdefs.h. */
13099
13100#ifdef HAVE_SYS_TYPES_H
13101#include <sys/types.h>
13102#endif
13103
13104
13105 typedef off_t ac__type_sizeof_;
13106int
13107main ()
13108{
13109static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13110test_array [0] = 0
13111
13112 ;
13113 return 0;
13114}
13115_ACEOF
13116rm -f conftest.$ac_objext
13117if { (ac_try="$ac_compile"
13118case "(($ac_try" in
13119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13120 *) ac_try_echo=$ac_try;;
13121esac
13122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13123 (eval "$ac_compile") 2>conftest.er1
13124 ac_status=$?
13125 grep -v '^ *+' conftest.er1 >conftest.err
13126 rm -f conftest.er1
13127 cat conftest.err >&5
13128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13129 (exit $ac_status); } && {
13130 test -z "$ac_c_werror_flag" ||
13131 test ! -s conftest.err
13132 } && test -s conftest.$ac_objext; then
13133 ac_lo=0 ac_mid=0
13134 while :; do
13135 cat >conftest.$ac_ext <<_ACEOF
13136/* confdefs.h. */
13137_ACEOF
13138cat confdefs.h >>conftest.$ac_ext
13139cat >>conftest.$ac_ext <<_ACEOF
13140/* end confdefs.h. */
13141
13142#ifdef HAVE_SYS_TYPES_H
13143#include <sys/types.h>
13144#endif
13145
13146
13147 typedef off_t ac__type_sizeof_;
13148int
13149main ()
13150{
13151static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13152test_array [0] = 0
13153
13154 ;
13155 return 0;
13156}
13157_ACEOF
13158rm -f conftest.$ac_objext
13159if { (ac_try="$ac_compile"
13160case "(($ac_try" in
13161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13162 *) ac_try_echo=$ac_try;;
13163esac
13164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13165 (eval "$ac_compile") 2>conftest.er1
13166 ac_status=$?
13167 grep -v '^ *+' conftest.er1 >conftest.err
13168 rm -f conftest.er1
13169 cat conftest.err >&5
13170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13171 (exit $ac_status); } && {
13172 test -z "$ac_c_werror_flag" ||
13173 test ! -s conftest.err
13174 } && test -s conftest.$ac_objext; then
13175 ac_hi=$ac_mid; break
13176else
13177 echo "$as_me: failed program was:" >&5
13178sed 's/^/| /' conftest.$ac_ext >&5
13179
13180 ac_lo=`expr $ac_mid + 1`
13181 if test $ac_lo -le $ac_mid; then
13182 ac_lo= ac_hi=
13183 break
13184 fi
13185 ac_mid=`expr 2 '*' $ac_mid + 1`
13186fi
13187
13188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13189 done
13190else
13191 echo "$as_me: failed program was:" >&5
13192sed 's/^/| /' conftest.$ac_ext >&5
13193
13194 cat >conftest.$ac_ext <<_ACEOF
13195/* confdefs.h. */
13196_ACEOF
13197cat confdefs.h >>conftest.$ac_ext
13198cat >>conftest.$ac_ext <<_ACEOF
13199/* end confdefs.h. */
13200
13201#ifdef HAVE_SYS_TYPES_H
13202#include <sys/types.h>
13203#endif
13204
13205
13206 typedef off_t ac__type_sizeof_;
13207int
13208main ()
13209{
13210static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13211test_array [0] = 0
13212
13213 ;
13214 return 0;
13215}
13216_ACEOF
13217rm -f conftest.$ac_objext
13218if { (ac_try="$ac_compile"
13219case "(($ac_try" in
13220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13221 *) ac_try_echo=$ac_try;;
13222esac
13223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13224 (eval "$ac_compile") 2>conftest.er1
13225 ac_status=$?
13226 grep -v '^ *+' conftest.er1 >conftest.err
13227 rm -f conftest.er1
13228 cat conftest.err >&5
13229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13230 (exit $ac_status); } && {
13231 test -z "$ac_c_werror_flag" ||
13232 test ! -s conftest.err
13233 } && test -s conftest.$ac_objext; then
13234 ac_hi=-1 ac_mid=-1
13235 while :; do
13236 cat >conftest.$ac_ext <<_ACEOF
13237/* confdefs.h. */
13238_ACEOF
13239cat confdefs.h >>conftest.$ac_ext
13240cat >>conftest.$ac_ext <<_ACEOF
13241/* end confdefs.h. */
13242
13243#ifdef HAVE_SYS_TYPES_H
13244#include <sys/types.h>
13245#endif
13246
13247
13248 typedef off_t ac__type_sizeof_;
13249int
13250main ()
13251{
13252static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13253test_array [0] = 0
13254
13255 ;
13256 return 0;
13257}
13258_ACEOF
13259rm -f conftest.$ac_objext
13260if { (ac_try="$ac_compile"
13261case "(($ac_try" in
13262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13263 *) ac_try_echo=$ac_try;;
13264esac
13265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13266 (eval "$ac_compile") 2>conftest.er1
13267 ac_status=$?
13268 grep -v '^ *+' conftest.er1 >conftest.err
13269 rm -f conftest.er1
13270 cat conftest.err >&5
13271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13272 (exit $ac_status); } && {
13273 test -z "$ac_c_werror_flag" ||
13274 test ! -s conftest.err
13275 } && test -s conftest.$ac_objext; then
13276 ac_lo=$ac_mid; break
13277else
13278 echo "$as_me: failed program was:" >&5
13279sed 's/^/| /' conftest.$ac_ext >&5
13280
13281 ac_hi=`expr '(' $ac_mid ')' - 1`
13282 if test $ac_mid -le $ac_hi; then
13283 ac_lo= ac_hi=
13284 break
13285 fi
13286 ac_mid=`expr 2 '*' $ac_mid`
13287fi
13288
13289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13290 done
13291else
13292 echo "$as_me: failed program was:" >&5
13293sed 's/^/| /' conftest.$ac_ext >&5
13294
13295 ac_lo= ac_hi=
13296fi
13297
13298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13299fi
13300
13301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13302# Binary search between lo and hi bounds.
13303while test "x$ac_lo" != "x$ac_hi"; do
13304 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13305 cat >conftest.$ac_ext <<_ACEOF
13306/* confdefs.h. */
13307_ACEOF
13308cat confdefs.h >>conftest.$ac_ext
13309cat >>conftest.$ac_ext <<_ACEOF
13310/* end confdefs.h. */
13311
13312#ifdef HAVE_SYS_TYPES_H
13313#include <sys/types.h>
13314#endif
13315
13316
13317 typedef off_t ac__type_sizeof_;
13318int
13319main ()
13320{
13321static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13322test_array [0] = 0
13323
13324 ;
13325 return 0;
13326}
13327_ACEOF
13328rm -f conftest.$ac_objext
13329if { (ac_try="$ac_compile"
13330case "(($ac_try" in
13331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13332 *) ac_try_echo=$ac_try;;
13333esac
13334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13335 (eval "$ac_compile") 2>conftest.er1
13336 ac_status=$?
13337 grep -v '^ *+' conftest.er1 >conftest.err
13338 rm -f conftest.er1
13339 cat conftest.err >&5
13340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13341 (exit $ac_status); } && {
13342 test -z "$ac_c_werror_flag" ||
13343 test ! -s conftest.err
13344 } && test -s conftest.$ac_objext; then
13345 ac_hi=$ac_mid
13346else
13347 echo "$as_me: failed program was:" >&5
13348sed 's/^/| /' conftest.$ac_ext >&5
13349
13350 ac_lo=`expr '(' $ac_mid ')' + 1`
13351fi
13352
13353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13354done
13355case $ac_lo in
13356?*) ac_cv_sizeof_off_t=$ac_lo;;
13357'') if test "$ac_cv_type_off_t" = yes; then
13358 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13359See \`config.log' for more details." >&5
13360echo "$as_me: error: cannot compute sizeof (off_t)
13361See \`config.log' for more details." >&2;}
13362 { (exit 77); exit 77; }; }
13363 else
13364 ac_cv_sizeof_off_t=0
13365 fi ;;
13366esac
13367else
13368 cat >conftest.$ac_ext <<_ACEOF
13369/* confdefs.h. */
13370_ACEOF
13371cat confdefs.h >>conftest.$ac_ext
13372cat >>conftest.$ac_ext <<_ACEOF
13373/* end confdefs.h. */
13374
13375#ifdef HAVE_SYS_TYPES_H
13376#include <sys/types.h>
13377#endif
13378
13379
13380 typedef off_t ac__type_sizeof_;
13381static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13382static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13383#include <stdio.h>
13384#include <stdlib.h>
13385int
13386main ()
13387{
13388
13389 FILE *f = fopen ("conftest.val", "w");
13390 if (! f)
13391 return 1;
13392 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13393 {
13394 long int i = longval ();
13395 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13396 return 1;
13397 fprintf (f, "%ld\n", i);
13398 }
13399 else
13400 {
13401 unsigned long int i = ulongval ();
13402 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13403 return 1;
13404 fprintf (f, "%lu\n", i);
13405 }
13406 return ferror (f) || fclose (f) != 0;
13407
13408 ;
13409 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013410}
Martin v. Löwis11437992002-04-12 09:54:03 +000013411_ACEOF
13412rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013413if { (ac_try="$ac_link"
13414case "(($ac_try" in
13415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13416 *) ac_try_echo=$ac_try;;
13417esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013419 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013420 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013422 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013423 { (case "(($ac_try" in
13424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13425 *) ac_try_echo=$ac_try;;
13426esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013428 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013429 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013431 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013432 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013433else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013434 echo "$as_me: program exited with status $ac_status" >&5
13435echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013436sed 's/^/| /' conftest.$ac_ext >&5
13437
Martin v. Löwis11437992002-04-12 09:54:03 +000013438( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013439if test "$ac_cv_type_off_t" = yes; then
13440 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13441See \`config.log' for more details." >&5
13442echo "$as_me: error: cannot compute sizeof (off_t)
13443See \`config.log' for more details." >&2;}
13444 { (exit 77); exit 77; }; }
13445 else
13446 ac_cv_sizeof_off_t=0
13447 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013448fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013449rm -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 +000013450fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013451rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013452fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013453{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13454echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013455
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013456
13457
Martin v. Löwis11437992002-04-12 09:54:03 +000013458cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013459#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013460_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013461
Michael W. Hudson54241132001-12-07 15:38:26 +000013462
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013463
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013464{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13465echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013466if test "$have_long_long" = yes -a \
13467 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
13468 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013469
Martin v. Löwis11437992002-04-12 09:54:03 +000013470cat >>confdefs.h <<\_ACEOF
13471#define HAVE_LARGEFILE_SUPPORT 1
13472_ACEOF
13473
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013474 { echo "$as_me:$LINENO: result: yes" >&5
13475echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013476else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013477 { echo "$as_me:$LINENO: result: no" >&5
13478echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013479fi
13480
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013481{ echo "$as_me:$LINENO: checking for time_t" >&5
13482echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13483if test "${ac_cv_type_time_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013484 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013485else
Martin v. Löwis11437992002-04-12 09:54:03 +000013486 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013487/* confdefs.h. */
13488_ACEOF
13489cat confdefs.h >>conftest.$ac_ext
13490cat >>conftest.$ac_ext <<_ACEOF
13491/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013492
13493#ifdef HAVE_SYS_TYPES_H
13494#include <sys/types.h>
13495#endif
13496#ifdef HAVE_TIME_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013497#include <time.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013498#endif
13499
13500
13501typedef time_t ac__type_new_;
13502int
13503main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013504{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013505if ((ac__type_new_ *) 0)
13506 return 0;
13507if (sizeof (ac__type_new_))
13508 return 0;
13509 ;
13510 return 0;
13511}
13512_ACEOF
13513rm -f conftest.$ac_objext
13514if { (ac_try="$ac_compile"
13515case "(($ac_try" in
13516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13517 *) ac_try_echo=$ac_try;;
13518esac
13519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13520 (eval "$ac_compile") 2>conftest.er1
13521 ac_status=$?
13522 grep -v '^ *+' conftest.er1 >conftest.err
13523 rm -f conftest.er1
13524 cat conftest.err >&5
13525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13526 (exit $ac_status); } && {
13527 test -z "$ac_c_werror_flag" ||
13528 test ! -s conftest.err
13529 } && test -s conftest.$ac_objext; then
13530 ac_cv_type_time_t=yes
13531else
13532 echo "$as_me: failed program was:" >&5
13533sed 's/^/| /' conftest.$ac_ext >&5
13534
13535 ac_cv_type_time_t=no
13536fi
13537
13538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13539fi
13540{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13541echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13542
13543# The cast to long int works around a bug in the HP C Compiler
13544# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13545# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13546# This bug is HP SR number 8606223364.
13547{ echo "$as_me:$LINENO: checking size of time_t" >&5
13548echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
13549if test "${ac_cv_sizeof_time_t+set}" = set; then
13550 echo $ECHO_N "(cached) $ECHO_C" >&6
13551else
13552 if test "$cross_compiling" = yes; then
13553 # Depending upon the size, compute the lo and hi bounds.
13554cat >conftest.$ac_ext <<_ACEOF
13555/* confdefs.h. */
13556_ACEOF
13557cat confdefs.h >>conftest.$ac_ext
13558cat >>conftest.$ac_ext <<_ACEOF
13559/* end confdefs.h. */
13560
13561#ifdef HAVE_SYS_TYPES_H
13562#include <sys/types.h>
13563#endif
13564#ifdef HAVE_TIME_H
13565#include <time.h>
13566#endif
13567
13568
13569 typedef time_t ac__type_sizeof_;
13570int
13571main ()
13572{
13573static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13574test_array [0] = 0
13575
13576 ;
13577 return 0;
13578}
13579_ACEOF
13580rm -f conftest.$ac_objext
13581if { (ac_try="$ac_compile"
13582case "(($ac_try" in
13583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13584 *) ac_try_echo=$ac_try;;
13585esac
13586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13587 (eval "$ac_compile") 2>conftest.er1
13588 ac_status=$?
13589 grep -v '^ *+' conftest.er1 >conftest.err
13590 rm -f conftest.er1
13591 cat conftest.err >&5
13592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13593 (exit $ac_status); } && {
13594 test -z "$ac_c_werror_flag" ||
13595 test ! -s conftest.err
13596 } && test -s conftest.$ac_objext; then
13597 ac_lo=0 ac_mid=0
13598 while :; do
13599 cat >conftest.$ac_ext <<_ACEOF
13600/* confdefs.h. */
13601_ACEOF
13602cat confdefs.h >>conftest.$ac_ext
13603cat >>conftest.$ac_ext <<_ACEOF
13604/* end confdefs.h. */
13605
13606#ifdef HAVE_SYS_TYPES_H
13607#include <sys/types.h>
13608#endif
13609#ifdef HAVE_TIME_H
13610#include <time.h>
13611#endif
13612
13613
13614 typedef time_t ac__type_sizeof_;
13615int
13616main ()
13617{
13618static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13619test_array [0] = 0
13620
13621 ;
13622 return 0;
13623}
13624_ACEOF
13625rm -f conftest.$ac_objext
13626if { (ac_try="$ac_compile"
13627case "(($ac_try" in
13628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13629 *) ac_try_echo=$ac_try;;
13630esac
13631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13632 (eval "$ac_compile") 2>conftest.er1
13633 ac_status=$?
13634 grep -v '^ *+' conftest.er1 >conftest.err
13635 rm -f conftest.er1
13636 cat conftest.err >&5
13637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13638 (exit $ac_status); } && {
13639 test -z "$ac_c_werror_flag" ||
13640 test ! -s conftest.err
13641 } && test -s conftest.$ac_objext; then
13642 ac_hi=$ac_mid; break
13643else
13644 echo "$as_me: failed program was:" >&5
13645sed 's/^/| /' conftest.$ac_ext >&5
13646
13647 ac_lo=`expr $ac_mid + 1`
13648 if test $ac_lo -le $ac_mid; then
13649 ac_lo= ac_hi=
13650 break
13651 fi
13652 ac_mid=`expr 2 '*' $ac_mid + 1`
13653fi
13654
13655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13656 done
13657else
13658 echo "$as_me: failed program was:" >&5
13659sed 's/^/| /' conftest.$ac_ext >&5
13660
13661 cat >conftest.$ac_ext <<_ACEOF
13662/* confdefs.h. */
13663_ACEOF
13664cat confdefs.h >>conftest.$ac_ext
13665cat >>conftest.$ac_ext <<_ACEOF
13666/* end confdefs.h. */
13667
13668#ifdef HAVE_SYS_TYPES_H
13669#include <sys/types.h>
13670#endif
13671#ifdef HAVE_TIME_H
13672#include <time.h>
13673#endif
13674
13675
13676 typedef time_t ac__type_sizeof_;
13677int
13678main ()
13679{
13680static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13681test_array [0] = 0
13682
13683 ;
13684 return 0;
13685}
13686_ACEOF
13687rm -f conftest.$ac_objext
13688if { (ac_try="$ac_compile"
13689case "(($ac_try" in
13690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13691 *) ac_try_echo=$ac_try;;
13692esac
13693eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13694 (eval "$ac_compile") 2>conftest.er1
13695 ac_status=$?
13696 grep -v '^ *+' conftest.er1 >conftest.err
13697 rm -f conftest.er1
13698 cat conftest.err >&5
13699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13700 (exit $ac_status); } && {
13701 test -z "$ac_c_werror_flag" ||
13702 test ! -s conftest.err
13703 } && test -s conftest.$ac_objext; then
13704 ac_hi=-1 ac_mid=-1
13705 while :; do
13706 cat >conftest.$ac_ext <<_ACEOF
13707/* confdefs.h. */
13708_ACEOF
13709cat confdefs.h >>conftest.$ac_ext
13710cat >>conftest.$ac_ext <<_ACEOF
13711/* end confdefs.h. */
13712
13713#ifdef HAVE_SYS_TYPES_H
13714#include <sys/types.h>
13715#endif
13716#ifdef HAVE_TIME_H
13717#include <time.h>
13718#endif
13719
13720
13721 typedef time_t ac__type_sizeof_;
13722int
13723main ()
13724{
13725static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13726test_array [0] = 0
13727
13728 ;
13729 return 0;
13730}
13731_ACEOF
13732rm -f conftest.$ac_objext
13733if { (ac_try="$ac_compile"
13734case "(($ac_try" in
13735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13736 *) ac_try_echo=$ac_try;;
13737esac
13738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13739 (eval "$ac_compile") 2>conftest.er1
13740 ac_status=$?
13741 grep -v '^ *+' conftest.er1 >conftest.err
13742 rm -f conftest.er1
13743 cat conftest.err >&5
13744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13745 (exit $ac_status); } && {
13746 test -z "$ac_c_werror_flag" ||
13747 test ! -s conftest.err
13748 } && test -s conftest.$ac_objext; then
13749 ac_lo=$ac_mid; break
13750else
13751 echo "$as_me: failed program was:" >&5
13752sed 's/^/| /' conftest.$ac_ext >&5
13753
13754 ac_hi=`expr '(' $ac_mid ')' - 1`
13755 if test $ac_mid -le $ac_hi; then
13756 ac_lo= ac_hi=
13757 break
13758 fi
13759 ac_mid=`expr 2 '*' $ac_mid`
13760fi
13761
13762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13763 done
13764else
13765 echo "$as_me: failed program was:" >&5
13766sed 's/^/| /' conftest.$ac_ext >&5
13767
13768 ac_lo= ac_hi=
13769fi
13770
13771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13772fi
13773
13774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13775# Binary search between lo and hi bounds.
13776while test "x$ac_lo" != "x$ac_hi"; do
13777 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13778 cat >conftest.$ac_ext <<_ACEOF
13779/* confdefs.h. */
13780_ACEOF
13781cat confdefs.h >>conftest.$ac_ext
13782cat >>conftest.$ac_ext <<_ACEOF
13783/* end confdefs.h. */
13784
13785#ifdef HAVE_SYS_TYPES_H
13786#include <sys/types.h>
13787#endif
13788#ifdef HAVE_TIME_H
13789#include <time.h>
13790#endif
13791
13792
13793 typedef time_t ac__type_sizeof_;
13794int
13795main ()
13796{
13797static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13798test_array [0] = 0
13799
13800 ;
13801 return 0;
13802}
13803_ACEOF
13804rm -f conftest.$ac_objext
13805if { (ac_try="$ac_compile"
13806case "(($ac_try" in
13807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13808 *) ac_try_echo=$ac_try;;
13809esac
13810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13811 (eval "$ac_compile") 2>conftest.er1
13812 ac_status=$?
13813 grep -v '^ *+' conftest.er1 >conftest.err
13814 rm -f conftest.er1
13815 cat conftest.err >&5
13816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13817 (exit $ac_status); } && {
13818 test -z "$ac_c_werror_flag" ||
13819 test ! -s conftest.err
13820 } && test -s conftest.$ac_objext; then
13821 ac_hi=$ac_mid
13822else
13823 echo "$as_me: failed program was:" >&5
13824sed 's/^/| /' conftest.$ac_ext >&5
13825
13826 ac_lo=`expr '(' $ac_mid ')' + 1`
13827fi
13828
13829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13830done
13831case $ac_lo in
13832?*) ac_cv_sizeof_time_t=$ac_lo;;
13833'') if test "$ac_cv_type_time_t" = yes; then
13834 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13835See \`config.log' for more details." >&5
13836echo "$as_me: error: cannot compute sizeof (time_t)
13837See \`config.log' for more details." >&2;}
13838 { (exit 77); exit 77; }; }
13839 else
13840 ac_cv_sizeof_time_t=0
13841 fi ;;
13842esac
13843else
13844 cat >conftest.$ac_ext <<_ACEOF
13845/* confdefs.h. */
13846_ACEOF
13847cat confdefs.h >>conftest.$ac_ext
13848cat >>conftest.$ac_ext <<_ACEOF
13849/* end confdefs.h. */
13850
13851#ifdef HAVE_SYS_TYPES_H
13852#include <sys/types.h>
13853#endif
13854#ifdef HAVE_TIME_H
13855#include <time.h>
13856#endif
13857
13858
13859 typedef time_t ac__type_sizeof_;
13860static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13861static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13862#include <stdio.h>
13863#include <stdlib.h>
13864int
13865main ()
13866{
13867
13868 FILE *f = fopen ("conftest.val", "w");
13869 if (! f)
13870 return 1;
13871 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13872 {
13873 long int i = longval ();
13874 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13875 return 1;
13876 fprintf (f, "%ld\n", i);
13877 }
13878 else
13879 {
13880 unsigned long int i = ulongval ();
13881 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13882 return 1;
13883 fprintf (f, "%lu\n", i);
13884 }
13885 return ferror (f) || fclose (f) != 0;
13886
13887 ;
13888 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013889}
Martin v. Löwis11437992002-04-12 09:54:03 +000013890_ACEOF
13891rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013892if { (ac_try="$ac_link"
13893case "(($ac_try" in
13894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13895 *) ac_try_echo=$ac_try;;
13896esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013898 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013899 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013901 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013902 { (case "(($ac_try" in
13903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13904 *) ac_try_echo=$ac_try;;
13905esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013907 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013908 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013910 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013911 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013912else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013913 echo "$as_me: program exited with status $ac_status" >&5
13914echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013915sed 's/^/| /' conftest.$ac_ext >&5
13916
Martin v. Löwis11437992002-04-12 09:54:03 +000013917( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013918if test "$ac_cv_type_time_t" = yes; then
13919 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13920See \`config.log' for more details." >&5
13921echo "$as_me: error: cannot compute sizeof (time_t)
13922See \`config.log' for more details." >&2;}
13923 { (exit 77); exit 77; }; }
13924 else
13925 ac_cv_sizeof_time_t=0
13926 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013927fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013928rm -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 +000013929fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013930rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013931fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013932{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13933echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013934
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013935
13936
Martin v. Löwis11437992002-04-12 09:54:03 +000013937cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013938#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013939_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013940
Michael W. Hudson54241132001-12-07 15:38:26 +000013941
13942
Trent Mick635f6fb2000-08-23 21:33:05 +000013943# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013944ac_save_cc="$CC"
13945if test "$ac_cv_kpthread" = "yes"
13946then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013947elif test "$ac_cv_kthread" = "yes"
13948then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013949elif test "$ac_cv_pthread" = "yes"
13950then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013951fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013952{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13953echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013954have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013955cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013956/* confdefs.h. */
13957_ACEOF
13958cat confdefs.h >>conftest.$ac_ext
13959cat >>conftest.$ac_ext <<_ACEOF
13960/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013961#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013962int
13963main ()
13964{
Guido van Rossum12580492000-09-24 16:47:19 +000013965pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013966 ;
13967 return 0;
13968}
13969_ACEOF
13970rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013971if { (ac_try="$ac_compile"
13972case "(($ac_try" in
13973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13974 *) ac_try_echo=$ac_try;;
13975esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013977 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013978 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013979 grep -v '^ *+' conftest.er1 >conftest.err
13980 rm -f conftest.er1
13981 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013983 (exit $ac_status); } && {
13984 test -z "$ac_c_werror_flag" ||
13985 test ! -s conftest.err
13986 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013987 have_pthread_t=yes
13988else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013989 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013990sed 's/^/| /' conftest.$ac_ext >&5
13991
Martin v. Löwiseba40652007-08-30 20:10:57 +000013992
Trent Mick635f6fb2000-08-23 21:33:05 +000013993fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013994
13995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013996{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13997echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013998if test "$have_pthread_t" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013999 { echo "$as_me:$LINENO: checking for pthread_t" >&5
14000echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
14001if test "${ac_cv_type_pthread_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014002 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000014003else
Martin v. Löwis11437992002-04-12 09:54:03 +000014004 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014005/* confdefs.h. */
14006_ACEOF
14007cat confdefs.h >>conftest.$ac_ext
14008cat >>conftest.$ac_ext <<_ACEOF
14009/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014010
14011#ifdef HAVE_PTHREAD_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014012#include <pthread.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014013#endif
14014
14015
14016typedef pthread_t ac__type_new_;
14017int
14018main ()
14019{
14020if ((ac__type_new_ *) 0)
14021 return 0;
14022if (sizeof (ac__type_new_))
14023 return 0;
14024 ;
14025 return 0;
14026}
14027_ACEOF
14028rm -f conftest.$ac_objext
14029if { (ac_try="$ac_compile"
14030case "(($ac_try" in
14031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14032 *) ac_try_echo=$ac_try;;
14033esac
14034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14035 (eval "$ac_compile") 2>conftest.er1
14036 ac_status=$?
14037 grep -v '^ *+' conftest.er1 >conftest.err
14038 rm -f conftest.er1
14039 cat conftest.err >&5
14040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14041 (exit $ac_status); } && {
14042 test -z "$ac_c_werror_flag" ||
14043 test ! -s conftest.err
14044 } && test -s conftest.$ac_objext; then
14045 ac_cv_type_pthread_t=yes
14046else
14047 echo "$as_me: failed program was:" >&5
14048sed 's/^/| /' conftest.$ac_ext >&5
14049
14050 ac_cv_type_pthread_t=no
14051fi
14052
14053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14054fi
14055{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14056echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14057
14058# The cast to long int works around a bug in the HP C Compiler
14059# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14060# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14061# This bug is HP SR number 8606223364.
14062{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14063echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
14064if test "${ac_cv_sizeof_pthread_t+set}" = set; then
14065 echo $ECHO_N "(cached) $ECHO_C" >&6
14066else
14067 if test "$cross_compiling" = yes; then
14068 # Depending upon the size, compute the lo and hi bounds.
14069cat >conftest.$ac_ext <<_ACEOF
14070/* confdefs.h. */
14071_ACEOF
14072cat confdefs.h >>conftest.$ac_ext
14073cat >>conftest.$ac_ext <<_ACEOF
14074/* end confdefs.h. */
14075
14076#ifdef HAVE_PTHREAD_H
14077#include <pthread.h>
14078#endif
14079
14080
14081 typedef pthread_t ac__type_sizeof_;
14082int
14083main ()
14084{
14085static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
14086test_array [0] = 0
14087
14088 ;
14089 return 0;
14090}
14091_ACEOF
14092rm -f conftest.$ac_objext
14093if { (ac_try="$ac_compile"
14094case "(($ac_try" in
14095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14096 *) ac_try_echo=$ac_try;;
14097esac
14098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14099 (eval "$ac_compile") 2>conftest.er1
14100 ac_status=$?
14101 grep -v '^ *+' conftest.er1 >conftest.err
14102 rm -f conftest.er1
14103 cat conftest.err >&5
14104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14105 (exit $ac_status); } && {
14106 test -z "$ac_c_werror_flag" ||
14107 test ! -s conftest.err
14108 } && test -s conftest.$ac_objext; then
14109 ac_lo=0 ac_mid=0
14110 while :; do
14111 cat >conftest.$ac_ext <<_ACEOF
14112/* confdefs.h. */
14113_ACEOF
14114cat confdefs.h >>conftest.$ac_ext
14115cat >>conftest.$ac_ext <<_ACEOF
14116/* end confdefs.h. */
14117
14118#ifdef HAVE_PTHREAD_H
14119#include <pthread.h>
14120#endif
14121
14122
14123 typedef pthread_t ac__type_sizeof_;
14124int
14125main ()
14126{
14127static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14128test_array [0] = 0
14129
14130 ;
14131 return 0;
14132}
14133_ACEOF
14134rm -f conftest.$ac_objext
14135if { (ac_try="$ac_compile"
14136case "(($ac_try" in
14137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14138 *) ac_try_echo=$ac_try;;
14139esac
14140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14141 (eval "$ac_compile") 2>conftest.er1
14142 ac_status=$?
14143 grep -v '^ *+' conftest.er1 >conftest.err
14144 rm -f conftest.er1
14145 cat conftest.err >&5
14146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14147 (exit $ac_status); } && {
14148 test -z "$ac_c_werror_flag" ||
14149 test ! -s conftest.err
14150 } && test -s conftest.$ac_objext; then
14151 ac_hi=$ac_mid; break
14152else
14153 echo "$as_me: failed program was:" >&5
14154sed 's/^/| /' conftest.$ac_ext >&5
14155
14156 ac_lo=`expr $ac_mid + 1`
14157 if test $ac_lo -le $ac_mid; then
14158 ac_lo= ac_hi=
14159 break
14160 fi
14161 ac_mid=`expr 2 '*' $ac_mid + 1`
14162fi
14163
14164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14165 done
14166else
14167 echo "$as_me: failed program was:" >&5
14168sed 's/^/| /' conftest.$ac_ext >&5
14169
14170 cat >conftest.$ac_ext <<_ACEOF
14171/* confdefs.h. */
14172_ACEOF
14173cat confdefs.h >>conftest.$ac_ext
14174cat >>conftest.$ac_ext <<_ACEOF
14175/* end confdefs.h. */
14176
14177#ifdef HAVE_PTHREAD_H
14178#include <pthread.h>
14179#endif
14180
14181
14182 typedef pthread_t ac__type_sizeof_;
14183int
14184main ()
14185{
14186static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
14187test_array [0] = 0
14188
14189 ;
14190 return 0;
14191}
14192_ACEOF
14193rm -f conftest.$ac_objext
14194if { (ac_try="$ac_compile"
14195case "(($ac_try" in
14196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14197 *) ac_try_echo=$ac_try;;
14198esac
14199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14200 (eval "$ac_compile") 2>conftest.er1
14201 ac_status=$?
14202 grep -v '^ *+' conftest.er1 >conftest.err
14203 rm -f conftest.er1
14204 cat conftest.err >&5
14205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14206 (exit $ac_status); } && {
14207 test -z "$ac_c_werror_flag" ||
14208 test ! -s conftest.err
14209 } && test -s conftest.$ac_objext; then
14210 ac_hi=-1 ac_mid=-1
14211 while :; do
14212 cat >conftest.$ac_ext <<_ACEOF
14213/* confdefs.h. */
14214_ACEOF
14215cat confdefs.h >>conftest.$ac_ext
14216cat >>conftest.$ac_ext <<_ACEOF
14217/* end confdefs.h. */
14218
14219#ifdef HAVE_PTHREAD_H
14220#include <pthread.h>
14221#endif
14222
14223
14224 typedef pthread_t ac__type_sizeof_;
14225int
14226main ()
14227{
14228static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
14229test_array [0] = 0
14230
14231 ;
14232 return 0;
14233}
14234_ACEOF
14235rm -f conftest.$ac_objext
14236if { (ac_try="$ac_compile"
14237case "(($ac_try" in
14238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14239 *) ac_try_echo=$ac_try;;
14240esac
14241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14242 (eval "$ac_compile") 2>conftest.er1
14243 ac_status=$?
14244 grep -v '^ *+' conftest.er1 >conftest.err
14245 rm -f conftest.er1
14246 cat conftest.err >&5
14247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14248 (exit $ac_status); } && {
14249 test -z "$ac_c_werror_flag" ||
14250 test ! -s conftest.err
14251 } && test -s conftest.$ac_objext; then
14252 ac_lo=$ac_mid; break
14253else
14254 echo "$as_me: failed program was:" >&5
14255sed 's/^/| /' conftest.$ac_ext >&5
14256
14257 ac_hi=`expr '(' $ac_mid ')' - 1`
14258 if test $ac_mid -le $ac_hi; then
14259 ac_lo= ac_hi=
14260 break
14261 fi
14262 ac_mid=`expr 2 '*' $ac_mid`
14263fi
14264
14265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14266 done
14267else
14268 echo "$as_me: failed program was:" >&5
14269sed 's/^/| /' conftest.$ac_ext >&5
14270
14271 ac_lo= ac_hi=
14272fi
14273
14274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14275fi
14276
14277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14278# Binary search between lo and hi bounds.
14279while test "x$ac_lo" != "x$ac_hi"; do
14280 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14281 cat >conftest.$ac_ext <<_ACEOF
14282/* confdefs.h. */
14283_ACEOF
14284cat confdefs.h >>conftest.$ac_ext
14285cat >>conftest.$ac_ext <<_ACEOF
14286/* end confdefs.h. */
14287
14288#ifdef HAVE_PTHREAD_H
14289#include <pthread.h>
14290#endif
14291
14292
14293 typedef pthread_t ac__type_sizeof_;
14294int
14295main ()
14296{
14297static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14298test_array [0] = 0
14299
14300 ;
14301 return 0;
14302}
14303_ACEOF
14304rm -f conftest.$ac_objext
14305if { (ac_try="$ac_compile"
14306case "(($ac_try" in
14307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14308 *) ac_try_echo=$ac_try;;
14309esac
14310eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14311 (eval "$ac_compile") 2>conftest.er1
14312 ac_status=$?
14313 grep -v '^ *+' conftest.er1 >conftest.err
14314 rm -f conftest.er1
14315 cat conftest.err >&5
14316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14317 (exit $ac_status); } && {
14318 test -z "$ac_c_werror_flag" ||
14319 test ! -s conftest.err
14320 } && test -s conftest.$ac_objext; then
14321 ac_hi=$ac_mid
14322else
14323 echo "$as_me: failed program was:" >&5
14324sed 's/^/| /' conftest.$ac_ext >&5
14325
14326 ac_lo=`expr '(' $ac_mid ')' + 1`
14327fi
14328
14329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14330done
14331case $ac_lo in
14332?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14333'') if test "$ac_cv_type_pthread_t" = yes; then
14334 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14335See \`config.log' for more details." >&5
14336echo "$as_me: error: cannot compute sizeof (pthread_t)
14337See \`config.log' for more details." >&2;}
14338 { (exit 77); exit 77; }; }
14339 else
14340 ac_cv_sizeof_pthread_t=0
14341 fi ;;
14342esac
14343else
14344 cat >conftest.$ac_ext <<_ACEOF
14345/* confdefs.h. */
14346_ACEOF
14347cat confdefs.h >>conftest.$ac_ext
14348cat >>conftest.$ac_ext <<_ACEOF
14349/* end confdefs.h. */
14350
14351#ifdef HAVE_PTHREAD_H
14352#include <pthread.h>
14353#endif
14354
14355
14356 typedef pthread_t ac__type_sizeof_;
14357static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14358static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
14359#include <stdio.h>
14360#include <stdlib.h>
14361int
14362main ()
14363{
14364
14365 FILE *f = fopen ("conftest.val", "w");
14366 if (! f)
14367 return 1;
14368 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
14369 {
14370 long int i = longval ();
14371 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14372 return 1;
14373 fprintf (f, "%ld\n", i);
14374 }
14375 else
14376 {
14377 unsigned long int i = ulongval ();
14378 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14379 return 1;
14380 fprintf (f, "%lu\n", i);
14381 }
14382 return ferror (f) || fclose (f) != 0;
14383
14384 ;
14385 return 0;
14386}
Martin v. Löwis11437992002-04-12 09:54:03 +000014387_ACEOF
14388rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014389if { (ac_try="$ac_link"
14390case "(($ac_try" in
14391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14392 *) ac_try_echo=$ac_try;;
14393esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014395 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014396 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014398 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014399 { (case "(($ac_try" in
14400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14401 *) ac_try_echo=$ac_try;;
14402esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014404 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014405 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014407 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014408 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014409else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014410 echo "$as_me: program exited with status $ac_status" >&5
14411echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014412sed 's/^/| /' conftest.$ac_ext >&5
14413
Martin v. Löwis11437992002-04-12 09:54:03 +000014414( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014415if test "$ac_cv_type_pthread_t" = yes; then
14416 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14417See \`config.log' for more details." >&5
14418echo "$as_me: error: cannot compute sizeof (pthread_t)
14419See \`config.log' for more details." >&2;}
14420 { (exit 77); exit 77; }; }
14421 else
14422 ac_cv_sizeof_pthread_t=0
14423 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014424fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014425rm -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 +000014426fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014427rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014428fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014429{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014430echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014431
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014432
14433
Martin v. Löwis11437992002-04-12 09:54:03 +000014434cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014435#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014436_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014437
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014438
Trent Mick635f6fb2000-08-23 21:33:05 +000014439fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014440CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014441
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014442{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
14443echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014444# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000014445if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014446 enableval=$enable_toolbox_glue;
14447fi
Jack Jansene578a632001-08-15 01:27:14 +000014448
14449
14450if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000014451then
Jack Jansene578a632001-08-15 01:27:14 +000014452 case $ac_sys_system/$ac_sys_release in
14453 Darwin/*)
14454 enable_toolbox_glue="yes";;
14455 *)
14456 enable_toolbox_glue="no";;
14457 esac
14458fi
14459case "$enable_toolbox_glue" in
14460yes)
Jack Jansene578a632001-08-15 01:27:14 +000014461 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014462 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000014463
14464cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014465#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014466_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014467
14468 ;;
14469*)
Jack Jansene578a632001-08-15 01:27:14 +000014470 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000014471 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000014472 ;;
14473esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014474{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
14475echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014476
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014477
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014478
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014479case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014480 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014481 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14482 ;;
14483 Darwin/*)
14484 OTHER_LIBTOOL_OPT=""
14485 ;;
14486esac
14487
14488
Ronald Oussoren25967582009-09-06 10:00:26 +000014489ARCH_RUN_32BIT=""
14490
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014491case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014492 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000014493 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14494 if test "${enable_universalsdk}"; then
14495 :
14496 else
Ronald Oussoren25967582009-09-06 10:00:26 +000014497 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014498 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014499 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014500 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014501 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014502 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
14503 if test ${gcc_version} '<' 4.0
14504 then
14505 LIBTOOL_CRUFT="-lcc_dynamic"
14506 else
14507 LIBTOOL_CRUFT=""
14508 fi
Ronald Oussoren25967582009-09-06 10:00:26 +000014509 if test "$cross_compiling" = yes; then
Ronald Oussoren23d92532009-09-07 06:12:00 +000014510 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +000014511else
14512 cat >conftest.$ac_ext <<_ACEOF
14513/* confdefs.h. */
14514_ACEOF
14515cat confdefs.h >>conftest.$ac_ext
14516cat >>conftest.$ac_ext <<_ACEOF
14517/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +000014518
Ronald Oussoren25967582009-09-06 10:00:26 +000014519 #include <unistd.h>
14520 int main(int argc, char*argv[])
14521 {
14522 if (sizeof(long) == 4) {
14523 return 0;
14524 } else {
14525 return 1;
14526 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +000014527 }
Ronald Oussoren23d92532009-09-07 06:12:00 +000014528
Ronald Oussoren25967582009-09-06 10:00:26 +000014529_ACEOF
14530rm -f conftest$ac_exeext
14531if { (ac_try="$ac_link"
14532case "(($ac_try" in
14533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14534 *) ac_try_echo=$ac_try;;
14535esac
14536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14537 (eval "$ac_link") 2>&5
14538 ac_status=$?
14539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14540 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14541 { (case "(($ac_try" in
14542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14543 *) ac_try_echo=$ac_try;;
14544esac
14545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14546 (eval "$ac_try") 2>&5
14547 ac_status=$?
14548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14549 (exit $ac_status); }; }; then
14550 ac_osx_32bit=yes
14551else
14552 echo "$as_me: program exited with status $ac_status" >&5
14553echo "$as_me: failed program was:" >&5
14554sed 's/^/| /' conftest.$ac_ext >&5
14555
14556( exit $ac_status )
14557ac_osx_32bit=no
14558fi
14559rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14560fi
14561
14562
14563
14564 if test "${ac_osx_32bit}" = "yes"; then
14565 case `arch` in
14566 i386)
14567 MACOSX_DEFAULT_ARCH="i386"
14568 ;;
14569 ppc)
14570 MACOSX_DEFAULT_ARCH="ppc"
14571 ;;
14572 *)
14573 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14574echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14575 { (exit 1); exit 1; }; }
14576 ;;
14577 esac
14578 else
14579 case `arch` in
14580 i386)
14581 MACOSX_DEFAULT_ARCH="x86_64"
14582 ;;
14583 ppc)
14584 MACOSX_DEFAULT_ARCH="ppc64"
14585 ;;
14586 *)
14587 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14588echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14589 { (exit 1); exit 1; }; }
14590 ;;
14591 esac
14592
14593 #ARCH_RUN_32BIT="true"
14594 fi
14595
14596 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014597 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014598 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014599esac
14600
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014601{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14602echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014603if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014604then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014605 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014606 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014607 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014608
Martin v. Löwis11437992002-04-12 09:54:03 +000014609cat >>confdefs.h <<\_ACEOF
14610#define WITH_NEXT_FRAMEWORK 1
14611_ACEOF
14612
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014613 { echo "$as_me:$LINENO: result: yes" >&5
14614echo "${ECHO_T}yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +000014615 if test $enable_shared = "yes"
14616 then
Ronald Oussoren9ebd2422009-09-29 13:00:44 +000014617 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." >&5
14618echo "$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 +000014619 { (exit 1); exit 1; }; }
14620 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014621else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014622 { echo "$as_me:$LINENO: result: no" >&5
14623echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014624fi
14625
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014626{ echo "$as_me:$LINENO: checking for dyld" >&5
14627echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014628case $ac_sys_system/$ac_sys_release in
14629 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014630
Martin v. Löwis11437992002-04-12 09:54:03 +000014631cat >>confdefs.h <<\_ACEOF
14632#define WITH_DYLD 1
14633_ACEOF
14634
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014635 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14636echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014637 ;;
14638 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014639 { echo "$as_me:$LINENO: result: no" >&5
14640echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014641 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014642esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014643
Guido van Rossum0a516c91994-09-12 10:58:40 +000014644# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014645
Michael W. Hudson54241132001-12-07 15:38:26 +000014646
14647
14648
14649
Guido van Rossum0a516c91994-09-12 10:58:40 +000014650# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014651# -- usually .so, .sl on HP-UX, .dll on Cygwin
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014652{ echo "$as_me:$LINENO: checking SO" >&5
14653echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014654if test -z "$SO"
14655then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014656 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000014657 hp*|HP*)
14658 case `uname -m` in
14659 ia64) SO=.so;;
14660 *) SO=.sl;;
14661 esac
14662 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014663 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014664 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014665 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014666else
14667 # this might also be a termcap variable, see #610332
14668 echo
14669 echo '====================================================================='
14670 echo '+ +'
14671 echo '+ WARNING: You have set SO in your environment. +'
14672 echo '+ Do you really mean to change the extension for shared libraries? +'
14673 echo '+ Continuing in 10 seconds to let you to ponder. +'
14674 echo '+ +'
14675 echo '====================================================================='
14676 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014677fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014678{ echo "$as_me:$LINENO: result: $SO" >&5
14679echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000014680
Ronald Oussoren79f90492009-01-02 10:44:46 +000014681
Neal Norwitz58e28882006-05-19 07:00:58 +000014682cat >>confdefs.h <<_ACEOF
14683#define SHLIB_EXT "$SO"
14684_ACEOF
14685
Guido van Rossum0a516c91994-09-12 10:58:40 +000014686# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014687# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014688# (Shared libraries in this instance are shared modules to be loaded into
14689# Python, as opposed to building Python itself as a shared library.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014690{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14691echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014692if test -z "$LDSHARED"
14693then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014694 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014695 AIX*)
14696 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014697 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014698 ;;
14699 BeOS*)
14700 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000014701 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014702 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014703 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014704 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014705 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000014706 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014707 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014708 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000014709 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000014710 hp*|HP*)
14711 if test "$GCC" = "yes"
14712 then LDSHARED='$(CC) -shared'
14713 else LDSHARED='ld -b';
14714 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014715 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014716 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014717 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14718 if test "$enable_framework" ; then
14719 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014720 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14721 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014722 else
14723 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014724 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014725 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014726 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014727 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14728 if test "$enable_framework" ; then
14729 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014730 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14731 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014732 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014733 # No framework, use the Python app as bundle-loader
14734 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014735 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014736 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014737 Darwin/*)
14738 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14739 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000014740
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014741 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014742 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000014743 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014744 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014745 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014746 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14747 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014748 else
14749 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14750 if test "$enable_framework" ; then
14751 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014752 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14753 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014754 else
14755 # No framework, use the Python app as bundle-loader
14756 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14757 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14758 fi
14759 fi
14760 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014761 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014762 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014763 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014764 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014765 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014766 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014767 else
14768 LDSHARED="ld -Bshareable ${LDFLAGS}"
14769 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014770 OpenBSD*)
14771 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14772 then
14773 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14774 else
14775 case `uname -r` in
14776 [01].* | 2.[0-7] | 2.[0-7].*)
14777 LDSHARED="ld -Bshareable ${LDFLAGS}"
14778 ;;
14779 *)
14780 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14781 ;;
14782 esac
14783 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014784 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014785 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014786 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014787 then LDSHARED='$(CC) -shared'
14788 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014789 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014790 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014791 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014792 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014793 *) LDSHARED="ld";;
14794 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014795fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014796{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14797echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014798BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014799# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014800# library (module) -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014801{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14802echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014803if test -z "$CCSHARED"
14804then
Guido van Rossum07397971997-04-29 21:49:50 +000014805 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014806 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000014807 then CCSHARED="-fPIC";
14808 elif test `uname -p` = sparc;
14809 then CCSHARED="-xcode=pic32";
14810 else CCSHARED="-Kpic";
14811 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014812 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014813 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014814 else CCSHARED="+z";
14815 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014816 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014817 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014818 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014819 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014820 if test "$GCC" = "yes"
14821 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014822 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014823 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014824 SCO_SV*)
14825 if test "$GCC" = "yes"
14826 then CCSHARED="-fPIC"
14827 else CCSHARED="-Kpic -belf"
14828 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014829 IRIX*/6*) case $CC in
14830 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014831 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014832 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014833 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014834 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014835fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014836{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14837echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014838# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014839# the python executable -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014840{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14841echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014842if test -z "$LINKFORSHARED"
14843then
Guido van Rossum07397971997-04-29 21:49:50 +000014844 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014845 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014846 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014847 LINKFORSHARED="-Wl,-E -Wl,+s";;
14848# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014849 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014850 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014851 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014852 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014853 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
14854 # which is
Jack Jansene578a632001-08-15 01:27:14 +000014855 # not used by the core itself but which needs to be in the core so
14856 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000014857 # -prebind is no longer used, because it actually seems to give a
14858 # slowdown in stead of a speedup, maybe due to the large number of
14859 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014860
14861 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000014862 if test "$enable_framework"
14863 then
Jack Jansenda49e192005-01-07 13:08:22 +000014864 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014865 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014866 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014867 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014868 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014869 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014870 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014871 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14872 then
14873 LINKFORSHARED="-Wl,--export-dynamic"
14874 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014875 SunOS/5*) case $CC in
14876 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014877 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014878 then
14879 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014880 fi;;
14881 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014882 CYGWIN*)
14883 if test $enable_shared = "no"
14884 then
14885 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14886 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014887 QNX*)
14888 # -Wl,-E causes the symbols to be added to the dynamic
14889 # symbol table so that they can be found when a module
14890 # is loaded. -N 2048K causes the stack size to be set
14891 # to 2048 kilobytes so that the stack doesn't overflow
14892 # when running test_compile.py.
14893 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014894 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014895fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014896{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14897echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014898
Michael W. Hudson54241132001-12-07 15:38:26 +000014899
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014900
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014901{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14902echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014903if test ! "$LIBRARY" = "$LDLIBRARY"
14904then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014905 case $ac_sys_system in
14906 CYGWIN*)
14907 # Cygwin needs CCSHARED when building extension DLLs
14908 # but not when building the interpreter DLL.
14909 CFLAGSFORSHARED='';;
14910 *)
14911 CFLAGSFORSHARED='$(CCSHARED)'
14912 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014913fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014914{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14915echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014916
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014917# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14918# library (with --enable-shared).
14919# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014920# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14921# if it is not required, since it creates a dependency of the shared library
14922# to LIBS. This, in turn, means that applications linking the shared libpython
14923# don't need to link LIBS explicitly. The default should be only changed
14924# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014925
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014926{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14927echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014928case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014929 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014930 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014931esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014932{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14933echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014934
14935
Guido van Rossum627b2d71993-12-24 10:39:16 +000014936# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014937
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014938{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14939echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014940if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014941 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014942else
Martin v. Löwis11437992002-04-12 09:54:03 +000014943 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014944LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014945cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014946/* confdefs.h. */
14947_ACEOF
14948cat confdefs.h >>conftest.$ac_ext
14949cat >>conftest.$ac_ext <<_ACEOF
14950/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014951
Martin v. Löwiseba40652007-08-30 20:10:57 +000014952/* Override any GCC internal prototype to avoid an error.
14953 Use char because int might match the return type of a GCC
14954 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014955#ifdef __cplusplus
14956extern "C"
14957#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014958char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014959int
14960main ()
14961{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014962return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014963 ;
14964 return 0;
14965}
14966_ACEOF
14967rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014968if { (ac_try="$ac_link"
14969case "(($ac_try" in
14970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14971 *) ac_try_echo=$ac_try;;
14972esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014973eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014974 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014975 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014976 grep -v '^ *+' conftest.er1 >conftest.err
14977 rm -f conftest.er1
14978 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014980 (exit $ac_status); } && {
14981 test -z "$ac_c_werror_flag" ||
14982 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014983 } && test -s conftest$ac_exeext &&
14984 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014985 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014986else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014987 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014988sed 's/^/| /' conftest.$ac_ext >&5
14989
Martin v. Löwiseba40652007-08-30 20:10:57 +000014990 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014991fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014992
14993rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014994 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014995LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014996fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014997{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
14998echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
14999if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015000 cat >>confdefs.h <<_ACEOF
15001#define HAVE_LIBDL 1
15002_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015003
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015004 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015005
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015006fi
15007 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000015008
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015009{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
15010echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015011if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015012 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015013else
Martin v. Löwis11437992002-04-12 09:54:03 +000015014 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015015LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015016cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015017/* confdefs.h. */
15018_ACEOF
15019cat confdefs.h >>conftest.$ac_ext
15020cat >>conftest.$ac_ext <<_ACEOF
15021/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015022
Martin v. Löwiseba40652007-08-30 20:10:57 +000015023/* Override any GCC internal prototype to avoid an error.
15024 Use char because int might match the return type of a GCC
15025 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015026#ifdef __cplusplus
15027extern "C"
15028#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015029char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015030int
15031main ()
15032{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015033return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015034 ;
15035 return 0;
15036}
15037_ACEOF
15038rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015039if { (ac_try="$ac_link"
15040case "(($ac_try" in
15041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15042 *) ac_try_echo=$ac_try;;
15043esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015045 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015046 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015047 grep -v '^ *+' conftest.er1 >conftest.err
15048 rm -f conftest.er1
15049 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015051 (exit $ac_status); } && {
15052 test -z "$ac_c_werror_flag" ||
15053 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015054 } && test -s conftest$ac_exeext &&
15055 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015056 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015057else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015058 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015059sed 's/^/| /' conftest.$ac_ext >&5
15060
Martin v. Löwiseba40652007-08-30 20:10:57 +000015061 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015062fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015063
15064rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015065 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015066LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015067fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015068{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
15069echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
15070if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015071 cat >>confdefs.h <<_ACEOF
15072#define HAVE_LIBDLD 1
15073_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015074
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015075 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015076
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015077fi
15078 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000015079
Ronald Oussoren79f90492009-01-02 10:44:46 +000015080# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000015081if test "$with_threads" = "yes" -o -z "$with_threads"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015082 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
15083echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015084if test "${ac_cv_search_sem_init+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015085 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015086else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015087 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000015088cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015089/* confdefs.h. */
15090_ACEOF
15091cat confdefs.h >>conftest.$ac_ext
15092cat >>conftest.$ac_ext <<_ACEOF
15093/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015094
Martin v. Löwiseba40652007-08-30 20:10:57 +000015095/* Override any GCC internal prototype to avoid an error.
15096 Use char because int might match the return type of a GCC
15097 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015098#ifdef __cplusplus
15099extern "C"
15100#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015101char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015102int
15103main ()
15104{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015105return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015106 ;
15107 return 0;
15108}
15109_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015110for ac_lib in '' pthread rt posix4; do
15111 if test -z "$ac_lib"; then
15112 ac_res="none required"
15113 else
15114 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000015115 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015116 fi
15117 rm -f conftest.$ac_objext conftest$ac_exeext
15118if { (ac_try="$ac_link"
15119case "(($ac_try" in
15120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15121 *) ac_try_echo=$ac_try;;
15122esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015124 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000015125 ac_status=$?
15126 grep -v '^ *+' conftest.er1 >conftest.err
15127 rm -f conftest.er1
15128 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015130 (exit $ac_status); } && {
15131 test -z "$ac_c_werror_flag" ||
15132 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015133 } && test -s conftest$ac_exeext &&
15134 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015135 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000015136else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015137 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015138sed 's/^/| /' conftest.$ac_ext >&5
15139
Martin v. Löwiseba40652007-08-30 20:10:57 +000015140
Brett Cannon19fab762007-06-02 03:02:29 +000015141fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015142
15143rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15144 conftest$ac_exeext
15145 if test "${ac_cv_search_sem_init+set}" = set; then
15146 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000015147fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015148done
15149if test "${ac_cv_search_sem_init+set}" = set; then
15150 :
15151else
15152 ac_cv_search_sem_init=no
15153fi
15154rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015155LIBS=$ac_func_search_save_LIBS
15156fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015157{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15158echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015159ac_res=$ac_cv_search_sem_init
15160if test "$ac_res" != no; then
15161 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015162
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015163fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015164 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015165 # posix4 on Solaris 2.6
15166 # pthread (first!) on Linux
15167fi
15168
Martin v. Löwis19d17342003-06-14 21:03:05 +000015169# check if we need libintl for locale functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015170{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15171echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015172if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015173 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015174else
15175 ac_check_lib_save_LIBS=$LIBS
15176LIBS="-lintl $LIBS"
15177cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015178/* confdefs.h. */
15179_ACEOF
15180cat confdefs.h >>conftest.$ac_ext
15181cat >>conftest.$ac_ext <<_ACEOF
15182/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015183
Martin v. Löwiseba40652007-08-30 20:10:57 +000015184/* Override any GCC internal prototype to avoid an error.
15185 Use char because int might match the return type of a GCC
15186 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015187#ifdef __cplusplus
15188extern "C"
15189#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015190char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015191int
15192main ()
15193{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015194return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015195 ;
15196 return 0;
15197}
15198_ACEOF
15199rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015200if { (ac_try="$ac_link"
15201case "(($ac_try" in
15202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15203 *) ac_try_echo=$ac_try;;
15204esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015206 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015207 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015208 grep -v '^ *+' conftest.er1 >conftest.err
15209 rm -f conftest.er1
15210 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015212 (exit $ac_status); } && {
15213 test -z "$ac_c_werror_flag" ||
15214 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015215 } && test -s conftest$ac_exeext &&
15216 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015217 ac_cv_lib_intl_textdomain=yes
15218else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015219 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015220sed 's/^/| /' conftest.$ac_ext >&5
15221
Martin v. Löwiseba40652007-08-30 20:10:57 +000015222 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015223fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015224
15225rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015226 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015227LIBS=$ac_check_lib_save_LIBS
15228fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015229{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15230echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15231if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015232
15233cat >>confdefs.h <<\_ACEOF
15234#define WITH_LIBINTL 1
15235_ACEOF
15236
15237fi
15238
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015239
15240# checks for system dependent C++ extensions support
15241case "$ac_sys_system" in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015242 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15243echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015244 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015245/* confdefs.h. */
15246_ACEOF
15247cat confdefs.h >>conftest.$ac_ext
15248cat >>conftest.$ac_ext <<_ACEOF
15249/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015250#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015251int
15252main ()
15253{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015254loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015255 ;
15256 return 0;
15257}
15258_ACEOF
15259rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015260if { (ac_try="$ac_link"
15261case "(($ac_try" in
15262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15263 *) ac_try_echo=$ac_try;;
15264esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015266 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015267 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015268 grep -v '^ *+' conftest.er1 >conftest.err
15269 rm -f conftest.er1
15270 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015272 (exit $ac_status); } && {
15273 test -z "$ac_c_werror_flag" ||
15274 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015275 } && test -s conftest$ac_exeext &&
15276 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015277
Martin v. Löwis11437992002-04-12 09:54:03 +000015278cat >>confdefs.h <<\_ACEOF
15279#define AIX_GENUINE_CPLUSPLUS 1
15280_ACEOF
15281
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015282 { echo "$as_me:$LINENO: result: yes" >&5
15283echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015284else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015285 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015286sed 's/^/| /' conftest.$ac_ext >&5
15287
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015288 { echo "$as_me:$LINENO: result: no" >&5
15289echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015290fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015291
15292rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015293 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015294 *) ;;
15295esac
15296
Guido van Rossum70c7f481998-03-26 18:44:10 +000015297# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015298# BeOS' sockets are stashed in libnet.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015299{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15300echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015301if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015302 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015303else
Martin v. Löwis11437992002-04-12 09:54:03 +000015304 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015305LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015306cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015307/* confdefs.h. */
15308_ACEOF
15309cat confdefs.h >>conftest.$ac_ext
15310cat >>conftest.$ac_ext <<_ACEOF
15311/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015312
Martin v. Löwiseba40652007-08-30 20:10:57 +000015313/* Override any GCC internal prototype to avoid an error.
15314 Use char because int might match the return type of a GCC
15315 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015316#ifdef __cplusplus
15317extern "C"
15318#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015319char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015320int
15321main ()
15322{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015323return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015324 ;
15325 return 0;
15326}
15327_ACEOF
15328rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015329if { (ac_try="$ac_link"
15330case "(($ac_try" in
15331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15332 *) ac_try_echo=$ac_try;;
15333esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015335 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015336 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015337 grep -v '^ *+' conftest.er1 >conftest.err
15338 rm -f conftest.er1
15339 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015341 (exit $ac_status); } && {
15342 test -z "$ac_c_werror_flag" ||
15343 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015344 } && test -s conftest$ac_exeext &&
15345 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015346 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015347else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015348 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015349sed 's/^/| /' conftest.$ac_ext >&5
15350
Martin v. Löwiseba40652007-08-30 20:10:57 +000015351 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015352fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015353
15354rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015355 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015356LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015357fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015358{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15359echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15360if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015361 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015362fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015363 # SVR4
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015364{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15365echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015366if test "${ac_cv_lib_socket_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015367 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015368else
Martin v. Löwis11437992002-04-12 09:54:03 +000015369 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015370LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015371cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015372/* confdefs.h. */
15373_ACEOF
15374cat confdefs.h >>conftest.$ac_ext
15375cat >>conftest.$ac_ext <<_ACEOF
15376/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015377
Martin v. Löwiseba40652007-08-30 20:10:57 +000015378/* Override any GCC internal prototype to avoid an error.
15379 Use char because int might match the return type of a GCC
15380 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015381#ifdef __cplusplus
15382extern "C"
15383#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015384char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015385int
15386main ()
15387{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015388return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015389 ;
15390 return 0;
15391}
15392_ACEOF
15393rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015394if { (ac_try="$ac_link"
15395case "(($ac_try" in
15396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15397 *) ac_try_echo=$ac_try;;
15398esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015400 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015401 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015402 grep -v '^ *+' conftest.er1 >conftest.err
15403 rm -f conftest.er1
15404 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015406 (exit $ac_status); } && {
15407 test -z "$ac_c_werror_flag" ||
15408 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015409 } && test -s conftest$ac_exeext &&
15410 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015411 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015412else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015413 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015414sed 's/^/| /' conftest.$ac_ext >&5
15415
Martin v. Löwiseba40652007-08-30 20:10:57 +000015416 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015417fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015418
15419rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015420 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015421LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015422fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015423{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15424echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15425if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015426 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015427fi
15428 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015429
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000015430case "$ac_sys_system" in
15431BeOS*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015432{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
15433echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015434if test "${ac_cv_lib_net_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015435 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015436else
Martin v. Löwis11437992002-04-12 09:54:03 +000015437 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015438LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015439cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015440/* confdefs.h. */
15441_ACEOF
15442cat confdefs.h >>conftest.$ac_ext
15443cat >>conftest.$ac_ext <<_ACEOF
15444/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015445
Martin v. Löwiseba40652007-08-30 20:10:57 +000015446/* Override any GCC internal prototype to avoid an error.
15447 Use char because int might match the return type of a GCC
15448 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015449#ifdef __cplusplus
15450extern "C"
15451#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015452char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015453int
15454main ()
15455{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015456return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015457 ;
15458 return 0;
15459}
15460_ACEOF
15461rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015462if { (ac_try="$ac_link"
15463case "(($ac_try" in
15464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15465 *) ac_try_echo=$ac_try;;
15466esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015468 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015469 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015470 grep -v '^ *+' conftest.er1 >conftest.err
15471 rm -f conftest.er1
15472 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015474 (exit $ac_status); } && {
15475 test -z "$ac_c_werror_flag" ||
15476 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015477 } && test -s conftest$ac_exeext &&
15478 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015479 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015480else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015481 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015482sed 's/^/| /' conftest.$ac_ext >&5
15483
Martin v. Löwiseba40652007-08-30 20:10:57 +000015484 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000015485fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015486
15487rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015488 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015489LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015490fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015491{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
15492echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
15493if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015494 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015495fi
15496 # BeOS
15497;;
15498esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000015499
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015500{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15501echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015502
Martin v. Löwiseba40652007-08-30 20:10:57 +000015503# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015504if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015505 withval=$with_libs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015506{ echo "$as_me:$LINENO: result: $withval" >&5
15507echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015508LIBS="$withval $LIBS"
15509
15510else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015511 { echo "$as_me:$LINENO: result: no" >&5
15512echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015513fi
15514
Guido van Rossum7f43da71994-08-01 12:15:30 +000015515
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015516# Check for use of the system libffi library
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015517{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15518echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015519
Martin v. Löwiseba40652007-08-30 20:10:57 +000015520# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015521if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015522 withval=$with_system_ffi;
15523fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015524
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015525
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015526{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15527echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015528
Benjamin Peterson867475c2009-04-29 20:36:25 +000015529# Check for --with-dbmliborder
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015530{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15531echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015532
15533# Check whether --with-dbmliborder was given.
15534if test "${with_dbmliborder+set}" = set; then
15535 withval=$with_dbmliborder;
15536if test x$with_dbmliborder = xyes
15537then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015538{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15539echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015540 { (exit 1); exit 1; }; }
15541else
15542 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15543 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15544 then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015545 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15546echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015547 { (exit 1); exit 1; }; }
15548 fi
15549 done
15550fi
15551fi
15552
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015553{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15554echo "${ECHO_T}$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015555
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015556# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015557
15558
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015559{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15560echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015561
Martin v. Löwiseba40652007-08-30 20:10:57 +000015562# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015563if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015564 withval=$with_signal_module;
15565fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015566
15567
15568if test -z "$with_signal_module"
15569then with_signal_module="yes"
15570fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015571{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15572echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015573
15574if test "${with_signal_module}" = "yes"; then
15575 USE_SIGNAL_MODULE=""
15576 SIGNAL_OBJS=""
15577else
15578 USE_SIGNAL_MODULE="#"
15579 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15580fi
15581
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015582# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015583
Barry Warsawc0d24d82000-06-29 16:12:00 +000015584USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015585
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015586{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15587echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015588
Guido van Rossumec2f0731997-01-22 20:54:01 +000015589
Martin v. Löwiseba40652007-08-30 20:10:57 +000015590# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015591if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015592 withval=$with_dec_threads;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015593{ echo "$as_me:$LINENO: result: $withval" >&5
15594echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015595LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015596if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015597 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015598fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015599else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015600 { echo "$as_me:$LINENO: result: no" >&5
15601echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015602fi
15603
Martin v. Löwis11437992002-04-12 09:54:03 +000015604
15605# Templates for things AC_DEFINEd more than once.
15606# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015607
15608
Martin v. Löwis11437992002-04-12 09:54:03 +000015609
15610
15611
15612
15613
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015614{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15615echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015616
Martin v. Löwiseba40652007-08-30 20:10:57 +000015617# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015618if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015619 withval=$with_threads;
15620fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015621
15622
Barry Warsawc0d24d82000-06-29 16:12:00 +000015623# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015624
Martin v. Löwiseba40652007-08-30 20:10:57 +000015625# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015626if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015627 withval=$with_thread; with_threads=$with_thread
15628fi
15629
Barry Warsawc0d24d82000-06-29 16:12:00 +000015630
15631if test -z "$with_threads"
15632then with_threads="yes"
15633fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015634{ echo "$as_me:$LINENO: result: $with_threads" >&5
15635echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000015636
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015637
Barry Warsawc0d24d82000-06-29 16:12:00 +000015638if test "$with_threads" = "no"
15639then
15640 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015641elif test "$ac_cv_pthread_is_default" = yes
15642then
Martin v. Löwis11437992002-04-12 09:54:03 +000015643 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015644#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015645_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015646
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015647 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015648 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015649#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015650_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015651
15652 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015653 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015654elif test "$ac_cv_kpthread" = "yes"
15655then
15656 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015657 if test "$ac_cv_cxx_thread" = "yes"; then
15658 CXX="$CXX -Kpthread"
15659 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015660 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015661#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015662_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015663
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015664 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015665 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015666elif test "$ac_cv_kthread" = "yes"
15667then
15668 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015669 if test "$ac_cv_cxx_thread" = "yes"; then
15670 CXX="$CXX -Kthread"
15671 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015672 cat >>confdefs.h <<\_ACEOF
15673#define WITH_THREAD 1
15674_ACEOF
15675
15676 posix_threads=yes
15677 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015678elif test "$ac_cv_pthread" = "yes"
15679then
15680 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015681 if test "$ac_cv_cxx_thread" = "yes"; then
15682 CXX="$CXX -pthread"
15683 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015684 cat >>confdefs.h <<\_ACEOF
15685#define WITH_THREAD 1
15686_ACEOF
15687
15688 posix_threads=yes
15689 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015690else
15691 if test ! -z "$with_threads" -a -d "$with_threads"
15692 then LDFLAGS="$LDFLAGS -L$with_threads"
15693 fi
15694 if test ! -z "$withval" -a -d "$withval"
15695 then LDFLAGS="$LDFLAGS -L$withval"
15696 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015697
15698 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015699 # define _POSIX_THREADS in unistd.h. Some apparently don't
15700 # (e.g. gnu pth with pthread emulation)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015701 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15702echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015703 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015704/* confdefs.h. */
15705_ACEOF
15706cat confdefs.h >>conftest.$ac_ext
15707cat >>conftest.$ac_ext <<_ACEOF
15708/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015709
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015710#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015711#ifdef _POSIX_THREADS
15712yes
15713#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015714
15715_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015716if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015717 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015718 unistd_defines_pthreads=yes
15719else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015720 unistd_defines_pthreads=no
15721fi
Ronald Oussoren92919a62009-12-24 13:30:58 +000015722rm -f -r conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015723
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015724 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15725echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015726
Martin v. Löwis11437992002-04-12 09:54:03 +000015727 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015728#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015729_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015730
Martin v. Löwis11437992002-04-12 09:54:03 +000015731 if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015732 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15733echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015734if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015735 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015736fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015737{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15738echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015739else
Martin v. Löwis11437992002-04-12 09:54:03 +000015740 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015741{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15742echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015743cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015744/* confdefs.h. */
15745_ACEOF
15746cat confdefs.h >>conftest.$ac_ext
15747cat >>conftest.$ac_ext <<_ACEOF
15748/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015749$ac_includes_default
15750#include <cthreads.h>
15751_ACEOF
15752rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015753if { (ac_try="$ac_compile"
15754case "(($ac_try" in
15755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15756 *) ac_try_echo=$ac_try;;
15757esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015758eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015759 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015760 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015761 grep -v '^ *+' conftest.er1 >conftest.err
15762 rm -f conftest.er1
15763 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015765 (exit $ac_status); } && {
15766 test -z "$ac_c_werror_flag" ||
15767 test ! -s conftest.err
15768 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015769 ac_header_compiler=yes
15770else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015771 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015772sed 's/^/| /' conftest.$ac_ext >&5
15773
Martin v. Löwiseba40652007-08-30 20:10:57 +000015774 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015775fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015776
15777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015778{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15779echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015780
15781# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015782{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15783echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015784cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015785/* confdefs.h. */
15786_ACEOF
15787cat confdefs.h >>conftest.$ac_ext
15788cat >>conftest.$ac_ext <<_ACEOF
15789/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015790#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015791_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015792if { (ac_try="$ac_cpp conftest.$ac_ext"
15793case "(($ac_try" in
15794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15795 *) ac_try_echo=$ac_try;;
15796esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015798 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015799 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015800 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015801 rm -f conftest.er1
15802 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015804 (exit $ac_status); } >/dev/null && {
15805 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15806 test ! -s conftest.err
15807 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015808 ac_header_preproc=yes
15809else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015810 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015811sed 's/^/| /' conftest.$ac_ext >&5
15812
Martin v. Löwis11437992002-04-12 09:54:03 +000015813 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015814fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015815
Martin v. Löwis11437992002-04-12 09:54:03 +000015816rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015817{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15818echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015819
15820# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015821case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15822 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015823 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15824echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15825 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15826echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015827 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015828 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015829 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015830 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15831echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15832 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15833echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15834 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15835echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15836 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15837echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15838 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15839echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15840 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15841echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015842 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000015843## -------------------------------------- ##
15844## Report this to http://bugs.python.org/ ##
15845## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015846_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015847 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015848 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015849esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015850{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15851echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015852if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015853 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015854else
15855 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015856fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015857{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15858echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015859
15860fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015861if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015862 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015863#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015864_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015865
Martin v. Löwis11437992002-04-12 09:54:03 +000015866 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015867#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015868_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015869
Martin v. Löwis11437992002-04-12 09:54:03 +000015870
15871cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015872#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015873_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015874
15875 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015876 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015877else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015878
Martin v. Löwis11437992002-04-12 09:54:03 +000015879 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015880 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15881echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015882if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015883 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015884fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015885{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15886echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015887else
Martin v. Löwis11437992002-04-12 09:54:03 +000015888 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015889{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15890echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015891cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015892/* confdefs.h. */
15893_ACEOF
15894cat confdefs.h >>conftest.$ac_ext
15895cat >>conftest.$ac_ext <<_ACEOF
15896/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015897$ac_includes_default
15898#include <mach/cthreads.h>
15899_ACEOF
15900rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015901if { (ac_try="$ac_compile"
15902case "(($ac_try" in
15903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15904 *) ac_try_echo=$ac_try;;
15905esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015907 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015908 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015909 grep -v '^ *+' conftest.er1 >conftest.err
15910 rm -f conftest.er1
15911 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015913 (exit $ac_status); } && {
15914 test -z "$ac_c_werror_flag" ||
15915 test ! -s conftest.err
15916 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015917 ac_header_compiler=yes
15918else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015919 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015920sed 's/^/| /' conftest.$ac_ext >&5
15921
Martin v. Löwiseba40652007-08-30 20:10:57 +000015922 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015923fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015924
15925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015926{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15927echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015928
15929# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015930{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15931echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015932cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015933/* confdefs.h. */
15934_ACEOF
15935cat confdefs.h >>conftest.$ac_ext
15936cat >>conftest.$ac_ext <<_ACEOF
15937/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015938#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015939_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015940if { (ac_try="$ac_cpp conftest.$ac_ext"
15941case "(($ac_try" in
15942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15943 *) ac_try_echo=$ac_try;;
15944esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015946 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015947 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015948 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015949 rm -f conftest.er1
15950 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015952 (exit $ac_status); } >/dev/null && {
15953 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15954 test ! -s conftest.err
15955 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015956 ac_header_preproc=yes
15957else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015958 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015959sed 's/^/| /' conftest.$ac_ext >&5
15960
Martin v. Löwis11437992002-04-12 09:54:03 +000015961 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015962fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015963
Martin v. Löwis11437992002-04-12 09:54:03 +000015964rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015965{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15966echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015967
15968# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015969case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15970 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015971 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15972echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15973 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15974echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015975 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015976 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015977 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015978 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15979echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15980 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15981echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15982 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15983echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15984 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15985echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15986 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
15987echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
15988 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
15989echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015990 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000015991## -------------------------------------- ##
15992## Report this to http://bugs.python.org/ ##
15993## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015994_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015995 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015996 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015997esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015998{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15999echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016000if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016001 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016002else
16003 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016004fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016005{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16006echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016007
16008fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016009if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016010 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016011#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016012_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016013
Martin v. Löwis11437992002-04-12 09:54:03 +000016014 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016015#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016016_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016017
Martin v. Löwis11437992002-04-12 09:54:03 +000016018
16019cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016020#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016021_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016022
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016023 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016024else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016025
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016026 { echo "$as_me:$LINENO: checking for --with-pth" >&5
16027echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016028
Martin v. Löwiseba40652007-08-30 20:10:57 +000016029# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016030if test "${with_pth+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016031 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
16032echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016033 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016034#define WITH_THREAD 1
16035_ACEOF
16036
16037
16038cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016039#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016040_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016041
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016042 LIBS="-lpth $LIBS"
16043 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016044else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016045 { echo "$as_me:$LINENO: result: no" >&5
16046echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016047
16048 # Just looking for pthread_create in libpthread is not enough:
16049 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
16050 # So we really have to include pthread.h, and then link.
16051 _libs=$LIBS
16052 LIBS="$LIBS -lpthread"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016053 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16054echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016055 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016056/* confdefs.h. */
16057_ACEOF
16058cat confdefs.h >>conftest.$ac_ext
16059cat >>conftest.$ac_ext <<_ACEOF
16060/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016061#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000016062
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016063void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000016064int
16065main ()
16066{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016067
16068pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000016069 ;
16070 return 0;
16071}
16072_ACEOF
16073rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016074if { (ac_try="$ac_link"
16075case "(($ac_try" in
16076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16077 *) ac_try_echo=$ac_try;;
16078esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016080 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016081 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016082 grep -v '^ *+' conftest.er1 >conftest.err
16083 rm -f conftest.er1
16084 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016086 (exit $ac_status); } && {
16087 test -z "$ac_c_werror_flag" ||
16088 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016089 } && test -s conftest$ac_exeext &&
16090 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016091
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016092 { echo "$as_me:$LINENO: result: yes" >&5
16093echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016094 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016095#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016096_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016097
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016098 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016099 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016100else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016101 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016102sed 's/^/| /' conftest.$ac_ext >&5
16103
Martin v. Löwis11437992002-04-12 09:54:03 +000016104
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016105 LIBS=$_libs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016106 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
16107echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016108if test "${ac_cv_func_pthread_detach+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016109 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016110else
Martin v. Löwis11437992002-04-12 09:54:03 +000016111 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016112/* confdefs.h. */
16113_ACEOF
16114cat confdefs.h >>conftest.$ac_ext
16115cat >>conftest.$ac_ext <<_ACEOF
16116/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016117/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16118 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16119#define pthread_detach innocuous_pthread_detach
16120
Guido van Rossumad678af1998-10-02 14:42:15 +000016121/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016122 which can conflict with char pthread_detach (); below.
16123 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016124 <limits.h> exists even on freestanding compilers. */
16125
16126#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016127# include <limits.h>
16128#else
16129# include <assert.h>
16130#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016131
16132#undef pthread_detach
16133
Martin v. Löwiseba40652007-08-30 20:10:57 +000016134/* Override any GCC internal prototype to avoid an error.
16135 Use char because int might match the return type of a GCC
16136 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016137#ifdef __cplusplus
16138extern "C"
16139#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016140char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016141/* The GNU C library defines this for functions which it implements
16142 to always fail with ENOSYS. Some functions are actually named
16143 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016144#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016145choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016146#endif
16147
Skip Montanaro6dead952003-09-25 14:50:04 +000016148int
16149main ()
16150{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016151return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016152 ;
16153 return 0;
16154}
16155_ACEOF
16156rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016157if { (ac_try="$ac_link"
16158case "(($ac_try" in
16159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16160 *) ac_try_echo=$ac_try;;
16161esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016163 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016164 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016165 grep -v '^ *+' conftest.er1 >conftest.err
16166 rm -f conftest.er1
16167 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016169 (exit $ac_status); } && {
16170 test -z "$ac_c_werror_flag" ||
16171 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016172 } && test -s conftest$ac_exeext &&
16173 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016174 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016175else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016176 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016177sed 's/^/| /' conftest.$ac_ext >&5
16178
Martin v. Löwiseba40652007-08-30 20:10:57 +000016179 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016180fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016181
16182rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016183 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016184fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016185{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16186echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16187if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016188 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016189#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016190_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016191
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016192 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016193 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016194else
Guido van Rossumad678af1998-10-02 14:42:15 +000016195
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016196 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016197 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16198echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016199if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016200 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016201fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016202{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16203echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016204else
16205 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016206{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
16207echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016208cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016209/* confdefs.h. */
16210_ACEOF
16211cat confdefs.h >>conftest.$ac_ext
16212cat >>conftest.$ac_ext <<_ACEOF
16213/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016214$ac_includes_default
16215#include <atheos/threads.h>
16216_ACEOF
16217rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016218if { (ac_try="$ac_compile"
16219case "(($ac_try" in
16220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16221 *) ac_try_echo=$ac_try;;
16222esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016224 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016225 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016226 grep -v '^ *+' conftest.er1 >conftest.err
16227 rm -f conftest.er1
16228 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016230 (exit $ac_status); } && {
16231 test -z "$ac_c_werror_flag" ||
16232 test ! -s conftest.err
16233 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016234 ac_header_compiler=yes
16235else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016236 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016237sed 's/^/| /' conftest.$ac_ext >&5
16238
Martin v. Löwiseba40652007-08-30 20:10:57 +000016239 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016240fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016241
16242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016243{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16244echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016245
16246# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016247{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
16248echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016249cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016250/* confdefs.h. */
16251_ACEOF
16252cat confdefs.h >>conftest.$ac_ext
16253cat >>conftest.$ac_ext <<_ACEOF
16254/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016255#include <atheos/threads.h>
16256_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016257if { (ac_try="$ac_cpp conftest.$ac_ext"
16258case "(($ac_try" in
16259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16260 *) ac_try_echo=$ac_try;;
16261esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016263 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016264 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016265 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016266 rm -f conftest.er1
16267 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016269 (exit $ac_status); } >/dev/null && {
16270 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16271 test ! -s conftest.err
16272 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016273 ac_header_preproc=yes
16274else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016275 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016276sed 's/^/| /' conftest.$ac_ext >&5
16277
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016278 ac_header_preproc=no
16279fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016280
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016281rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016282{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16283echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016284
16285# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016286case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16287 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016288 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16289echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16290 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
16291echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016292 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016293 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016294 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016295 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
16296echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
16297 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
16298echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
16299 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
16300echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
16301 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
16302echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16303 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
16304echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
16305 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
16306echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016307 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016308## -------------------------------------- ##
16309## Report this to http://bugs.python.org/ ##
16310## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016311_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016312 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016313 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016314esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016315{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16316echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016317if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016318 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016319else
16320 ac_cv_header_atheos_threads_h=$ac_header_preproc
16321fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016322{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16323echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016324
16325fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016326if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016327 cat >>confdefs.h <<\_ACEOF
16328#define WITH_THREAD 1
16329_ACEOF
16330
16331
16332cat >>confdefs.h <<\_ACEOF
16333#define ATHEOS_THREADS 1
16334_ACEOF
16335
16336 THREADOBJ="Python/thread.o"
16337else
16338
Martin v. Löwis11437992002-04-12 09:54:03 +000016339 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016340 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16341echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016342if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016343 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016344fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016345{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16346echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016347else
Martin v. Löwis11437992002-04-12 09:54:03 +000016348 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016349{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
16350echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016351cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016352/* confdefs.h. */
16353_ACEOF
16354cat confdefs.h >>conftest.$ac_ext
16355cat >>conftest.$ac_ext <<_ACEOF
16356/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016357$ac_includes_default
16358#include <kernel/OS.h>
16359_ACEOF
16360rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016361if { (ac_try="$ac_compile"
16362case "(($ac_try" in
16363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16364 *) ac_try_echo=$ac_try;;
16365esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016367 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016368 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016369 grep -v '^ *+' conftest.er1 >conftest.err
16370 rm -f conftest.er1
16371 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016373 (exit $ac_status); } && {
16374 test -z "$ac_c_werror_flag" ||
16375 test ! -s conftest.err
16376 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016377 ac_header_compiler=yes
16378else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016379 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016380sed 's/^/| /' conftest.$ac_ext >&5
16381
Martin v. Löwiseba40652007-08-30 20:10:57 +000016382 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016383fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016384
16385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016386{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16387echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016388
16389# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016390{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
16391echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016392cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016393/* confdefs.h. */
16394_ACEOF
16395cat confdefs.h >>conftest.$ac_ext
16396cat >>conftest.$ac_ext <<_ACEOF
16397/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016398#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016399_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016400if { (ac_try="$ac_cpp conftest.$ac_ext"
16401case "(($ac_try" in
16402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16403 *) ac_try_echo=$ac_try;;
16404esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016405eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016406 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016407 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016408 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016409 rm -f conftest.er1
16410 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016412 (exit $ac_status); } >/dev/null && {
16413 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16414 test ! -s conftest.err
16415 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016416 ac_header_preproc=yes
16417else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016418 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016419sed 's/^/| /' conftest.$ac_ext >&5
16420
Martin v. Löwis11437992002-04-12 09:54:03 +000016421 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016422fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016423
Martin v. Löwis11437992002-04-12 09:54:03 +000016424rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016425{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16426echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016427
Martin v. Löwis11437992002-04-12 09:54:03 +000016428# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016429case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16430 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016431 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
16432echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16433 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
16434echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016435 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016436 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016437 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016438 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
16439echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
16440 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
16441echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
16442 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
16443echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
16444 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
16445echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
16446 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
16447echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
16448 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
16449echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016450 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016451## -------------------------------------- ##
16452## Report this to http://bugs.python.org/ ##
16453## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016454_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016455 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016456 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016457esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016458{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16459echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016460if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016461 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016462else
16463 ac_cv_header_kernel_OS_h=$ac_header_preproc
16464fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016465{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16466echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016467
16468fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016469if test $ac_cv_header_kernel_OS_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016470 cat >>confdefs.h <<\_ACEOF
16471#define WITH_THREAD 1
16472_ACEOF
16473
16474
16475cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016476#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016477_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016478
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016479 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016480else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016481
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016482 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16483echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016484if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016485 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016486else
Martin v. Löwis11437992002-04-12 09:54:03 +000016487 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016488LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016489cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016490/* confdefs.h. */
16491_ACEOF
16492cat confdefs.h >>conftest.$ac_ext
16493cat >>conftest.$ac_ext <<_ACEOF
16494/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016495
Martin v. Löwiseba40652007-08-30 20:10:57 +000016496/* Override any GCC internal prototype to avoid an error.
16497 Use char because int might match the return type of a GCC
16498 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016499#ifdef __cplusplus
16500extern "C"
16501#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016502char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016503int
16504main ()
16505{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016506return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016507 ;
16508 return 0;
16509}
16510_ACEOF
16511rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016512if { (ac_try="$ac_link"
16513case "(($ac_try" in
16514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16515 *) ac_try_echo=$ac_try;;
16516esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016518 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016519 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016520 grep -v '^ *+' conftest.er1 >conftest.err
16521 rm -f conftest.er1
16522 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016524 (exit $ac_status); } && {
16525 test -z "$ac_c_werror_flag" ||
16526 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016527 } && test -s conftest$ac_exeext &&
16528 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016529 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016530else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016531 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016532sed 's/^/| /' conftest.$ac_ext >&5
16533
Martin v. Löwiseba40652007-08-30 20:10:57 +000016534 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016535fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016536
16537rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016538 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016539LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016540fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016541{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16542echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16543if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016544 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016545#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016546_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016547
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016548 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016549 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016550 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016551else
Greg Steinadf63d62000-07-05 10:38:09 +000016552
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016553 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16554echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016555if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016556 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016557else
Martin v. Löwis11437992002-04-12 09:54:03 +000016558 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016559LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016560cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016561/* confdefs.h. */
16562_ACEOF
16563cat confdefs.h >>conftest.$ac_ext
16564cat >>conftest.$ac_ext <<_ACEOF
16565/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016566
Martin v. Löwiseba40652007-08-30 20:10:57 +000016567/* Override any GCC internal prototype to avoid an error.
16568 Use char because int might match the return type of a GCC
16569 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016570#ifdef __cplusplus
16571extern "C"
16572#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016573char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016574int
16575main ()
16576{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016577return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016578 ;
16579 return 0;
16580}
16581_ACEOF
16582rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016583if { (ac_try="$ac_link"
16584case "(($ac_try" in
16585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16586 *) ac_try_echo=$ac_try;;
16587esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016589 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016590 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016591 grep -v '^ *+' conftest.er1 >conftest.err
16592 rm -f conftest.er1
16593 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016595 (exit $ac_status); } && {
16596 test -z "$ac_c_werror_flag" ||
16597 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016598 } && test -s conftest$ac_exeext &&
16599 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016600 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016601else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016602 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016603sed 's/^/| /' conftest.$ac_ext >&5
16604
Martin v. Löwiseba40652007-08-30 20:10:57 +000016605 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016606fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016607
16608rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016609 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016610LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016611fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016612{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16613echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16614if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016615 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016616#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016617_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016618
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016619 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016620 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016621 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016622else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016623
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016624 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16625echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016626if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016627 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016628else
Martin v. Löwis11437992002-04-12 09:54:03 +000016629 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016630LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016631cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016632/* confdefs.h. */
16633_ACEOF
16634cat confdefs.h >>conftest.$ac_ext
16635cat >>conftest.$ac_ext <<_ACEOF
16636/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016637
Martin v. Löwiseba40652007-08-30 20:10:57 +000016638/* Override any GCC internal prototype to avoid an error.
16639 Use char because int might match the return type of a GCC
16640 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016641#ifdef __cplusplus
16642extern "C"
16643#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016644char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016645int
16646main ()
16647{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016648return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016649 ;
16650 return 0;
16651}
16652_ACEOF
16653rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016654if { (ac_try="$ac_link"
16655case "(($ac_try" in
16656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16657 *) ac_try_echo=$ac_try;;
16658esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016660 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016661 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016662 grep -v '^ *+' conftest.er1 >conftest.err
16663 rm -f conftest.er1
16664 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016666 (exit $ac_status); } && {
16667 test -z "$ac_c_werror_flag" ||
16668 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016669 } && test -s conftest$ac_exeext &&
16670 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016671 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016672else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016673 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016674sed 's/^/| /' conftest.$ac_ext >&5
16675
Martin v. Löwiseba40652007-08-30 20:10:57 +000016676 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016677fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016678
16679rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016680 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016681LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016682fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016683{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16684echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16685if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016686 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016687#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016688_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016689
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016690 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016691 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016692 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016693else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016694
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016695 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16696echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016697if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016698 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016699else
Martin v. Löwis11437992002-04-12 09:54:03 +000016700 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016701LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016702cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016703/* confdefs.h. */
16704_ACEOF
16705cat confdefs.h >>conftest.$ac_ext
16706cat >>conftest.$ac_ext <<_ACEOF
16707/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016708
Martin v. Löwiseba40652007-08-30 20:10:57 +000016709/* Override any GCC internal prototype to avoid an error.
16710 Use char because int might match the return type of a GCC
16711 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016712#ifdef __cplusplus
16713extern "C"
16714#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016715char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016716int
16717main ()
16718{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016719return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016720 ;
16721 return 0;
16722}
16723_ACEOF
16724rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016725if { (ac_try="$ac_link"
16726case "(($ac_try" in
16727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16728 *) ac_try_echo=$ac_try;;
16729esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016731 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016732 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016733 grep -v '^ *+' conftest.er1 >conftest.err
16734 rm -f conftest.er1
16735 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016737 (exit $ac_status); } && {
16738 test -z "$ac_c_werror_flag" ||
16739 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016740 } && test -s conftest$ac_exeext &&
16741 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016742 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016743else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016744 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016745sed 's/^/| /' conftest.$ac_ext >&5
16746
Martin v. Löwiseba40652007-08-30 20:10:57 +000016747 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016748fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016749
16750rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016751 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016752LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016753fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016754{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16755echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16756if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016757 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016758#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016759_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016760
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016761 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016762 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016763 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016764else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016765
Martin v. Löwis130fb172001-07-19 11:00:41 +000016766 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016767fi
16768
Guido van Rossum627b2d71993-12-24 10:39:16 +000016769
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016770fi
16771
Guido van Rossum0be3e491997-05-22 20:33:33 +000016772fi
16773
Guido van Rossum49545951997-12-02 19:28:29 +000016774fi
16775
Guido van Rossumb93a8621998-05-07 13:27:32 +000016776fi
16777
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016778
Michael W. Hudson54241132001-12-07 15:38:26 +000016779fi
16780
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016781
16782fi
16783
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016784fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016785
16786rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016787 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016788fi
16789
Martin v. Löwis11437992002-04-12 09:54:03 +000016790fi
16791
16792
16793fi
16794
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016795
Michael W. Hudson54241132001-12-07 15:38:26 +000016796
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016797 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16798echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016799if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016800 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016801else
Martin v. Löwis11437992002-04-12 09:54:03 +000016802 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016803LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016804cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016805/* confdefs.h. */
16806_ACEOF
16807cat confdefs.h >>conftest.$ac_ext
16808cat >>conftest.$ac_ext <<_ACEOF
16809/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016810
Martin v. Löwiseba40652007-08-30 20:10:57 +000016811/* Override any GCC internal prototype to avoid an error.
16812 Use char because int might match the return type of a GCC
16813 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016814#ifdef __cplusplus
16815extern "C"
16816#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016817char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016818int
16819main ()
16820{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016821return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016822 ;
16823 return 0;
16824}
16825_ACEOF
16826rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016827if { (ac_try="$ac_link"
16828case "(($ac_try" in
16829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16830 *) ac_try_echo=$ac_try;;
16831esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016833 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016834 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016835 grep -v '^ *+' conftest.er1 >conftest.err
16836 rm -f conftest.er1
16837 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016839 (exit $ac_status); } && {
16840 test -z "$ac_c_werror_flag" ||
16841 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016842 } && test -s conftest$ac_exeext &&
16843 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016844 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016845else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016846 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016847sed 's/^/| /' conftest.$ac_ext >&5
16848
Martin v. Löwiseba40652007-08-30 20:10:57 +000016849 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016850fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016851
16852rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016853 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016854LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016855fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016856{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16857echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16858if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016859 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016860#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016861_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016862
Martin v. Löwis130fb172001-07-19 11:00:41 +000016863 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016864 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016865 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016866fi
16867
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016868
Neal Norwitza978ab02002-11-02 16:58:05 +000016869 if test "$posix_threads" != "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016870 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16871echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016872if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016873 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016874else
Martin v. Löwis11437992002-04-12 09:54:03 +000016875 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016876LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016877cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016878/* confdefs.h. */
16879_ACEOF
16880cat confdefs.h >>conftest.$ac_ext
16881cat >>conftest.$ac_ext <<_ACEOF
16882/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016883
Martin v. Löwiseba40652007-08-30 20:10:57 +000016884/* Override any GCC internal prototype to avoid an error.
16885 Use char because int might match the return type of a GCC
16886 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016887#ifdef __cplusplus
16888extern "C"
16889#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016890char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016891int
16892main ()
16893{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016894return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016895 ;
16896 return 0;
16897}
16898_ACEOF
16899rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016900if { (ac_try="$ac_link"
16901case "(($ac_try" in
16902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16903 *) ac_try_echo=$ac_try;;
16904esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016906 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016907 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016908 grep -v '^ *+' conftest.er1 >conftest.err
16909 rm -f conftest.er1
16910 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016912 (exit $ac_status); } && {
16913 test -z "$ac_c_werror_flag" ||
16914 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016915 } && test -s conftest$ac_exeext &&
16916 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016917 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016918else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016919 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016920sed 's/^/| /' conftest.$ac_ext >&5
16921
Martin v. Löwiseba40652007-08-30 20:10:57 +000016922 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016923fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016924
16925rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016926 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016927LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016928fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016929{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16930echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16931if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016932 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016933#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016934_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016935
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016936 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016937 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016938 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016939fi
16940
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016941 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016942
Martin v. Löwis130fb172001-07-19 11:00:41 +000016943 if test "$USE_THREAD_MODULE" != "#"
16944 then
16945 # If the above checks didn't disable threads, (at least) OSF1
16946 # needs this '-threads' argument during linking.
16947 case $ac_sys_system in
16948 OSF1) LDLAST=-threads;;
16949 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016950 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016951fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016952
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016953if test "$posix_threads" = "yes"; then
16954 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016955
16956cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016957#define _POSIX_THREADS 1
16958_ACEOF
16959
16960 fi
16961
16962 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16963 case $ac_sys_system/$ac_sys_release in
16964 SunOS/5.6)
16965cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016966#define HAVE_PTHREAD_DESTRUCTOR 1
16967_ACEOF
16968
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016969 ;;
16970 SunOS/5.8)
16971cat >>confdefs.h <<\_ACEOF
16972#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16973_ACEOF
16974
16975 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000016976 AIX/5)
16977cat >>confdefs.h <<\_ACEOF
16978#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16979_ACEOF
16980
16981 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016982 esac
16983
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016984 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16985echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016986 if test "${ac_cv_pthread_system_supported+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016987 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016988else
16989 if test "$cross_compiling" = yes; then
16990 ac_cv_pthread_system_supported=no
16991else
16992 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016993/* confdefs.h. */
16994_ACEOF
16995cat confdefs.h >>conftest.$ac_ext
16996cat >>conftest.$ac_ext <<_ACEOF
16997/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016998#include <pthread.h>
16999 void *foo(void *parm) {
17000 return NULL;
17001 }
17002 main() {
17003 pthread_attr_t attr;
17004 pthread_t id;
17005 if (pthread_attr_init(&attr)) exit(-1);
17006 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
17007 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
17008 exit(0);
17009 }
17010_ACEOF
17011rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017012if { (ac_try="$ac_link"
17013case "(($ac_try" in
17014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17015 *) ac_try_echo=$ac_try;;
17016esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017018 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017019 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017021 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017022 { (case "(($ac_try" in
17023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17024 *) ac_try_echo=$ac_try;;
17025esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017027 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017028 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017030 (exit $ac_status); }; }; then
17031 ac_cv_pthread_system_supported=yes
17032else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017033 echo "$as_me: program exited with status $ac_status" >&5
17034echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017035sed 's/^/| /' conftest.$ac_ext >&5
17036
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017037( exit $ac_status )
17038ac_cv_pthread_system_supported=no
17039fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017040rm -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 +000017041fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017042
Martin v. Löwiseba40652007-08-30 20:10:57 +000017043
17044
Guido van Rossum627b2d71993-12-24 10:39:16 +000017045fi
17046
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017047 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
17048echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017049 if test "$ac_cv_pthread_system_supported" = "yes"; then
17050
17051cat >>confdefs.h <<\_ACEOF
17052#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
17053_ACEOF
17054
17055 fi
17056
17057for ac_func in pthread_sigmask
17058do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017059as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17060{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17061echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017062if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017063 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017064else
17065 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017066/* confdefs.h. */
17067_ACEOF
17068cat confdefs.h >>conftest.$ac_ext
17069cat >>conftest.$ac_ext <<_ACEOF
17070/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017071/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17072 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17073#define $ac_func innocuous_$ac_func
17074
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017075/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017076 which can conflict with char $ac_func (); below.
17077 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017078 <limits.h> exists even on freestanding compilers. */
17079
17080#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017081# include <limits.h>
17082#else
17083# include <assert.h>
17084#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017085
17086#undef $ac_func
17087
Martin v. Löwiseba40652007-08-30 20:10:57 +000017088/* Override any GCC internal prototype to avoid an error.
17089 Use char because int might match the return type of a GCC
17090 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017091#ifdef __cplusplus
17092extern "C"
17093#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017094char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017095/* The GNU C library defines this for functions which it implements
17096 to always fail with ENOSYS. Some functions are actually named
17097 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017098#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017099choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017100#endif
17101
Skip Montanaro6dead952003-09-25 14:50:04 +000017102int
17103main ()
17104{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017105return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017106 ;
17107 return 0;
17108}
17109_ACEOF
17110rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017111if { (ac_try="$ac_link"
17112case "(($ac_try" in
17113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17114 *) ac_try_echo=$ac_try;;
17115esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017117 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017118 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017119 grep -v '^ *+' conftest.er1 >conftest.err
17120 rm -f conftest.er1
17121 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017123 (exit $ac_status); } && {
17124 test -z "$ac_c_werror_flag" ||
17125 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017126 } && test -s conftest$ac_exeext &&
17127 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017128 eval "$as_ac_var=yes"
17129else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017130 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017131sed 's/^/| /' conftest.$ac_ext >&5
17132
Martin v. Löwiseba40652007-08-30 20:10:57 +000017133 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017134fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017135
17136rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017137 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017138fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017139ac_res=`eval echo '${'$as_ac_var'}'`
17140 { echo "$as_me:$LINENO: result: $ac_res" >&5
17141echo "${ECHO_T}$ac_res" >&6; }
17142if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017143 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017144#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017145_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000017146 case $ac_sys_system in
17147 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017148
Jason Tishlerfac083d2003-07-22 15:20:49 +000017149cat >>confdefs.h <<\_ACEOF
17150#define HAVE_BROKEN_PTHREAD_SIGMASK 1
17151_ACEOF
17152
17153 ;;
17154 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017155fi
17156done
17157
17158fi
17159
17160
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017161# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000017162
17163
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017164{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
17165echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017166# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017167if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017168 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017169 no)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017170 { echo "$as_me:$LINENO: result: no" >&5
17171echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017172 ipv6=no
17173 ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017174 *) { echo "$as_me:$LINENO: result: yes" >&5
17175echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017176 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017177#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017178_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017179
17180 ipv6=yes
17181 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017182 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017183else
Martin v. Löwis11437992002-04-12 09:54:03 +000017184
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017185 if test "$cross_compiling" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017186 { echo "$as_me:$LINENO: result: no" >&5
17187echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017188 ipv6=no
17189
17190else
Martin v. Löwis11437992002-04-12 09:54:03 +000017191 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017192/* confdefs.h. */
17193_ACEOF
17194cat confdefs.h >>conftest.$ac_ext
17195cat >>conftest.$ac_ext <<_ACEOF
17196/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017197 /* AF_INET6 available check */
17198#include <sys/types.h>
17199#include <sys/socket.h>
17200main()
17201{
17202 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
17203 exit(1);
17204 else
17205 exit(0);
17206}
17207
Martin v. Löwis11437992002-04-12 09:54:03 +000017208_ACEOF
17209rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017210if { (ac_try="$ac_link"
17211case "(($ac_try" in
17212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17213 *) ac_try_echo=$ac_try;;
17214esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017215eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017216 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017217 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017219 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017220 { (case "(($ac_try" in
17221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17222 *) ac_try_echo=$ac_try;;
17223esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017224eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017225 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017226 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017228 (exit $ac_status); }; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017229 { echo "$as_me:$LINENO: result: yes" >&5
17230echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017231 ipv6=yes
17232else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017233 echo "$as_me: program exited with status $ac_status" >&5
17234echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017235sed 's/^/| /' conftest.$ac_ext >&5
17236
Martin v. Löwis11437992002-04-12 09:54:03 +000017237( exit $ac_status )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017238{ echo "$as_me:$LINENO: result: no" >&5
17239echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017240 ipv6=no
17241fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017242rm -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 +000017243fi
17244
Martin v. Löwiseba40652007-08-30 20:10:57 +000017245
17246
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017247if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017248 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
17249echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017250 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017251/* confdefs.h. */
17252_ACEOF
17253cat confdefs.h >>conftest.$ac_ext
17254cat >>conftest.$ac_ext <<_ACEOF
17255/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017256#include <sys/types.h>
17257#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017258int
17259main ()
17260{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017261struct sockaddr_in6 x;
17262x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000017263 ;
17264 return 0;
17265}
17266_ACEOF
17267rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017268if { (ac_try="$ac_compile"
17269case "(($ac_try" in
17270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17271 *) ac_try_echo=$ac_try;;
17272esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017274 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017275 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017276 grep -v '^ *+' conftest.er1 >conftest.err
17277 rm -f conftest.er1
17278 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017280 (exit $ac_status); } && {
17281 test -z "$ac_c_werror_flag" ||
17282 test ! -s conftest.err
17283 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017284 { echo "$as_me:$LINENO: result: yes" >&5
17285echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017286 ipv6=yes
17287else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017288 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017289sed 's/^/| /' conftest.$ac_ext >&5
17290
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017291 { echo "$as_me:$LINENO: result: no" >&5
17292echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017293 ipv6=no
17294fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017295
17296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017297fi
17298
17299if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017300 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017301#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017302_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017303
17304fi
17305
Martin v. Löwiseba40652007-08-30 20:10:57 +000017306fi
17307
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017308
17309ipv6type=unknown
17310ipv6lib=none
17311ipv6trylibc=no
17312
17313if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017314 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17315echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017316 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17317 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017318 case $i in
17319 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017320 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017321/* confdefs.h. */
17322_ACEOF
17323cat confdefs.h >>conftest.$ac_ext
17324cat >>conftest.$ac_ext <<_ACEOF
17325/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017326
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017327#include <netinet/in.h>
17328#ifdef IPV6_INRIA_VERSION
17329yes
17330#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017331_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017332if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017333 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017334 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017335fi
Ronald Oussoren92919a62009-12-24 13:30:58 +000017336rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017337
17338 ;;
17339 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017340 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017341/* confdefs.h. */
17342_ACEOF
17343cat confdefs.h >>conftest.$ac_ext
17344cat >>conftest.$ac_ext <<_ACEOF
17345/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017346
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017347#include <netinet/in.h>
17348#ifdef __KAME__
17349yes
17350#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017351_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017352if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017353 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017354 ipv6type=$i;
17355 ipv6lib=inet6
17356 ipv6libdir=/usr/local/v6/lib
17357 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017358fi
Ronald Oussoren92919a62009-12-24 13:30:58 +000017359rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017360
17361 ;;
17362 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017363 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017364/* confdefs.h. */
17365_ACEOF
17366cat confdefs.h >>conftest.$ac_ext
17367cat >>conftest.$ac_ext <<_ACEOF
17368/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017369
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017370#include <features.h>
17371#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17372yes
17373#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017374_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017375if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017376 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017377 ipv6type=$i;
17378 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017379fi
Ronald Oussoren92919a62009-12-24 13:30:58 +000017380rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017381
17382 ;;
17383 linux-inet6)
17384 if test -d /usr/inet6; then
17385 ipv6type=$i
17386 ipv6lib=inet6
17387 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017388 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017389 fi
17390 ;;
17391 solaris)
17392 if test -f /etc/netconfig; then
17393 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17394 ipv6type=$i
17395 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017396 fi
17397 fi
17398 ;;
17399 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017400 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017401/* confdefs.h. */
17402_ACEOF
17403cat confdefs.h >>conftest.$ac_ext
17404cat >>conftest.$ac_ext <<_ACEOF
17405/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017406
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017407#include <sys/param.h>
17408#ifdef _TOSHIBA_INET6
17409yes
17410#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017411_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017412if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017413 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017414 ipv6type=$i;
17415 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017416 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017417fi
Ronald Oussoren92919a62009-12-24 13:30:58 +000017418rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017419
17420 ;;
17421 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017422 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017423/* confdefs.h. */
17424_ACEOF
17425cat confdefs.h >>conftest.$ac_ext
17426cat >>conftest.$ac_ext <<_ACEOF
17427/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017428
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017429#include </usr/local/v6/include/sys/v6config.h>
17430#ifdef __V6D__
17431yes
17432#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017433_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017434if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017435 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017436 ipv6type=$i;
17437 ipv6lib=v6;
17438 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017439 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017440fi
Ronald Oussoren92919a62009-12-24 13:30:58 +000017441rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017442
17443 ;;
17444 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017445 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017446/* confdefs.h. */
17447_ACEOF
17448cat confdefs.h >>conftest.$ac_ext
17449cat >>conftest.$ac_ext <<_ACEOF
17450/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017451
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017452#include <sys/param.h>
17453#ifdef _ZETA_MINAMI_INET6
17454yes
17455#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017456_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017457if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017458 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017459 ipv6type=$i;
17460 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017461 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017462fi
Ronald Oussoren92919a62009-12-24 13:30:58 +000017463rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017464
17465 ;;
17466 esac
17467 if test "$ipv6type" != "unknown"; then
17468 break
17469 fi
17470 done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017471 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17472echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017473fi
17474
17475if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17476 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17477 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17478 echo "using lib$ipv6lib"
17479 else
17480 if test $ipv6trylibc = "yes"; then
17481 echo "using libc"
17482 else
17483 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17484 echo "You need to fetch lib$ipv6lib.a from appropriate"
17485 echo 'ipv6 kit and compile beforehand.'
17486 exit 1
17487 fi
17488 fi
17489fi
17490
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017491{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17492echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017493cat >conftest.$ac_ext <<_ACEOF
17494/* confdefs.h. */
17495_ACEOF
17496cat confdefs.h >>conftest.$ac_ext
17497cat >>conftest.$ac_ext <<_ACEOF
17498/* end confdefs.h. */
17499#include <Carbon/Carbon.h>
17500int
17501main ()
17502{
17503FSIORefNum fRef = 0
17504 ;
17505 return 0;
17506}
17507_ACEOF
17508rm -f conftest.$ac_objext
17509if { (ac_try="$ac_compile"
17510case "(($ac_try" in
17511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17512 *) ac_try_echo=$ac_try;;
17513esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017515 (eval "$ac_compile") 2>conftest.er1
17516 ac_status=$?
17517 grep -v '^ *+' conftest.er1 >conftest.err
17518 rm -f conftest.er1
17519 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017521 (exit $ac_status); } && {
17522 test -z "$ac_c_werror_flag" ||
17523 test ! -s conftest.err
17524 } && test -s conftest.$ac_objext; then
17525
17526cat >>confdefs.h <<\_ACEOF
17527#define HAVE_OSX105_SDK 1
17528_ACEOF
17529
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017530 { echo "$as_me:$LINENO: result: yes" >&5
17531echo "${ECHO_T}yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017532else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017533 echo "$as_me: failed program was:" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017534sed 's/^/| /' conftest.$ac_ext >&5
17535
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017536 { echo "$as_me:$LINENO: result: no" >&5
17537echo "${ECHO_T}no" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017538
17539fi
17540
17541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17542
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017543# Check for --with-doc-strings
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017544{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17545echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017546
Martin v. Löwiseba40652007-08-30 20:10:57 +000017547# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017548if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017549 withval=$with_doc_strings;
17550fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017551
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017552
17553if test -z "$with_doc_strings"
17554then with_doc_strings="yes"
17555fi
17556if test "$with_doc_strings" != "no"
17557then
17558
17559cat >>confdefs.h <<\_ACEOF
17560#define WITH_DOC_STRINGS 1
17561_ACEOF
17562
17563fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017564{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17565echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017566
Neil Schemenauera35c6882001-02-27 04:45:05 +000017567# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017568{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17569echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017570
Martin v. Löwiseba40652007-08-30 20:10:57 +000017571# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017572if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017573 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017574if test "$withval" != no
17575then
17576
17577cat >>confdefs.h <<\_ACEOF
17578#define WITH_TSC 1
17579_ACEOF
17580
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017581 { echo "$as_me:$LINENO: result: yes" >&5
17582echo "${ECHO_T}yes" >&6; }
17583else { echo "$as_me:$LINENO: result: no" >&5
17584echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017585fi
17586else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017587 { echo "$as_me:$LINENO: result: no" >&5
17588echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017589fi
17590
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017591
17592# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017593{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17594echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017595
Martin v. Löwiseba40652007-08-30 20:10:57 +000017596# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017597if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017598 withval=$with_pymalloc;
17599fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017600
Neil Schemenauera35c6882001-02-27 04:45:05 +000017601
Neil Schemenauer16c22972002-03-22 15:34:49 +000017602if test -z "$with_pymalloc"
17603then with_pymalloc="yes"
17604fi
17605if test "$with_pymalloc" != "no"
17606then
Martin v. Löwis11437992002-04-12 09:54:03 +000017607
17608cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017609#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017610_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017611
17612fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017613{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17614echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017615
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000017616# Check for Valgrind support
17617{ echo "$as_me:$LINENO: checking for --with-valgrind" >&5
17618echo $ECHO_N "checking for --with-valgrind... $ECHO_C" >&6; }
17619
17620# Check whether --with-valgrind was given.
17621if test "${with_valgrind+set}" = set; then
17622 withval=$with_valgrind;
17623else
17624 with_valgrind=no
17625fi
17626
17627{ echo "$as_me:$LINENO: result: $with_valgrind" >&5
17628echo "${ECHO_T}$with_valgrind" >&6; }
17629if test "$with_valgrind" != no; then
17630 if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17631 { echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17632echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17633if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17634 echo $ECHO_N "(cached) $ECHO_C" >&6
17635fi
17636{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17637echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17638else
17639 # Is the header compilable?
17640{ echo "$as_me:$LINENO: checking valgrind/valgrind.h usability" >&5
17641echo $ECHO_N "checking valgrind/valgrind.h usability... $ECHO_C" >&6; }
17642cat >conftest.$ac_ext <<_ACEOF
17643/* confdefs.h. */
17644_ACEOF
17645cat confdefs.h >>conftest.$ac_ext
17646cat >>conftest.$ac_ext <<_ACEOF
17647/* end confdefs.h. */
17648$ac_includes_default
17649#include <valgrind/valgrind.h>
17650_ACEOF
17651rm -f conftest.$ac_objext
17652if { (ac_try="$ac_compile"
17653case "(($ac_try" in
17654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17655 *) ac_try_echo=$ac_try;;
17656esac
17657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17658 (eval "$ac_compile") 2>conftest.er1
17659 ac_status=$?
17660 grep -v '^ *+' conftest.er1 >conftest.err
17661 rm -f conftest.er1
17662 cat conftest.err >&5
17663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17664 (exit $ac_status); } && {
17665 test -z "$ac_c_werror_flag" ||
17666 test ! -s conftest.err
17667 } && test -s conftest.$ac_objext; then
17668 ac_header_compiler=yes
17669else
17670 echo "$as_me: failed program was:" >&5
17671sed 's/^/| /' conftest.$ac_ext >&5
17672
17673 ac_header_compiler=no
17674fi
17675
17676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17677{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17678echo "${ECHO_T}$ac_header_compiler" >&6; }
17679
17680# Is the header present?
17681{ echo "$as_me:$LINENO: checking valgrind/valgrind.h presence" >&5
17682echo $ECHO_N "checking valgrind/valgrind.h presence... $ECHO_C" >&6; }
17683cat >conftest.$ac_ext <<_ACEOF
17684/* confdefs.h. */
17685_ACEOF
17686cat confdefs.h >>conftest.$ac_ext
17687cat >>conftest.$ac_ext <<_ACEOF
17688/* end confdefs.h. */
17689#include <valgrind/valgrind.h>
17690_ACEOF
17691if { (ac_try="$ac_cpp conftest.$ac_ext"
17692case "(($ac_try" in
17693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17694 *) ac_try_echo=$ac_try;;
17695esac
17696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17697 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17698 ac_status=$?
17699 grep -v '^ *+' conftest.er1 >conftest.err
17700 rm -f conftest.er1
17701 cat conftest.err >&5
17702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17703 (exit $ac_status); } >/dev/null && {
17704 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17705 test ! -s conftest.err
17706 }; then
17707 ac_header_preproc=yes
17708else
17709 echo "$as_me: failed program was:" >&5
17710sed 's/^/| /' conftest.$ac_ext >&5
17711
17712 ac_header_preproc=no
17713fi
17714
17715rm -f conftest.err conftest.$ac_ext
17716{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17717echo "${ECHO_T}$ac_header_preproc" >&6; }
17718
17719# So? What about this header?
17720case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17721 yes:no: )
17722 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
17723echo "$as_me: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17724 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&5
17725echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&2;}
17726 ac_header_preproc=yes
17727 ;;
17728 no:yes:* )
17729 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&5
17730echo "$as_me: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&2;}
17731 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&5
17732echo "$as_me: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&2;}
17733 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&5
17734echo "$as_me: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&2;}
17735 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
17736echo "$as_me: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
17737 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&5
17738echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&2;}
17739 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&5
17740echo "$as_me: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&2;}
17741 ( cat <<\_ASBOX
17742## -------------------------------------- ##
17743## Report this to http://bugs.python.org/ ##
17744## -------------------------------------- ##
17745_ASBOX
17746 ) | sed "s/^/$as_me: WARNING: /" >&2
17747 ;;
17748esac
17749{ echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17750echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17751if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17752 echo $ECHO_N "(cached) $ECHO_C" >&6
17753else
17754 ac_cv_header_valgrind_valgrind_h=$ac_header_preproc
17755fi
17756{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17757echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17758
17759fi
17760if test $ac_cv_header_valgrind_valgrind_h = yes; then
17761
17762cat >>confdefs.h <<\_ACEOF
17763#define WITH_VALGRIND 1
17764_ACEOF
17765
17766else
17767 { { echo "$as_me:$LINENO: error: Valgrind support requested but headers not available" >&5
17768echo "$as_me: error: Valgrind support requested but headers not available" >&2;}
17769 { (exit 1); exit 1; }; }
17770
17771fi
17772
17773
17774fi
17775
Barry Warsawef82cd72000-06-30 16:21:01 +000017776# Check for --with-wctype-functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017777{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17778echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017779
Martin v. Löwiseba40652007-08-30 20:10:57 +000017780# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017781if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017782 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017783if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017784then
17785
17786cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017787#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017788_ACEOF
17789
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017790 { echo "$as_me:$LINENO: result: yes" >&5
17791echo "${ECHO_T}yes" >&6; }
17792else { echo "$as_me:$LINENO: result: no" >&5
17793echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017794fi
17795else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017796 { echo "$as_me:$LINENO: result: no" >&5
17797echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017798fi
17799
Barry Warsawef82cd72000-06-30 16:21:01 +000017800
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017801# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017802
Guido van Rossum98935bf2001-09-05 19:13:16 +000017803DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017804
Guido van Rossume97ee181999-12-20 21:27:22 +000017805# the dlopen() function means we might want to use dynload_shlib.o. some
17806# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017807
Thomas Wouters3a584202000-08-05 23:28:51 +000017808for ac_func in dlopen
17809do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017810as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17811{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17812echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017813if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017814 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017815else
Martin v. Löwis11437992002-04-12 09:54:03 +000017816 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017817/* confdefs.h. */
17818_ACEOF
17819cat confdefs.h >>conftest.$ac_ext
17820cat >>conftest.$ac_ext <<_ACEOF
17821/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017822/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17823 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17824#define $ac_func innocuous_$ac_func
17825
Guido van Rossume97ee181999-12-20 21:27:22 +000017826/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017827 which can conflict with char $ac_func (); below.
17828 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017829 <limits.h> exists even on freestanding compilers. */
17830
17831#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017832# include <limits.h>
17833#else
17834# include <assert.h>
17835#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017836
17837#undef $ac_func
17838
Martin v. Löwiseba40652007-08-30 20:10:57 +000017839/* Override any GCC internal prototype to avoid an error.
17840 Use char because int might match the return type of a GCC
17841 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017842#ifdef __cplusplus
17843extern "C"
17844#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017845char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017846/* The GNU C library defines this for functions which it implements
17847 to always fail with ENOSYS. Some functions are actually named
17848 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017849#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017850choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017851#endif
17852
Skip Montanaro6dead952003-09-25 14:50:04 +000017853int
17854main ()
17855{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017856return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017857 ;
17858 return 0;
17859}
17860_ACEOF
17861rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017862if { (ac_try="$ac_link"
17863case "(($ac_try" in
17864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17865 *) ac_try_echo=$ac_try;;
17866esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017868 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017869 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017870 grep -v '^ *+' conftest.er1 >conftest.err
17871 rm -f conftest.er1
17872 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017874 (exit $ac_status); } && {
17875 test -z "$ac_c_werror_flag" ||
17876 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017877 } && test -s conftest$ac_exeext &&
17878 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017879 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017880else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017881 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017882sed 's/^/| /' conftest.$ac_ext >&5
17883
Martin v. Löwiseba40652007-08-30 20:10:57 +000017884 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017885fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017886
17887rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017888 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017889fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017890ac_res=`eval echo '${'$as_ac_var'}'`
17891 { echo "$as_me:$LINENO: result: $ac_res" >&5
17892echo "${ECHO_T}$ac_res" >&6; }
17893if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017894 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017895#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017896_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017897
Guido van Rossume97ee181999-12-20 21:27:22 +000017898fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017899done
Guido van Rossume97ee181999-12-20 21:27:22 +000017900
Michael W. Hudson54241132001-12-07 15:38:26 +000017901
Guido van Rossume97ee181999-12-20 21:27:22 +000017902# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17903# loading of modules.
17904
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017905{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17906echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017907if test -z "$DYNLOADFILE"
17908then
17909 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017910 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17911 if test "$ac_cv_func_dlopen" = yes
17912 then DYNLOADFILE="dynload_shlib.o"
17913 else DYNLOADFILE="dynload_aix.o"
17914 fi
17915 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017916 BeOS*) DYNLOADFILE="dynload_beos.o";;
17917 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000017918 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17919 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017920 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017921 *)
17922 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17923 # out any dynamic loading
17924 if test "$ac_cv_func_dlopen" = yes
17925 then DYNLOADFILE="dynload_shlib.o"
17926 else DYNLOADFILE="dynload_stub.o"
17927 fi
17928 ;;
17929 esac
17930fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017931{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17932echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017933if test "$DYNLOADFILE" != "dynload_stub.o"
17934then
Martin v. Löwis11437992002-04-12 09:54:03 +000017935
17936cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017937#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017938_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017939
17940fi
17941
Neil Schemenauer4e425612001-06-19 15:44:15 +000017942# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17943
Michael W. Hudson54241132001-12-07 15:38:26 +000017944
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017945{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17946echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017947if test -z "$MACHDEP_OBJS"
17948then
Jack Jansene578a632001-08-15 01:27:14 +000017949 MACHDEP_OBJS=$extra_machdep_objs
17950else
17951 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017952fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017953{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17954echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017955
Guido van Rossum627b2d71993-12-24 10:39:16 +000017956# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017957
17958
17959
17960
17961
17962
17963
17964
17965
17966
17967
17968
17969
17970
17971
17972
17973
17974
17975
17976
17977
17978
17979
17980
17981
17982
17983
17984
17985
17986
17987
17988
17989
17990
17991
17992
17993
17994
17995
17996
17997
17998
17999
18000
18001
18002
18003
18004
18005
18006
18007
18008
18009
18010
18011
18012
18013
18014
18015
18016
18017
18018
18019
18020
18021
18022
18023
18024
18025
18026
18027
Martin v. Löwisd6320502004-08-12 13:45:08 +000018028
Martin v. Löwisc3001752005-01-23 09:27:24 +000018029
18030
Neal Norwitz05a45592006-03-20 06:30:08 +000018031
18032
Martin v. Löwis382abef2007-02-19 10:55:19 +000018033
18034
Christian Heimes36281872007-11-30 21:11:28 +000018035
Martin v. Löwisaef18b12008-03-24 13:31:16 +000018036
18037
Jesse Noller355b1262009-04-02 00:03:28 +000018038
18039
18040
18041
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018042
18043
18044
18045
18046
18047
18048
18049
18050
18051
18052
18053
18054
Antoine Pitrou30b3b352009-12-02 20:37:54 +000018055
Martin v. Löwisaef18b12008-03-24 13:31:16 +000018056for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
18057 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000018058 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018059 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrou30b3b352009-12-02 20:37:54 +000018060 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000018061 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000018062 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000018063 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
18064 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000018065 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018066 setlocale setregid setreuid setresuid setresgid \
18067 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000018068 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000018069 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000018070 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000018071do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018072as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18073{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18074echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018075if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018076 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018077else
Martin v. Löwis11437992002-04-12 09:54:03 +000018078 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018079/* confdefs.h. */
18080_ACEOF
18081cat confdefs.h >>conftest.$ac_ext
18082cat >>conftest.$ac_ext <<_ACEOF
18083/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018084/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18085 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18086#define $ac_func innocuous_$ac_func
18087
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018088/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018089 which can conflict with char $ac_func (); below.
18090 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018091 <limits.h> exists even on freestanding compilers. */
18092
18093#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018094# include <limits.h>
18095#else
18096# include <assert.h>
18097#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018098
18099#undef $ac_func
18100
Martin v. Löwiseba40652007-08-30 20:10:57 +000018101/* Override any GCC internal prototype to avoid an error.
18102 Use char because int might match the return type of a GCC
18103 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018104#ifdef __cplusplus
18105extern "C"
18106#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018107char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018108/* The GNU C library defines this for functions which it implements
18109 to always fail with ENOSYS. Some functions are actually named
18110 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018111#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018112choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018113#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018114
Skip Montanaro6dead952003-09-25 14:50:04 +000018115int
18116main ()
18117{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018118return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018119 ;
18120 return 0;
18121}
18122_ACEOF
18123rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018124if { (ac_try="$ac_link"
18125case "(($ac_try" in
18126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18127 *) ac_try_echo=$ac_try;;
18128esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018130 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018131 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018132 grep -v '^ *+' conftest.er1 >conftest.err
18133 rm -f conftest.er1
18134 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018136 (exit $ac_status); } && {
18137 test -z "$ac_c_werror_flag" ||
18138 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018139 } && test -s conftest$ac_exeext &&
18140 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018141 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018142else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018143 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018144sed 's/^/| /' conftest.$ac_ext >&5
18145
Martin v. Löwiseba40652007-08-30 20:10:57 +000018146 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018147fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018148
18149rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018150 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018151fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018152ac_res=`eval echo '${'$as_ac_var'}'`
18153 { echo "$as_me:$LINENO: result: $ac_res" >&5
18154echo "${ECHO_T}$ac_res" >&6; }
18155if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018156 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018157#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018158_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018159
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018160fi
18161done
18162
Michael W. Hudson54241132001-12-07 15:38:26 +000018163
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018164# For some functions, having a definition is not sufficient, since
18165# we want to take their address.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018166{ echo "$as_me:$LINENO: checking for chroot" >&5
18167echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018168cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018169/* confdefs.h. */
18170_ACEOF
18171cat confdefs.h >>conftest.$ac_ext
18172cat >>conftest.$ac_ext <<_ACEOF
18173/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018174#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018175int
18176main ()
18177{
18178void *x=chroot
18179 ;
18180 return 0;
18181}
18182_ACEOF
18183rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018184if { (ac_try="$ac_compile"
18185case "(($ac_try" in
18186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18187 *) ac_try_echo=$ac_try;;
18188esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018190 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018191 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018192 grep -v '^ *+' conftest.er1 >conftest.err
18193 rm -f conftest.er1
18194 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018196 (exit $ac_status); } && {
18197 test -z "$ac_c_werror_flag" ||
18198 test ! -s conftest.err
18199 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018200
18201cat >>confdefs.h <<\_ACEOF
18202#define HAVE_CHROOT 1
18203_ACEOF
18204
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018205 { echo "$as_me:$LINENO: result: yes" >&5
18206echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018207else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018208 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018209sed 's/^/| /' conftest.$ac_ext >&5
18210
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018211 { echo "$as_me:$LINENO: result: no" >&5
18212echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018213
18214fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018215
18216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018217{ echo "$as_me:$LINENO: checking for link" >&5
18218echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018219cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018220/* confdefs.h. */
18221_ACEOF
18222cat confdefs.h >>conftest.$ac_ext
18223cat >>conftest.$ac_ext <<_ACEOF
18224/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018225#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018226int
18227main ()
18228{
18229void *x=link
18230 ;
18231 return 0;
18232}
18233_ACEOF
18234rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018235if { (ac_try="$ac_compile"
18236case "(($ac_try" in
18237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18238 *) ac_try_echo=$ac_try;;
18239esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018241 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018242 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018243 grep -v '^ *+' conftest.er1 >conftest.err
18244 rm -f conftest.er1
18245 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018247 (exit $ac_status); } && {
18248 test -z "$ac_c_werror_flag" ||
18249 test ! -s conftest.err
18250 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018251
18252cat >>confdefs.h <<\_ACEOF
18253#define HAVE_LINK 1
18254_ACEOF
18255
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018256 { echo "$as_me:$LINENO: result: yes" >&5
18257echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018258else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018259 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018260sed 's/^/| /' conftest.$ac_ext >&5
18261
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018262 { echo "$as_me:$LINENO: result: no" >&5
18263echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018264
18265fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018266
18267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018268{ echo "$as_me:$LINENO: checking for symlink" >&5
18269echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018270cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018271/* confdefs.h. */
18272_ACEOF
18273cat confdefs.h >>conftest.$ac_ext
18274cat >>conftest.$ac_ext <<_ACEOF
18275/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018276#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018277int
18278main ()
18279{
18280void *x=symlink
18281 ;
18282 return 0;
18283}
18284_ACEOF
18285rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018286if { (ac_try="$ac_compile"
18287case "(($ac_try" in
18288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18289 *) ac_try_echo=$ac_try;;
18290esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018292 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018293 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018294 grep -v '^ *+' conftest.er1 >conftest.err
18295 rm -f conftest.er1
18296 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018298 (exit $ac_status); } && {
18299 test -z "$ac_c_werror_flag" ||
18300 test ! -s conftest.err
18301 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018302
18303cat >>confdefs.h <<\_ACEOF
18304#define HAVE_SYMLINK 1
18305_ACEOF
18306
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018307 { echo "$as_me:$LINENO: result: yes" >&5
18308echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018309else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018310 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018311sed 's/^/| /' conftest.$ac_ext >&5
18312
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018313 { echo "$as_me:$LINENO: result: no" >&5
18314echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018315
18316fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018317
18318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018319{ echo "$as_me:$LINENO: checking for fchdir" >&5
18320echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018321cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018322/* confdefs.h. */
18323_ACEOF
18324cat confdefs.h >>conftest.$ac_ext
18325cat >>conftest.$ac_ext <<_ACEOF
18326/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018327#include <unistd.h>
18328int
18329main ()
18330{
18331void *x=fchdir
18332 ;
18333 return 0;
18334}
18335_ACEOF
18336rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018337if { (ac_try="$ac_compile"
18338case "(($ac_try" in
18339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18340 *) ac_try_echo=$ac_try;;
18341esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018343 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018344 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018345 grep -v '^ *+' conftest.er1 >conftest.err
18346 rm -f conftest.er1
18347 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018349 (exit $ac_status); } && {
18350 test -z "$ac_c_werror_flag" ||
18351 test ! -s conftest.err
18352 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018353
18354cat >>confdefs.h <<\_ACEOF
18355#define HAVE_FCHDIR 1
18356_ACEOF
18357
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018358 { echo "$as_me:$LINENO: result: yes" >&5
18359echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018360else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018361 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018362sed 's/^/| /' conftest.$ac_ext >&5
18363
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018364 { echo "$as_me:$LINENO: result: no" >&5
18365echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018366
18367fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018368
18369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018370{ echo "$as_me:$LINENO: checking for fsync" >&5
18371echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018372cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018373/* confdefs.h. */
18374_ACEOF
18375cat confdefs.h >>conftest.$ac_ext
18376cat >>conftest.$ac_ext <<_ACEOF
18377/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018378#include <unistd.h>
18379int
18380main ()
18381{
18382void *x=fsync
18383 ;
18384 return 0;
18385}
18386_ACEOF
18387rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018388if { (ac_try="$ac_compile"
18389case "(($ac_try" in
18390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18391 *) ac_try_echo=$ac_try;;
18392esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018394 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018395 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018396 grep -v '^ *+' conftest.er1 >conftest.err
18397 rm -f conftest.er1
18398 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018400 (exit $ac_status); } && {
18401 test -z "$ac_c_werror_flag" ||
18402 test ! -s conftest.err
18403 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018404
18405cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018406#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018407_ACEOF
18408
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018409 { echo "$as_me:$LINENO: result: yes" >&5
18410echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018411else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018412 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018413sed 's/^/| /' conftest.$ac_ext >&5
18414
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018415 { echo "$as_me:$LINENO: result: no" >&5
18416echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018417
18418fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018419
18420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018421{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18422echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018423cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018424/* confdefs.h. */
18425_ACEOF
18426cat confdefs.h >>conftest.$ac_ext
18427cat >>conftest.$ac_ext <<_ACEOF
18428/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018429#include <unistd.h>
18430int
18431main ()
18432{
18433void *x=fdatasync
18434 ;
18435 return 0;
18436}
18437_ACEOF
18438rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018439if { (ac_try="$ac_compile"
18440case "(($ac_try" in
18441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18442 *) ac_try_echo=$ac_try;;
18443esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018445 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018446 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018447 grep -v '^ *+' conftest.er1 >conftest.err
18448 rm -f conftest.er1
18449 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018451 (exit $ac_status); } && {
18452 test -z "$ac_c_werror_flag" ||
18453 test ! -s conftest.err
18454 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018455
18456cat >>confdefs.h <<\_ACEOF
18457#define HAVE_FDATASYNC 1
18458_ACEOF
18459
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018460 { echo "$as_me:$LINENO: result: yes" >&5
18461echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018462else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018463 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018464sed 's/^/| /' conftest.$ac_ext >&5
18465
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018466 { echo "$as_me:$LINENO: result: no" >&5
18467echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018468
18469fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018470
18471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018472{ echo "$as_me:$LINENO: checking for epoll" >&5
18473echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018474cat >conftest.$ac_ext <<_ACEOF
18475/* confdefs.h. */
18476_ACEOF
18477cat confdefs.h >>conftest.$ac_ext
18478cat >>conftest.$ac_ext <<_ACEOF
18479/* end confdefs.h. */
18480#include <sys/epoll.h>
18481int
18482main ()
18483{
18484void *x=epoll_create
18485 ;
18486 return 0;
18487}
18488_ACEOF
18489rm -f conftest.$ac_objext
18490if { (ac_try="$ac_compile"
18491case "(($ac_try" in
18492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18493 *) ac_try_echo=$ac_try;;
18494esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018495eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018496 (eval "$ac_compile") 2>conftest.er1
18497 ac_status=$?
18498 grep -v '^ *+' conftest.er1 >conftest.err
18499 rm -f conftest.er1
18500 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018502 (exit $ac_status); } && {
18503 test -z "$ac_c_werror_flag" ||
18504 test ! -s conftest.err
18505 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018506
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018507cat >>confdefs.h <<\_ACEOF
18508#define HAVE_EPOLL 1
18509_ACEOF
18510
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018511 { echo "$as_me:$LINENO: result: yes" >&5
18512echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018513else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018514 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018515sed 's/^/| /' conftest.$ac_ext >&5
18516
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018517 { echo "$as_me:$LINENO: result: no" >&5
18518echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018519
18520fi
18521
18522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018523{ echo "$as_me:$LINENO: checking for kqueue" >&5
18524echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018525cat >conftest.$ac_ext <<_ACEOF
18526/* confdefs.h. */
18527_ACEOF
18528cat confdefs.h >>conftest.$ac_ext
18529cat >>conftest.$ac_ext <<_ACEOF
18530/* end confdefs.h. */
18531
18532#include <sys/types.h>
18533#include <sys/event.h>
18534
18535int
18536main ()
18537{
18538int x=kqueue()
18539 ;
18540 return 0;
18541}
18542_ACEOF
18543rm -f conftest.$ac_objext
18544if { (ac_try="$ac_compile"
18545case "(($ac_try" in
18546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18547 *) ac_try_echo=$ac_try;;
18548esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018550 (eval "$ac_compile") 2>conftest.er1
18551 ac_status=$?
18552 grep -v '^ *+' conftest.er1 >conftest.err
18553 rm -f conftest.er1
18554 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018556 (exit $ac_status); } && {
18557 test -z "$ac_c_werror_flag" ||
18558 test ! -s conftest.err
18559 } && test -s conftest.$ac_objext; then
18560
18561cat >>confdefs.h <<\_ACEOF
18562#define HAVE_KQUEUE 1
18563_ACEOF
18564
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018565 { echo "$as_me:$LINENO: result: yes" >&5
18566echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018567else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018568 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018569sed 's/^/| /' conftest.$ac_ext >&5
18570
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018571 { echo "$as_me:$LINENO: result: no" >&5
18572echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018573
18574fi
18575
18576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018577# On some systems (eg. FreeBSD 5), we would find a definition of the
18578# functions ctermid_r, setgroups in the library, but no prototype
18579# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18580# address to avoid compiler warnings and potential miscompilations
18581# because of the missing prototypes.
18582
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018583{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18584echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018585cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018586/* confdefs.h. */
18587_ACEOF
18588cat confdefs.h >>conftest.$ac_ext
18589cat >>conftest.$ac_ext <<_ACEOF
18590/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018591
18592#include "confdefs.h"
18593#include <stdio.h>
18594
Martin v. Löwisd5843682002-11-21 20:41:28 +000018595int
18596main ()
18597{
18598void* p = ctermid_r
18599 ;
18600 return 0;
18601}
18602_ACEOF
18603rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018604if { (ac_try="$ac_compile"
18605case "(($ac_try" in
18606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18607 *) ac_try_echo=$ac_try;;
18608esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018610 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018611 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018612 grep -v '^ *+' conftest.er1 >conftest.err
18613 rm -f conftest.er1
18614 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018616 (exit $ac_status); } && {
18617 test -z "$ac_c_werror_flag" ||
18618 test ! -s conftest.err
18619 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018620
18621cat >>confdefs.h <<\_ACEOF
18622#define HAVE_CTERMID_R 1
18623_ACEOF
18624
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018625 { echo "$as_me:$LINENO: result: yes" >&5
18626echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018627else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018628 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018629sed 's/^/| /' conftest.$ac_ext >&5
18630
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018631 { echo "$as_me:$LINENO: result: no" >&5
18632echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018633
18634fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000018635
Martin v. Löwiseba40652007-08-30 20:10:57 +000018636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18637
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018638{ echo "$as_me:$LINENO: checking for flock" >&5
18639echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018640cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018641/* confdefs.h. */
18642_ACEOF
18643cat confdefs.h >>conftest.$ac_ext
18644cat >>conftest.$ac_ext <<_ACEOF
18645/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018646
18647#include "confdefs.h"
18648#include <sys/file.h>
18649
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018650int
18651main ()
18652{
18653void* p = flock
18654 ;
18655 return 0;
18656}
18657_ACEOF
18658rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018659if { (ac_try="$ac_compile"
18660case "(($ac_try" in
18661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18662 *) ac_try_echo=$ac_try;;
18663esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018665 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018666 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018667 grep -v '^ *+' conftest.er1 >conftest.err
18668 rm -f conftest.er1
18669 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018671 (exit $ac_status); } && {
18672 test -z "$ac_c_werror_flag" ||
18673 test ! -s conftest.err
18674 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018675
18676cat >>confdefs.h <<\_ACEOF
18677#define HAVE_FLOCK 1
18678_ACEOF
18679
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018680 { echo "$as_me:$LINENO: result: yes" >&5
18681echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018682else
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
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018686 { echo "$as_me:$LINENO: result: no" >&5
18687echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018688
18689fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018690
Martin v. Löwiseba40652007-08-30 20:10:57 +000018691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18692
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018693{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18694echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018695cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018696/* confdefs.h. */
18697_ACEOF
18698cat confdefs.h >>conftest.$ac_ext
18699cat >>conftest.$ac_ext <<_ACEOF
18700/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018701
18702#include "confdefs.h"
18703#include <unistd.h>
18704
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018705int
18706main ()
18707{
18708void* p = getpagesize
18709 ;
18710 return 0;
18711}
18712_ACEOF
18713rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018714if { (ac_try="$ac_compile"
18715case "(($ac_try" in
18716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18717 *) ac_try_echo=$ac_try;;
18718esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018720 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018721 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018722 grep -v '^ *+' conftest.er1 >conftest.err
18723 rm -f conftest.er1
18724 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018726 (exit $ac_status); } && {
18727 test -z "$ac_c_werror_flag" ||
18728 test ! -s conftest.err
18729 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018730
18731cat >>confdefs.h <<\_ACEOF
18732#define HAVE_GETPAGESIZE 1
18733_ACEOF
18734
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018735 { echo "$as_me:$LINENO: result: yes" >&5
18736echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018737else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018738 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018739sed 's/^/| /' conftest.$ac_ext >&5
18740
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018741 { echo "$as_me:$LINENO: result: no" >&5
18742echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018743
18744fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018745
18746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018747
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018748for ac_prog in true
18749do
18750 # Extract the first word of "$ac_prog", so it can be a program name with args.
18751set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018752{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18753echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018754if test "${ac_cv_prog_TRUE+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018755 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018756else
18757 if test -n "$TRUE"; then
18758 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18759else
18760as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18761for as_dir in $PATH
18762do
18763 IFS=$as_save_IFS
18764 test -z "$as_dir" && as_dir=.
18765 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000018766 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 +000018767 ac_cv_prog_TRUE="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018768 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018769 break 2
18770 fi
18771done
18772done
Martin v. Löwiseba40652007-08-30 20:10:57 +000018773IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018774
18775fi
18776fi
18777TRUE=$ac_cv_prog_TRUE
18778if test -n "$TRUE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018779 { echo "$as_me:$LINENO: result: $TRUE" >&5
18780echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018781else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018782 { echo "$as_me:$LINENO: result: no" >&5
18783echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018784fi
18785
Martin v. Löwiseba40652007-08-30 20:10:57 +000018786
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018787 test -n "$TRUE" && break
18788done
18789test -n "$TRUE" || TRUE="/bin/true"
18790
18791
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018792{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18793echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018794if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018795 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018796else
18797 ac_check_lib_save_LIBS=$LIBS
18798LIBS="-lc $LIBS"
18799cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018800/* confdefs.h. */
18801_ACEOF
18802cat confdefs.h >>conftest.$ac_ext
18803cat >>conftest.$ac_ext <<_ACEOF
18804/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018805
Martin v. Löwiseba40652007-08-30 20:10:57 +000018806/* Override any GCC internal prototype to avoid an error.
18807 Use char because int might match the return type of a GCC
18808 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018809#ifdef __cplusplus
18810extern "C"
18811#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018812char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018813int
18814main ()
18815{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018816return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018817 ;
18818 return 0;
18819}
18820_ACEOF
18821rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018822if { (ac_try="$ac_link"
18823case "(($ac_try" in
18824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18825 *) ac_try_echo=$ac_try;;
18826esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018828 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018829 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018830 grep -v '^ *+' conftest.er1 >conftest.err
18831 rm -f conftest.er1
18832 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018834 (exit $ac_status); } && {
18835 test -z "$ac_c_werror_flag" ||
18836 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018837 } && test -s conftest$ac_exeext &&
18838 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018839 ac_cv_lib_c_inet_aton=yes
18840else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018842sed 's/^/| /' conftest.$ac_ext >&5
18843
Martin v. Löwiseba40652007-08-30 20:10:57 +000018844 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018845fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018846
18847rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018848 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018849LIBS=$ac_check_lib_save_LIBS
18850fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018851{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18852echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18853if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018854 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018855else
18856
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018857{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18858echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018859if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018860 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018861else
18862 ac_check_lib_save_LIBS=$LIBS
18863LIBS="-lresolv $LIBS"
18864cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018865/* confdefs.h. */
18866_ACEOF
18867cat confdefs.h >>conftest.$ac_ext
18868cat >>conftest.$ac_ext <<_ACEOF
18869/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018870
Martin v. Löwiseba40652007-08-30 20:10:57 +000018871/* Override any GCC internal prototype to avoid an error.
18872 Use char because int might match the return type of a GCC
18873 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018874#ifdef __cplusplus
18875extern "C"
18876#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018877char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018878int
18879main ()
18880{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018881return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018882 ;
18883 return 0;
18884}
18885_ACEOF
18886rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018887if { (ac_try="$ac_link"
18888case "(($ac_try" in
18889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18890 *) ac_try_echo=$ac_try;;
18891esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018893 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018894 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018895 grep -v '^ *+' conftest.er1 >conftest.err
18896 rm -f conftest.er1
18897 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018899 (exit $ac_status); } && {
18900 test -z "$ac_c_werror_flag" ||
18901 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018902 } && test -s conftest$ac_exeext &&
18903 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018904 ac_cv_lib_resolv_inet_aton=yes
18905else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018906 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018907sed 's/^/| /' conftest.$ac_ext >&5
18908
Martin v. Löwiseba40652007-08-30 20:10:57 +000018909 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018910fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018911
18912rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018913 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018914LIBS=$ac_check_lib_save_LIBS
18915fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018916{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18917echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18918if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018919 cat >>confdefs.h <<_ACEOF
18920#define HAVE_LIBRESOLV 1
18921_ACEOF
18922
18923 LIBS="-lresolv $LIBS"
18924
18925fi
18926
18927
18928fi
18929
18930
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018931# On Tru64, chflags seems to be present, but calling it will
18932# exit Python
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018933{ echo "$as_me:$LINENO: checking for chflags" >&5
18934echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018935if test "${ac_cv_have_chflags+set}" = set; then
18936 echo $ECHO_N "(cached) $ECHO_C" >&6
18937else
18938 if test "$cross_compiling" = yes; then
Gregory P. Smith49437c22009-11-02 01:38:35 +000018939 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018940else
18941 cat >conftest.$ac_ext <<_ACEOF
18942/* confdefs.h. */
18943_ACEOF
18944cat confdefs.h >>conftest.$ac_ext
18945cat >>conftest.$ac_ext <<_ACEOF
18946/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000018947[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018948#include <sys/stat.h>
18949#include <unistd.h>
18950int main(int argc, char*argv[])
18951{
18952 if(chflags(argv[0], 0) != 0)
18953 return 1;
18954 return 0;
18955}
Gregory P. Smith49437c22009-11-02 01:38:35 +000018956]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018957_ACEOF
18958rm -f conftest$ac_exeext
18959if { (ac_try="$ac_link"
18960case "(($ac_try" in
18961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18962 *) ac_try_echo=$ac_try;;
18963esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018965 (eval "$ac_link") 2>&5
18966 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018968 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18969 { (case "(($ac_try" in
18970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18971 *) ac_try_echo=$ac_try;;
18972esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018973eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018974 (eval "$ac_try") 2>&5
18975 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018977 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018978 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018979else
18980 echo "$as_me: program exited with status $ac_status" >&5
18981echo "$as_me: failed program was:" >&5
18982sed 's/^/| /' conftest.$ac_ext >&5
18983
18984( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018985ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018986fi
18987rm -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 +000018988fi
18989
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018990
18991
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018992fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018993{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18994echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000018995if test "$ac_cv_have_chflags" = cross ; then
18996 { echo "$as_me:$LINENO: checking for chflags" >&5
18997echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
18998if test "${ac_cv_func_chflags+set}" = set; then
18999 echo $ECHO_N "(cached) $ECHO_C" >&6
19000else
19001 cat >conftest.$ac_ext <<_ACEOF
19002/* confdefs.h. */
19003_ACEOF
19004cat confdefs.h >>conftest.$ac_ext
19005cat >>conftest.$ac_ext <<_ACEOF
19006/* end confdefs.h. */
19007/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
19008 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19009#define chflags innocuous_chflags
19010
19011/* System header to define __stub macros and hopefully few prototypes,
19012 which can conflict with char chflags (); below.
19013 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19014 <limits.h> exists even on freestanding compilers. */
19015
19016#ifdef __STDC__
19017# include <limits.h>
19018#else
19019# include <assert.h>
19020#endif
19021
19022#undef chflags
19023
19024/* Override any GCC internal prototype to avoid an error.
19025 Use char because int might match the return type of a GCC
19026 builtin and then its argument prototype would still apply. */
19027#ifdef __cplusplus
19028extern "C"
19029#endif
19030char chflags ();
19031/* The GNU C library defines this for functions which it implements
19032 to always fail with ENOSYS. Some functions are actually named
19033 something starting with __ and the normal name is an alias. */
19034#if defined __stub_chflags || defined __stub___chflags
19035choke me
19036#endif
19037
19038int
19039main ()
19040{
19041return chflags ();
19042 ;
19043 return 0;
19044}
19045_ACEOF
19046rm -f conftest.$ac_objext conftest$ac_exeext
19047if { (ac_try="$ac_link"
19048case "(($ac_try" in
19049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19050 *) ac_try_echo=$ac_try;;
19051esac
19052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19053 (eval "$ac_link") 2>conftest.er1
19054 ac_status=$?
19055 grep -v '^ *+' conftest.er1 >conftest.err
19056 rm -f conftest.er1
19057 cat conftest.err >&5
19058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19059 (exit $ac_status); } && {
19060 test -z "$ac_c_werror_flag" ||
19061 test ! -s conftest.err
19062 } && test -s conftest$ac_exeext &&
19063 $as_test_x conftest$ac_exeext; then
19064 ac_cv_func_chflags=yes
19065else
19066 echo "$as_me: failed program was:" >&5
19067sed 's/^/| /' conftest.$ac_ext >&5
19068
19069 ac_cv_func_chflags=no
19070fi
19071
19072rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19073 conftest$ac_exeext conftest.$ac_ext
19074fi
19075{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
19076echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
19077if test $ac_cv_func_chflags = yes; then
19078 ac_cv_have_chflags="yes"
19079else
19080 ac_cv_have_chflags="no"
19081fi
19082
19083fi
19084if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019085
19086cat >>confdefs.h <<\_ACEOF
19087#define HAVE_CHFLAGS 1
19088_ACEOF
19089
19090fi
19091
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019092{ echo "$as_me:$LINENO: checking for lchflags" >&5
19093echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019094if test "${ac_cv_have_lchflags+set}" = set; then
19095 echo $ECHO_N "(cached) $ECHO_C" >&6
19096else
19097 if test "$cross_compiling" = yes; then
Gregory P. Smith49437c22009-11-02 01:38:35 +000019098 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019099else
19100 cat >conftest.$ac_ext <<_ACEOF
19101/* confdefs.h. */
19102_ACEOF
19103cat confdefs.h >>conftest.$ac_ext
19104cat >>conftest.$ac_ext <<_ACEOF
19105/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000019106[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019107#include <sys/stat.h>
19108#include <unistd.h>
19109int main(int argc, char*argv[])
19110{
19111 if(lchflags(argv[0], 0) != 0)
19112 return 1;
19113 return 0;
19114}
Gregory P. Smith49437c22009-11-02 01:38:35 +000019115]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019116_ACEOF
19117rm -f conftest$ac_exeext
19118if { (ac_try="$ac_link"
19119case "(($ac_try" in
19120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19121 *) ac_try_echo=$ac_try;;
19122esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019124 (eval "$ac_link") 2>&5
19125 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019127 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19128 { (case "(($ac_try" in
19129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19130 *) ac_try_echo=$ac_try;;
19131esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019133 (eval "$ac_try") 2>&5
19134 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019136 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019137 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019138else
19139 echo "$as_me: program exited with status $ac_status" >&5
19140echo "$as_me: failed program was:" >&5
19141sed 's/^/| /' conftest.$ac_ext >&5
19142
19143( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019144ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019145fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019146rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19147fi
19148
19149
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019150
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019151fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019152{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
19153echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000019154if test "$ac_cv_have_lchflags" = cross ; then
19155 { echo "$as_me:$LINENO: checking for lchflags" >&5
19156echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
19157if test "${ac_cv_func_lchflags+set}" = set; then
19158 echo $ECHO_N "(cached) $ECHO_C" >&6
19159else
19160 cat >conftest.$ac_ext <<_ACEOF
19161/* confdefs.h. */
19162_ACEOF
19163cat confdefs.h >>conftest.$ac_ext
19164cat >>conftest.$ac_ext <<_ACEOF
19165/* end confdefs.h. */
19166/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
19167 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19168#define lchflags innocuous_lchflags
19169
19170/* System header to define __stub macros and hopefully few prototypes,
19171 which can conflict with char lchflags (); below.
19172 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19173 <limits.h> exists even on freestanding compilers. */
19174
19175#ifdef __STDC__
19176# include <limits.h>
19177#else
19178# include <assert.h>
19179#endif
19180
19181#undef lchflags
19182
19183/* Override any GCC internal prototype to avoid an error.
19184 Use char because int might match the return type of a GCC
19185 builtin and then its argument prototype would still apply. */
19186#ifdef __cplusplus
19187extern "C"
19188#endif
19189char lchflags ();
19190/* The GNU C library defines this for functions which it implements
19191 to always fail with ENOSYS. Some functions are actually named
19192 something starting with __ and the normal name is an alias. */
19193#if defined __stub_lchflags || defined __stub___lchflags
19194choke me
19195#endif
19196
19197int
19198main ()
19199{
19200return lchflags ();
19201 ;
19202 return 0;
19203}
19204_ACEOF
19205rm -f conftest.$ac_objext conftest$ac_exeext
19206if { (ac_try="$ac_link"
19207case "(($ac_try" in
19208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19209 *) ac_try_echo=$ac_try;;
19210esac
19211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19212 (eval "$ac_link") 2>conftest.er1
19213 ac_status=$?
19214 grep -v '^ *+' conftest.er1 >conftest.err
19215 rm -f conftest.er1
19216 cat conftest.err >&5
19217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19218 (exit $ac_status); } && {
19219 test -z "$ac_c_werror_flag" ||
19220 test ! -s conftest.err
19221 } && test -s conftest$ac_exeext &&
19222 $as_test_x conftest$ac_exeext; then
19223 ac_cv_func_lchflags=yes
19224else
19225 echo "$as_me: failed program was:" >&5
19226sed 's/^/| /' conftest.$ac_ext >&5
19227
19228 ac_cv_func_lchflags=no
19229fi
19230
19231rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19232 conftest$ac_exeext conftest.$ac_ext
19233fi
19234{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
19235echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
19236if test $ac_cv_func_lchflags = yes; then
19237 ac_cv_have_lchflags="yes"
19238else
19239 ac_cv_have_lchflags="no"
19240fi
19241
19242fi
19243if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019244
19245cat >>confdefs.h <<\_ACEOF
19246#define HAVE_LCHFLAGS 1
19247_ACEOF
19248
19249fi
19250
Ronald Oussorenf8752642006-07-06 10:13:35 +000019251case $ac_sys_system/$ac_sys_release in
19252Darwin/*)
19253 _CUR_CFLAGS="${CFLAGS}"
19254 _CUR_LDFLAGS="${LDFLAGS}"
19255 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
19256 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
19257 ;;
19258esac
19259
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019260{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
19261echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019262if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019263 echo $ECHO_N "(cached) $ECHO_C" >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019264else
19265 ac_check_lib_save_LIBS=$LIBS
19266LIBS="-lz $LIBS"
19267cat >conftest.$ac_ext <<_ACEOF
19268/* confdefs.h. */
19269_ACEOF
19270cat confdefs.h >>conftest.$ac_ext
19271cat >>conftest.$ac_ext <<_ACEOF
19272/* end confdefs.h. */
19273
Martin v. Löwiseba40652007-08-30 20:10:57 +000019274/* Override any GCC internal prototype to avoid an error.
19275 Use char because int might match the return type of a GCC
19276 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019277#ifdef __cplusplus
19278extern "C"
19279#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019280char inflateCopy ();
19281int
19282main ()
19283{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019284return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019285 ;
19286 return 0;
19287}
19288_ACEOF
19289rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019290if { (ac_try="$ac_link"
19291case "(($ac_try" in
19292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19293 *) ac_try_echo=$ac_try;;
19294esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019296 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019297 ac_status=$?
19298 grep -v '^ *+' conftest.er1 >conftest.err
19299 rm -f conftest.er1
19300 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019302 (exit $ac_status); } && {
19303 test -z "$ac_c_werror_flag" ||
19304 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019305 } && test -s conftest$ac_exeext &&
19306 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019307 ac_cv_lib_z_inflateCopy=yes
19308else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019309 echo "$as_me: failed program was:" >&5
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019310sed 's/^/| /' conftest.$ac_ext >&5
19311
Martin v. Löwiseba40652007-08-30 20:10:57 +000019312 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019313fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019314
19315rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019316 conftest$ac_exeext conftest.$ac_ext
19317LIBS=$ac_check_lib_save_LIBS
19318fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019319{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
19320echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
19321if test $ac_cv_lib_z_inflateCopy = yes; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019322
19323cat >>confdefs.h <<\_ACEOF
19324#define HAVE_ZLIB_COPY 1
19325_ACEOF
19326
19327fi
19328
19329
Ronald Oussorenf8752642006-07-06 10:13:35 +000019330case $ac_sys_system/$ac_sys_release in
19331Darwin/*)
19332 CFLAGS="${_CUR_CFLAGS}"
19333 LDFLAGS="${_CUR_LDFLAGS}"
19334 ;;
19335esac
19336
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019337{ echo "$as_me:$LINENO: checking for hstrerror" >&5
19338echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019339cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019340/* confdefs.h. */
19341_ACEOF
19342cat confdefs.h >>conftest.$ac_ext
19343cat >>conftest.$ac_ext <<_ACEOF
19344/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019345
19346#include "confdefs.h"
19347#include <netdb.h>
19348
Martin v. Löwise9416172003-05-03 10:12:45 +000019349int
19350main ()
19351{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019352void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019353 ;
19354 return 0;
19355}
19356_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019357rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019358if { (ac_try="$ac_link"
19359case "(($ac_try" in
19360 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19361 *) ac_try_echo=$ac_try;;
19362esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019363eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019364 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019365 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019366 grep -v '^ *+' conftest.er1 >conftest.err
19367 rm -f conftest.er1
19368 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019370 (exit $ac_status); } && {
19371 test -z "$ac_c_werror_flag" ||
19372 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019373 } && test -s conftest$ac_exeext &&
19374 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019375
19376cat >>confdefs.h <<\_ACEOF
19377#define HAVE_HSTRERROR 1
19378_ACEOF
19379
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019380 { echo "$as_me:$LINENO: result: yes" >&5
19381echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019382else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019383 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019384sed 's/^/| /' conftest.$ac_ext >&5
19385
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019386 { echo "$as_me:$LINENO: result: no" >&5
19387echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019388
19389fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019390
19391rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019392 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019393
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019394{ echo "$as_me:$LINENO: checking for inet_aton" >&5
19395echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019396cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019397/* confdefs.h. */
19398_ACEOF
19399cat confdefs.h >>conftest.$ac_ext
19400cat >>conftest.$ac_ext <<_ACEOF
19401/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019402
19403#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000019404#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019405#include <sys/socket.h>
19406#include <netinet/in.h>
19407#include <arpa/inet.h>
19408
Martin v. Löwise9416172003-05-03 10:12:45 +000019409int
19410main ()
19411{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019412void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019413 ;
19414 return 0;
19415}
19416_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019417rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019418if { (ac_try="$ac_link"
19419case "(($ac_try" in
19420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19421 *) ac_try_echo=$ac_try;;
19422esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019424 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019425 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019426 grep -v '^ *+' conftest.er1 >conftest.err
19427 rm -f conftest.er1
19428 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019430 (exit $ac_status); } && {
19431 test -z "$ac_c_werror_flag" ||
19432 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019433 } && test -s conftest$ac_exeext &&
19434 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019435
19436cat >>confdefs.h <<\_ACEOF
19437#define HAVE_INET_ATON 1
19438_ACEOF
19439
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019440 { echo "$as_me:$LINENO: result: yes" >&5
19441echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019442else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019443 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019444sed 's/^/| /' conftest.$ac_ext >&5
19445
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019446 { echo "$as_me:$LINENO: result: no" >&5
19447echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019448
19449fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019450
19451rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019452 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019453
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019454{ echo "$as_me:$LINENO: checking for inet_pton" >&5
19455echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019456cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019457/* confdefs.h. */
19458_ACEOF
19459cat confdefs.h >>conftest.$ac_ext
19460cat >>conftest.$ac_ext <<_ACEOF
19461/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019462
19463#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019464#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019465#include <sys/socket.h>
19466#include <netinet/in.h>
19467#include <arpa/inet.h>
19468
Martin v. Löwise9416172003-05-03 10:12:45 +000019469int
19470main ()
19471{
19472void* p = inet_pton
19473 ;
19474 return 0;
19475}
19476_ACEOF
19477rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019478if { (ac_try="$ac_compile"
19479case "(($ac_try" in
19480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19481 *) ac_try_echo=$ac_try;;
19482esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019484 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019485 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019486 grep -v '^ *+' conftest.er1 >conftest.err
19487 rm -f conftest.er1
19488 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019490 (exit $ac_status); } && {
19491 test -z "$ac_c_werror_flag" ||
19492 test ! -s conftest.err
19493 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019494
19495cat >>confdefs.h <<\_ACEOF
19496#define HAVE_INET_PTON 1
19497_ACEOF
19498
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019499 { echo "$as_me:$LINENO: result: yes" >&5
19500echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019501else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019502 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019503sed 's/^/| /' conftest.$ac_ext >&5
19504
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019505 { echo "$as_me:$LINENO: result: no" >&5
19506echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019507
19508fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019509
19510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019511
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019512# On some systems, setgroups is in unistd.h, on others, in grp.h
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019513{ echo "$as_me:$LINENO: checking for setgroups" >&5
19514echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019515cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019516/* confdefs.h. */
19517_ACEOF
19518cat confdefs.h >>conftest.$ac_ext
19519cat >>conftest.$ac_ext <<_ACEOF
19520/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019521
19522#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019523#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019524#ifdef HAVE_GRP_H
19525#include <grp.h>
19526#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019527
Martin v. Löwisd5843682002-11-21 20:41:28 +000019528int
19529main ()
19530{
19531void* p = setgroups
19532 ;
19533 return 0;
19534}
19535_ACEOF
19536rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019537if { (ac_try="$ac_compile"
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_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +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
19552 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019553
19554cat >>confdefs.h <<\_ACEOF
19555#define HAVE_SETGROUPS 1
19556_ACEOF
19557
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019558 { echo "$as_me:$LINENO: result: yes" >&5
19559echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019560else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019561 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019562sed 's/^/| /' conftest.$ac_ext >&5
19563
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019564 { echo "$as_me:$LINENO: result: no" >&5
19565echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019566
19567fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019568
19569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019570
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019571# check for openpty and forkpty
19572
Martin v. Löwis11437992002-04-12 09:54:03 +000019573
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019574for ac_func in openpty
19575do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019576as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19577{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19578echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019579if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019580 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019581else
Martin v. Löwis11437992002-04-12 09:54:03 +000019582 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019583/* confdefs.h. */
19584_ACEOF
19585cat confdefs.h >>conftest.$ac_ext
19586cat >>conftest.$ac_ext <<_ACEOF
19587/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019588/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19589 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19590#define $ac_func innocuous_$ac_func
19591
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019592/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019593 which can conflict with char $ac_func (); below.
19594 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019595 <limits.h> exists even on freestanding compilers. */
19596
19597#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019598# include <limits.h>
19599#else
19600# include <assert.h>
19601#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019602
19603#undef $ac_func
19604
Martin v. Löwiseba40652007-08-30 20:10:57 +000019605/* Override any GCC internal prototype to avoid an error.
19606 Use char because int might match the return type of a GCC
19607 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019608#ifdef __cplusplus
19609extern "C"
19610#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019611char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019612/* The GNU C library defines this for functions which it implements
19613 to always fail with ENOSYS. Some functions are actually named
19614 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019615#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019616choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019617#endif
19618
Skip Montanaro6dead952003-09-25 14:50:04 +000019619int
19620main ()
19621{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019622return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019623 ;
19624 return 0;
19625}
19626_ACEOF
19627rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019628if { (ac_try="$ac_link"
19629case "(($ac_try" in
19630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19631 *) ac_try_echo=$ac_try;;
19632esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019634 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019635 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019636 grep -v '^ *+' conftest.er1 >conftest.err
19637 rm -f conftest.er1
19638 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019640 (exit $ac_status); } && {
19641 test -z "$ac_c_werror_flag" ||
19642 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019643 } && test -s conftest$ac_exeext &&
19644 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019645 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019646else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019647 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019648sed 's/^/| /' conftest.$ac_ext >&5
19649
Martin v. Löwiseba40652007-08-30 20:10:57 +000019650 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019651fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019652
19653rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019654 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019655fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019656ac_res=`eval echo '${'$as_ac_var'}'`
19657 { echo "$as_me:$LINENO: result: $ac_res" >&5
19658echo "${ECHO_T}$ac_res" >&6; }
19659if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019660 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019661#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019662_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019663
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019664else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019665 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19666echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019667if test "${ac_cv_lib_util_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019668 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019669else
Martin v. Löwis11437992002-04-12 09:54:03 +000019670 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019671LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019672cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019673/* confdefs.h. */
19674_ACEOF
19675cat confdefs.h >>conftest.$ac_ext
19676cat >>conftest.$ac_ext <<_ACEOF
19677/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019678
Martin v. Löwiseba40652007-08-30 20:10:57 +000019679/* Override any GCC internal prototype to avoid an error.
19680 Use char because int might match the return type of a GCC
19681 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019682#ifdef __cplusplus
19683extern "C"
19684#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019685char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019686int
19687main ()
19688{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019689return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019690 ;
19691 return 0;
19692}
19693_ACEOF
19694rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019695if { (ac_try="$ac_link"
19696case "(($ac_try" in
19697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19698 *) ac_try_echo=$ac_try;;
19699esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019701 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019702 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019703 grep -v '^ *+' conftest.er1 >conftest.err
19704 rm -f conftest.er1
19705 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019707 (exit $ac_status); } && {
19708 test -z "$ac_c_werror_flag" ||
19709 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019710 } && test -s conftest$ac_exeext &&
19711 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019712 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019713else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019714 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019715sed 's/^/| /' conftest.$ac_ext >&5
19716
Martin v. Löwiseba40652007-08-30 20:10:57 +000019717 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019718fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019719
19720rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019721 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019722LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019723fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019724{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19725echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19726if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019727 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019728#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019729_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019730 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019731else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019732 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19733echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019734if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019735 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019736else
19737 ac_check_lib_save_LIBS=$LIBS
19738LIBS="-lbsd $LIBS"
19739cat >conftest.$ac_ext <<_ACEOF
19740/* confdefs.h. */
19741_ACEOF
19742cat confdefs.h >>conftest.$ac_ext
19743cat >>conftest.$ac_ext <<_ACEOF
19744/* end confdefs.h. */
19745
Martin v. Löwiseba40652007-08-30 20:10:57 +000019746/* Override any GCC internal prototype to avoid an error.
19747 Use char because int might match the return type of a GCC
19748 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019749#ifdef __cplusplus
19750extern "C"
19751#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019752char openpty ();
19753int
19754main ()
19755{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019756return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019757 ;
19758 return 0;
19759}
19760_ACEOF
19761rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019762if { (ac_try="$ac_link"
19763case "(($ac_try" in
19764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19765 *) ac_try_echo=$ac_try;;
19766esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019768 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019769 ac_status=$?
19770 grep -v '^ *+' conftest.er1 >conftest.err
19771 rm -f conftest.er1
19772 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019774 (exit $ac_status); } && {
19775 test -z "$ac_c_werror_flag" ||
19776 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019777 } && test -s conftest$ac_exeext &&
19778 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019779 ac_cv_lib_bsd_openpty=yes
19780else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019781 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019782sed 's/^/| /' conftest.$ac_ext >&5
19783
Martin v. Löwiseba40652007-08-30 20:10:57 +000019784 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019785fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019786
19787rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019788 conftest$ac_exeext conftest.$ac_ext
19789LIBS=$ac_check_lib_save_LIBS
19790fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019791{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19792echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
19793if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019794 cat >>confdefs.h <<\_ACEOF
19795#define HAVE_OPENPTY 1
19796_ACEOF
19797 LIBS="$LIBS -lbsd"
19798fi
19799
19800
19801fi
19802
Fred Drake8cef4cf2000-06-28 16:40:38 +000019803
19804fi
19805done
19806
Martin v. Löwis11437992002-04-12 09:54:03 +000019807
Fred Drake8cef4cf2000-06-28 16:40:38 +000019808for ac_func in forkpty
19809do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019810as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19811{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19812echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019813if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019814 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019815else
Martin v. Löwis11437992002-04-12 09:54:03 +000019816 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019817/* confdefs.h. */
19818_ACEOF
19819cat confdefs.h >>conftest.$ac_ext
19820cat >>conftest.$ac_ext <<_ACEOF
19821/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019822/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19823 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19824#define $ac_func innocuous_$ac_func
19825
Fred Drake8cef4cf2000-06-28 16:40:38 +000019826/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019827 which can conflict with char $ac_func (); below.
19828 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019829 <limits.h> exists even on freestanding compilers. */
19830
19831#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019832# include <limits.h>
19833#else
19834# include <assert.h>
19835#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019836
19837#undef $ac_func
19838
Martin v. Löwiseba40652007-08-30 20:10:57 +000019839/* Override any GCC internal prototype to avoid an error.
19840 Use char because int might match the return type of a GCC
19841 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019842#ifdef __cplusplus
19843extern "C"
19844#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019845char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019846/* The GNU C library defines this for functions which it implements
19847 to always fail with ENOSYS. Some functions are actually named
19848 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019849#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019850choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019851#endif
19852
Skip Montanaro6dead952003-09-25 14:50:04 +000019853int
19854main ()
19855{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019856return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019857 ;
19858 return 0;
19859}
19860_ACEOF
19861rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019862if { (ac_try="$ac_link"
19863case "(($ac_try" in
19864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19865 *) ac_try_echo=$ac_try;;
19866esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019868 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019869 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019870 grep -v '^ *+' conftest.er1 >conftest.err
19871 rm -f conftest.er1
19872 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019874 (exit $ac_status); } && {
19875 test -z "$ac_c_werror_flag" ||
19876 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019877 } && test -s conftest$ac_exeext &&
19878 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019879 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019880else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019881 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019882sed 's/^/| /' conftest.$ac_ext >&5
19883
Martin v. Löwiseba40652007-08-30 20:10:57 +000019884 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019885fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019886
19887rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019888 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019889fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019890ac_res=`eval echo '${'$as_ac_var'}'`
19891 { echo "$as_me:$LINENO: result: $ac_res" >&5
19892echo "${ECHO_T}$ac_res" >&6; }
19893if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019894 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019895#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019896_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019897
Fred Drake8cef4cf2000-06-28 16:40:38 +000019898else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019899 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19900echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019901if test "${ac_cv_lib_util_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019902 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019903else
Martin v. Löwis11437992002-04-12 09:54:03 +000019904 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019905LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019906cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019907/* confdefs.h. */
19908_ACEOF
19909cat confdefs.h >>conftest.$ac_ext
19910cat >>conftest.$ac_ext <<_ACEOF
19911/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019912
Martin v. Löwiseba40652007-08-30 20:10:57 +000019913/* Override any GCC internal prototype to avoid an error.
19914 Use char because int might match the return type of a GCC
19915 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019916#ifdef __cplusplus
19917extern "C"
19918#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019919char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019920int
19921main ()
19922{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019923return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019924 ;
19925 return 0;
19926}
19927_ACEOF
19928rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019929if { (ac_try="$ac_link"
19930case "(($ac_try" in
19931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19932 *) ac_try_echo=$ac_try;;
19933esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019935 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019936 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019937 grep -v '^ *+' conftest.er1 >conftest.err
19938 rm -f conftest.er1
19939 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019941 (exit $ac_status); } && {
19942 test -z "$ac_c_werror_flag" ||
19943 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019944 } && test -s conftest$ac_exeext &&
19945 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019946 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019947else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019948 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019949sed 's/^/| /' conftest.$ac_ext >&5
19950
Martin v. Löwiseba40652007-08-30 20:10:57 +000019951 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019952fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019953
19954rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019955 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019956LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019957fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019958{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19959echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19960if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019961 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019962#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019963_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019964 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019965else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019966 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19967echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019968if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019969 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019970else
19971 ac_check_lib_save_LIBS=$LIBS
19972LIBS="-lbsd $LIBS"
19973cat >conftest.$ac_ext <<_ACEOF
19974/* confdefs.h. */
19975_ACEOF
19976cat confdefs.h >>conftest.$ac_ext
19977cat >>conftest.$ac_ext <<_ACEOF
19978/* end confdefs.h. */
19979
Martin v. Löwiseba40652007-08-30 20:10:57 +000019980/* Override any GCC internal prototype to avoid an error.
19981 Use char because int might match the return type of a GCC
19982 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019983#ifdef __cplusplus
19984extern "C"
19985#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019986char forkpty ();
19987int
19988main ()
19989{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019990return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019991 ;
19992 return 0;
19993}
19994_ACEOF
19995rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019996if { (ac_try="$ac_link"
19997case "(($ac_try" in
19998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19999 *) ac_try_echo=$ac_try;;
20000esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020002 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020003 ac_status=$?
20004 grep -v '^ *+' conftest.er1 >conftest.err
20005 rm -f conftest.er1
20006 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020008 (exit $ac_status); } && {
20009 test -z "$ac_c_werror_flag" ||
20010 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020011 } && test -s conftest$ac_exeext &&
20012 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020013 ac_cv_lib_bsd_forkpty=yes
20014else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020015 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020016sed 's/^/| /' conftest.$ac_ext >&5
20017
Martin v. Löwiseba40652007-08-30 20:10:57 +000020018 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020019fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020020
20021rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020022 conftest$ac_exeext conftest.$ac_ext
20023LIBS=$ac_check_lib_save_LIBS
20024fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020025{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
20026echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
20027if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020028 cat >>confdefs.h <<\_ACEOF
20029#define HAVE_FORKPTY 1
20030_ACEOF
20031 LIBS="$LIBS -lbsd"
20032fi
20033
20034
20035fi
20036
Fred Drake8cef4cf2000-06-28 16:40:38 +000020037
20038fi
20039done
20040
Jack Jansendd19cf82001-12-06 22:36:17 +000020041
Brett Cannonaa5778d2008-03-18 04:09:00 +000020042# Stuff for expat.
20043
20044for ac_func in memmove
20045do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020046as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20047{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20048echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Brett Cannonaa5778d2008-03-18 04:09:00 +000020049if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020050 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannonaa5778d2008-03-18 04:09:00 +000020051else
20052 cat >conftest.$ac_ext <<_ACEOF
20053/* confdefs.h. */
20054_ACEOF
20055cat confdefs.h >>conftest.$ac_ext
20056cat >>conftest.$ac_ext <<_ACEOF
20057/* end confdefs.h. */
20058/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20059 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20060#define $ac_func innocuous_$ac_func
20061
20062/* System header to define __stub macros and hopefully few prototypes,
20063 which can conflict with char $ac_func (); below.
20064 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20065 <limits.h> exists even on freestanding compilers. */
20066
20067#ifdef __STDC__
20068# include <limits.h>
20069#else
20070# include <assert.h>
20071#endif
20072
20073#undef $ac_func
20074
20075/* Override any GCC internal prototype to avoid an error.
20076 Use char because int might match the return type of a GCC
20077 builtin and then its argument prototype would still apply. */
20078#ifdef __cplusplus
20079extern "C"
20080#endif
20081char $ac_func ();
20082/* The GNU C library defines this for functions which it implements
20083 to always fail with ENOSYS. Some functions are actually named
20084 something starting with __ and the normal name is an alias. */
20085#if defined __stub_$ac_func || defined __stub___$ac_func
20086choke me
20087#endif
20088
20089int
20090main ()
20091{
20092return $ac_func ();
20093 ;
20094 return 0;
20095}
20096_ACEOF
20097rm -f conftest.$ac_objext conftest$ac_exeext
20098if { (ac_try="$ac_link"
20099case "(($ac_try" in
20100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20101 *) ac_try_echo=$ac_try;;
20102esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020104 (eval "$ac_link") 2>conftest.er1
20105 ac_status=$?
20106 grep -v '^ *+' conftest.er1 >conftest.err
20107 rm -f conftest.er1
20108 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020110 (exit $ac_status); } && {
20111 test -z "$ac_c_werror_flag" ||
20112 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020113 } && test -s conftest$ac_exeext &&
20114 $as_test_x conftest$ac_exeext; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000020115 eval "$as_ac_var=yes"
20116else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020117 echo "$as_me: failed program was:" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020118sed 's/^/| /' conftest.$ac_ext >&5
20119
20120 eval "$as_ac_var=no"
20121fi
20122
20123rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20124 conftest$ac_exeext conftest.$ac_ext
20125fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020126ac_res=`eval echo '${'$as_ac_var'}'`
20127 { echo "$as_me:$LINENO: result: $ac_res" >&5
20128echo "${ECHO_T}$ac_res" >&6; }
20129if test `eval echo '${'$as_ac_var'}'` = yes; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000020130 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020131#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000020132_ACEOF
20133
20134fi
20135done
20136
20137
Michael W. Hudson54241132001-12-07 15:38:26 +000020138# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000020139
20140
20141
20142
20143
20144
Fred Drake8cef4cf2000-06-28 16:40:38 +000020145for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
20146do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020147as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20148{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20149echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020150if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020151 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020152else
Martin v. Löwis11437992002-04-12 09:54:03 +000020153 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020154/* confdefs.h. */
20155_ACEOF
20156cat confdefs.h >>conftest.$ac_ext
20157cat >>conftest.$ac_ext <<_ACEOF
20158/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020159/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20160 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20161#define $ac_func innocuous_$ac_func
20162
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020163/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020164 which can conflict with char $ac_func (); below.
20165 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020166 <limits.h> exists even on freestanding compilers. */
20167
20168#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020169# include <limits.h>
20170#else
20171# include <assert.h>
20172#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020173
20174#undef $ac_func
20175
Martin v. Löwiseba40652007-08-30 20:10:57 +000020176/* Override any GCC internal prototype to avoid an error.
20177 Use char because int might match the return type of a GCC
20178 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020179#ifdef __cplusplus
20180extern "C"
20181#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020182char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020183/* The GNU C library defines this for functions which it implements
20184 to always fail with ENOSYS. Some functions are actually named
20185 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020186#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020187choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020188#endif
20189
Skip Montanaro6dead952003-09-25 14:50:04 +000020190int
20191main ()
20192{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020193return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020194 ;
20195 return 0;
20196}
20197_ACEOF
20198rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020199if { (ac_try="$ac_link"
20200case "(($ac_try" in
20201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20202 *) ac_try_echo=$ac_try;;
20203esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020205 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020206 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020207 grep -v '^ *+' conftest.er1 >conftest.err
20208 rm -f conftest.er1
20209 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020211 (exit $ac_status); } && {
20212 test -z "$ac_c_werror_flag" ||
20213 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020214 } && test -s conftest$ac_exeext &&
20215 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020216 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020217else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020219sed 's/^/| /' conftest.$ac_ext >&5
20220
Martin v. Löwiseba40652007-08-30 20:10:57 +000020221 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020223
20224rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020225 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020226fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020227ac_res=`eval echo '${'$as_ac_var'}'`
20228 { echo "$as_me:$LINENO: result: $ac_res" >&5
20229echo "${ECHO_T}$ac_res" >&6; }
20230if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020231 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020232#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020233_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000020234
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020235fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000020236done
20237
Michael W. Hudson54241132001-12-07 15:38:26 +000020238
Martin v. Löwis11437992002-04-12 09:54:03 +000020239
20240
20241
Brett Cannonaa5778d2008-03-18 04:09:00 +000020242for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000020243do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020244as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20245{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20246echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020247if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020248 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020249else
Martin v. Löwis11437992002-04-12 09:54:03 +000020250 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020251/* confdefs.h. */
20252_ACEOF
20253cat confdefs.h >>conftest.$ac_ext
20254cat >>conftest.$ac_ext <<_ACEOF
20255/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020256/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20257 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20258#define $ac_func innocuous_$ac_func
20259
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020260/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020261 which can conflict with char $ac_func (); below.
20262 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020263 <limits.h> exists even on freestanding compilers. */
20264
20265#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020266# include <limits.h>
20267#else
20268# include <assert.h>
20269#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020270
20271#undef $ac_func
20272
Martin v. Löwiseba40652007-08-30 20:10:57 +000020273/* Override any GCC internal prototype to avoid an error.
20274 Use char because int might match the return type of a GCC
20275 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020276#ifdef __cplusplus
20277extern "C"
20278#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020279char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000020280/* The GNU C library defines this for functions which it implements
20281 to always fail with ENOSYS. Some functions are actually named
20282 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020283#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000020284choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000020285#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020286
Skip Montanaro6dead952003-09-25 14:50:04 +000020287int
20288main ()
20289{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020290return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020291 ;
20292 return 0;
20293}
20294_ACEOF
20295rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020296if { (ac_try="$ac_link"
20297case "(($ac_try" in
20298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20299 *) ac_try_echo=$ac_try;;
20300esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020302 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020303 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020304 grep -v '^ *+' conftest.er1 >conftest.err
20305 rm -f conftest.er1
20306 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020308 (exit $ac_status); } && {
20309 test -z "$ac_c_werror_flag" ||
20310 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020311 } && test -s conftest$ac_exeext &&
20312 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020313 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020314else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020315 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020316sed 's/^/| /' conftest.$ac_ext >&5
20317
Martin v. Löwiseba40652007-08-30 20:10:57 +000020318 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020319fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020320
20321rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020322 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000020323fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020324ac_res=`eval echo '${'$as_ac_var'}'`
20325 { echo "$as_me:$LINENO: result: $ac_res" >&5
20326echo "${ECHO_T}$ac_res" >&6; }
20327if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020328 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020329#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020330_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000020331
Martin v. Löwis1142de32002-03-29 16:28:31 +000020332else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020333 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020334 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020335 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20336 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020337esac
20338
Martin v. Löwis1142de32002-03-29 16:28:31 +000020339fi
20340done
20341
20342
Martin v. Löwis11437992002-04-12 09:54:03 +000020343
Martin v. Löwis1142de32002-03-29 16:28:31 +000020344for ac_func in getpgrp
20345do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020346as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20347{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20348echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020349if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020350 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000020351else
Martin v. Löwis11437992002-04-12 09:54:03 +000020352 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020353/* confdefs.h. */
20354_ACEOF
20355cat confdefs.h >>conftest.$ac_ext
20356cat >>conftest.$ac_ext <<_ACEOF
20357/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020358/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20359 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20360#define $ac_func innocuous_$ac_func
20361
Martin v. Löwis1142de32002-03-29 16:28:31 +000020362/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020363 which can conflict with char $ac_func (); below.
20364 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020365 <limits.h> exists even on freestanding compilers. */
20366
20367#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020368# include <limits.h>
20369#else
20370# include <assert.h>
20371#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020372
20373#undef $ac_func
20374
Martin v. Löwiseba40652007-08-30 20:10:57 +000020375/* Override any GCC internal prototype to avoid an error.
20376 Use char because int might match the return type of a GCC
20377 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020378#ifdef __cplusplus
20379extern "C"
20380#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020381char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000020382/* The GNU C library defines this for functions which it implements
20383 to always fail with ENOSYS. Some functions are actually named
20384 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020385#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000020386choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000020387#endif
20388
Skip Montanaro6dead952003-09-25 14:50:04 +000020389int
20390main ()
20391{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020392return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020393 ;
20394 return 0;
20395}
20396_ACEOF
20397rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020398if { (ac_try="$ac_link"
20399case "(($ac_try" in
20400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20401 *) ac_try_echo=$ac_try;;
20402esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020404 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020405 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020406 grep -v '^ *+' conftest.er1 >conftest.err
20407 rm -f conftest.er1
20408 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020410 (exit $ac_status); } && {
20411 test -z "$ac_c_werror_flag" ||
20412 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020413 } && test -s conftest$ac_exeext &&
20414 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020415 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020416else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020417 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020418sed 's/^/| /' conftest.$ac_ext >&5
20419
Martin v. Löwiseba40652007-08-30 20:10:57 +000020420 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020421fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020422
20423rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020424 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020425fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020426ac_res=`eval echo '${'$as_ac_var'}'`
20427 { echo "$as_me:$LINENO: result: $ac_res" >&5
20428echo "${ECHO_T}$ac_res" >&6; }
20429if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020430 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020431#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020432_ACEOF
20433 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020434/* confdefs.h. */
20435_ACEOF
20436cat confdefs.h >>conftest.$ac_ext
20437cat >>conftest.$ac_ext <<_ACEOF
20438/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020439#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020440int
20441main ()
20442{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020443getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020444 ;
20445 return 0;
20446}
20447_ACEOF
20448rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020449if { (ac_try="$ac_compile"
20450case "(($ac_try" in
20451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20452 *) ac_try_echo=$ac_try;;
20453esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020455 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020456 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020457 grep -v '^ *+' conftest.er1 >conftest.err
20458 rm -f conftest.er1
20459 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020461 (exit $ac_status); } && {
20462 test -z "$ac_c_werror_flag" ||
20463 test ! -s conftest.err
20464 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020465
20466cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020467#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020468_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020469
Martin v. Löwis11437992002-04-12 09:54:03 +000020470
Guido van Rossumf78abae1997-01-21 22:02:36 +000020471else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020472 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020473sed 's/^/| /' conftest.$ac_ext >&5
20474
Martin v. Löwiseba40652007-08-30 20:10:57 +000020475
Guido van Rossum627b2d71993-12-24 10:39:16 +000020476fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020477
20478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020479
Guido van Rossum627b2d71993-12-24 10:39:16 +000020480fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020481done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020482
Jack Jansen150753c2003-03-29 22:07:47 +000020483
20484for ac_func in setpgrp
20485do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020486as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20487{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20488echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020489if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020490 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020491else
Martin v. Löwis11437992002-04-12 09:54:03 +000020492 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020493/* confdefs.h. */
20494_ACEOF
20495cat confdefs.h >>conftest.$ac_ext
20496cat >>conftest.$ac_ext <<_ACEOF
20497/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020498/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20499 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20500#define $ac_func innocuous_$ac_func
20501
Jack Jansen150753c2003-03-29 22:07:47 +000020502/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020503 which can conflict with char $ac_func (); below.
20504 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020505 <limits.h> exists even on freestanding compilers. */
20506
20507#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020508# include <limits.h>
20509#else
20510# include <assert.h>
20511#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020512
20513#undef $ac_func
20514
Martin v. Löwiseba40652007-08-30 20:10:57 +000020515/* Override any GCC internal prototype to avoid an error.
20516 Use char because int might match the return type of a GCC
20517 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020518#ifdef __cplusplus
20519extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020520#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020521char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020522/* The GNU C library defines this for functions which it implements
20523 to always fail with ENOSYS. Some functions are actually named
20524 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020525#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020526choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020527#endif
20528
Skip Montanaro6dead952003-09-25 14:50:04 +000020529int
20530main ()
20531{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020532return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020533 ;
20534 return 0;
20535}
20536_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020537rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020538if { (ac_try="$ac_link"
20539case "(($ac_try" in
20540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20541 *) ac_try_echo=$ac_try;;
20542esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020544 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020545 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020546 grep -v '^ *+' conftest.er1 >conftest.err
20547 rm -f conftest.er1
20548 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020550 (exit $ac_status); } && {
20551 test -z "$ac_c_werror_flag" ||
20552 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020553 } && test -s conftest$ac_exeext &&
20554 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000020555 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020556else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020557 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020558sed 's/^/| /' conftest.$ac_ext >&5
20559
Martin v. Löwiseba40652007-08-30 20:10:57 +000020560 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020561fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020562
20563rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020564 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020565fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020566ac_res=`eval echo '${'$as_ac_var'}'`
20567 { echo "$as_me:$LINENO: result: $ac_res" >&5
20568echo "${ECHO_T}$ac_res" >&6; }
20569if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020570 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020571#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020572_ACEOF
20573 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020574/* confdefs.h. */
20575_ACEOF
20576cat confdefs.h >>conftest.$ac_ext
20577cat >>conftest.$ac_ext <<_ACEOF
20578/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020579#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020580int
20581main ()
20582{
20583setpgrp(0,0);
20584 ;
20585 return 0;
20586}
20587_ACEOF
20588rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020589if { (ac_try="$ac_compile"
20590case "(($ac_try" in
20591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20592 *) ac_try_echo=$ac_try;;
20593esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020595 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020596 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020597 grep -v '^ *+' conftest.er1 >conftest.err
20598 rm -f conftest.er1
20599 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020601 (exit $ac_status); } && {
20602 test -z "$ac_c_werror_flag" ||
20603 test ! -s conftest.err
20604 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020605
20606cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020607#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020608_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020609
Jack Jansen150753c2003-03-29 22:07:47 +000020610
20611else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020612 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020613sed 's/^/| /' conftest.$ac_ext >&5
20614
Martin v. Löwiseba40652007-08-30 20:10:57 +000020615
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020616fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020617
20618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020619
20620fi
20621done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020622
Martin v. Löwis11437992002-04-12 09:54:03 +000020623
Thomas Wouters3a584202000-08-05 23:28:51 +000020624for ac_func in gettimeofday
20625do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020626as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20627{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20628echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020629if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020630 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020631else
Martin v. Löwis11437992002-04-12 09:54:03 +000020632 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020633/* confdefs.h. */
20634_ACEOF
20635cat confdefs.h >>conftest.$ac_ext
20636cat >>conftest.$ac_ext <<_ACEOF
20637/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020638/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20639 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20640#define $ac_func innocuous_$ac_func
20641
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020642/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020643 which can conflict with char $ac_func (); below.
20644 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020645 <limits.h> exists even on freestanding compilers. */
20646
20647#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020648# include <limits.h>
20649#else
20650# include <assert.h>
20651#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020652
20653#undef $ac_func
20654
Martin v. Löwiseba40652007-08-30 20:10:57 +000020655/* Override any GCC internal prototype to avoid an error.
20656 Use char because int might match the return type of a GCC
20657 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020658#ifdef __cplusplus
20659extern "C"
20660#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020661char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020662/* The GNU C library defines this for functions which it implements
20663 to always fail with ENOSYS. Some functions are actually named
20664 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020665#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020666choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020667#endif
20668
Skip Montanaro6dead952003-09-25 14:50:04 +000020669int
20670main ()
20671{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020672return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020673 ;
20674 return 0;
20675}
20676_ACEOF
20677rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020678if { (ac_try="$ac_link"
20679case "(($ac_try" in
20680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20681 *) ac_try_echo=$ac_try;;
20682esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020683eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020684 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020685 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020686 grep -v '^ *+' conftest.er1 >conftest.err
20687 rm -f conftest.er1
20688 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020690 (exit $ac_status); } && {
20691 test -z "$ac_c_werror_flag" ||
20692 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020693 } && test -s conftest$ac_exeext &&
20694 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020695 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020696else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020697 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020698sed 's/^/| /' conftest.$ac_ext >&5
20699
Martin v. Löwiseba40652007-08-30 20:10:57 +000020700 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020701fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020702
20703rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020704 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020705fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020706ac_res=`eval echo '${'$as_ac_var'}'`
20707 { echo "$as_me:$LINENO: result: $ac_res" >&5
20708echo "${ECHO_T}$ac_res" >&6; }
20709if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020710 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020711#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020712_ACEOF
20713 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020714/* confdefs.h. */
20715_ACEOF
20716cat confdefs.h >>conftest.$ac_ext
20717cat >>conftest.$ac_ext <<_ACEOF
20718/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020719#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020720int
20721main ()
20722{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020723gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020724 ;
20725 return 0;
20726}
20727_ACEOF
20728rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020729if { (ac_try="$ac_compile"
20730case "(($ac_try" in
20731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20732 *) ac_try_echo=$ac_try;;
20733esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020735 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020736 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020737 grep -v '^ *+' conftest.er1 >conftest.err
20738 rm -f conftest.er1
20739 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020741 (exit $ac_status); } && {
20742 test -z "$ac_c_werror_flag" ||
20743 test ! -s conftest.err
20744 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020745 :
20746else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020748sed 's/^/| /' conftest.$ac_ext >&5
20749
Martin v. Löwis11437992002-04-12 09:54:03 +000020750
20751cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020752#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020753_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020754
Martin v. Löwis11437992002-04-12 09:54:03 +000020755
Guido van Rossum627b2d71993-12-24 10:39:16 +000020756fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020757
20758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020759
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020760fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020761done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020762
Michael W. Hudson54241132001-12-07 15:38:26 +000020763
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020764{ echo "$as_me:$LINENO: checking for major" >&5
20765echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020766cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020767/* confdefs.h. */
20768_ACEOF
20769cat confdefs.h >>conftest.$ac_ext
20770cat >>conftest.$ac_ext <<_ACEOF
20771/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020772
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020773#if defined(MAJOR_IN_MKDEV)
20774#include <sys/mkdev.h>
20775#elif defined(MAJOR_IN_SYSMACROS)
20776#include <sys/sysmacros.h>
20777#else
20778#include <sys/types.h>
20779#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020780
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020781int
20782main ()
20783{
20784
20785 makedev(major(0),minor(0));
20786
20787 ;
20788 return 0;
20789}
20790_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020791rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020792if { (ac_try="$ac_link"
20793case "(($ac_try" in
20794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20795 *) ac_try_echo=$ac_try;;
20796esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020798 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020799 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020800 grep -v '^ *+' conftest.er1 >conftest.err
20801 rm -f conftest.er1
20802 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020804 (exit $ac_status); } && {
20805 test -z "$ac_c_werror_flag" ||
20806 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020807 } && test -s conftest$ac_exeext &&
20808 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020809
20810
20811cat >>confdefs.h <<\_ACEOF
20812#define HAVE_DEVICE_MACROS 1
20813_ACEOF
20814
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020815 { echo "$as_me:$LINENO: result: yes" >&5
20816echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020817
20818else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020819 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020820sed 's/^/| /' conftest.$ac_ext >&5
20821
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020822
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020823 { echo "$as_me:$LINENO: result: no" >&5
20824echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020825
20826fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020827
20828rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020829 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020830
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020831# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020832# for [no]getaddrinfo in netdb.h.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020833{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20834echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020835cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020836/* confdefs.h. */
20837_ACEOF
20838cat confdefs.h >>conftest.$ac_ext
20839cat >>conftest.$ac_ext <<_ACEOF
20840/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020841
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020842#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020843#include <sys/socket.h>
20844#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020845#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020846
Martin v. Löwis11437992002-04-12 09:54:03 +000020847int
20848main ()
20849{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020850getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020851 ;
20852 return 0;
20853}
20854_ACEOF
20855rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020856if { (ac_try="$ac_link"
20857case "(($ac_try" in
20858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20859 *) ac_try_echo=$ac_try;;
20860esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020862 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020863 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020864 grep -v '^ *+' conftest.er1 >conftest.err
20865 rm -f conftest.er1
20866 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020868 (exit $ac_status); } && {
20869 test -z "$ac_c_werror_flag" ||
20870 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020871 } && test -s conftest$ac_exeext &&
20872 $as_test_x conftest$ac_exeext; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020873 have_getaddrinfo=yes
20874else
20875 echo "$as_me: failed program was:" >&5
20876sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020877
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020878 have_getaddrinfo=no
20879fi
20880
20881rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20882 conftest$ac_exeext conftest.$ac_ext
20883{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20884echo "${ECHO_T}$have_getaddrinfo" >&6; }
20885if test $have_getaddrinfo = yes
20886then
20887 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020888echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020889 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
20890 echo $ECHO_N "(cached) $ECHO_C" >&6
20891else
20892 if test "$cross_compiling" = yes; then
20893 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020894else
Martin v. Löwis11437992002-04-12 09:54:03 +000020895 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020896/* confdefs.h. */
20897_ACEOF
20898cat confdefs.h >>conftest.$ac_ext
20899cat >>conftest.$ac_ext <<_ACEOF
20900/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020901
20902#include <sys/types.h>
20903#include <netdb.h>
20904#include <string.h>
20905#include <sys/socket.h>
20906#include <netinet/in.h>
20907
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020908int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020909{
20910 int passive, gaierr, inet4 = 0, inet6 = 0;
20911 struct addrinfo hints, *ai, *aitop;
20912 char straddr[INET6_ADDRSTRLEN], strport[16];
20913
20914 for (passive = 0; passive <= 1; passive++) {
20915 memset(&hints, 0, sizeof(hints));
20916 hints.ai_family = AF_UNSPEC;
20917 hints.ai_flags = passive ? AI_PASSIVE : 0;
20918 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020919 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020920 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20921 (void)gai_strerror(gaierr);
20922 goto bad;
20923 }
20924 for (ai = aitop; ai; ai = ai->ai_next) {
20925 if (ai->ai_addr == NULL ||
20926 ai->ai_addrlen == 0 ||
20927 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20928 straddr, sizeof(straddr), strport, sizeof(strport),
20929 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20930 goto bad;
20931 }
20932 switch (ai->ai_family) {
20933 case AF_INET:
20934 if (strcmp(strport, "54321") != 0) {
20935 goto bad;
20936 }
20937 if (passive) {
20938 if (strcmp(straddr, "0.0.0.0") != 0) {
20939 goto bad;
20940 }
20941 } else {
20942 if (strcmp(straddr, "127.0.0.1") != 0) {
20943 goto bad;
20944 }
20945 }
20946 inet4++;
20947 break;
20948 case AF_INET6:
20949 if (strcmp(strport, "54321") != 0) {
20950 goto bad;
20951 }
20952 if (passive) {
20953 if (strcmp(straddr, "::") != 0) {
20954 goto bad;
20955 }
20956 } else {
20957 if (strcmp(straddr, "::1") != 0) {
20958 goto bad;
20959 }
20960 }
20961 inet6++;
20962 break;
20963 case AF_UNSPEC:
20964 goto bad;
20965 break;
20966 default:
20967 /* another family support? */
20968 break;
20969 }
20970 }
20971 }
20972
20973 if (!(inet4 == 0 || inet4 == 2))
20974 goto bad;
20975 if (!(inet6 == 0 || inet6 == 2))
20976 goto bad;
20977
20978 if (aitop)
20979 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020980 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020981
20982 bad:
20983 if (aitop)
20984 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020985 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020986}
20987
Martin v. Löwis11437992002-04-12 09:54:03 +000020988_ACEOF
20989rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020990if { (ac_try="$ac_link"
20991case "(($ac_try" in
20992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20993 *) ac_try_echo=$ac_try;;
20994esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020995eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020996 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020997 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020999 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021000 { (case "(($ac_try" in
21001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21002 *) ac_try_echo=$ac_try;;
21003esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021005 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021006 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021008 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021009 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021010else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021011 echo "$as_me: program exited with status $ac_status" >&5
21012echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021013sed 's/^/| /' conftest.$ac_ext >&5
21014
Martin v. Löwis11437992002-04-12 09:54:03 +000021015( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021016ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021017fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021018rm -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 +000021019fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021020
21021
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021022fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021023
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021024fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021025
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021026if test $have_getaddrinfo = no -o $ac_cv_buggy_getaddrinfo = yes
21027then
21028 if test $ipv6 = yes
21029 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021030 echo 'Fatal: You must get working getaddrinfo() function.'
21031 echo ' or you can specify "--disable-ipv6"'.
21032 exit 1
21033 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021034else
Martin v. Löwis11437992002-04-12 09:54:03 +000021035
21036cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021037#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021038_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021039
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021040fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021041
Jack Jansen9a66b6d2001-08-08 13:56:14 +000021042for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021043do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021044as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21045{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21046echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021047if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021048 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021049else
Martin v. Löwis11437992002-04-12 09:54:03 +000021050 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021051/* confdefs.h. */
21052_ACEOF
21053cat confdefs.h >>conftest.$ac_ext
21054cat >>conftest.$ac_ext <<_ACEOF
21055/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021056/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21057 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21058#define $ac_func innocuous_$ac_func
21059
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021060/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021061 which can conflict with char $ac_func (); below.
21062 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021063 <limits.h> exists even on freestanding compilers. */
21064
21065#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021066# include <limits.h>
21067#else
21068# include <assert.h>
21069#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021070
21071#undef $ac_func
21072
Martin v. Löwiseba40652007-08-30 20:10:57 +000021073/* Override any GCC internal prototype to avoid an error.
21074 Use char because int might match the return type of a GCC
21075 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021076#ifdef __cplusplus
21077extern "C"
21078#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021079char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021080/* The GNU C library defines this for functions which it implements
21081 to always fail with ENOSYS. Some functions are actually named
21082 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021083#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021084choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021085#endif
21086
Skip Montanaro6dead952003-09-25 14:50:04 +000021087int
21088main ()
21089{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021090return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021091 ;
21092 return 0;
21093}
21094_ACEOF
21095rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021096if { (ac_try="$ac_link"
21097case "(($ac_try" in
21098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21099 *) ac_try_echo=$ac_try;;
21100esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021102 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021103 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021104 grep -v '^ *+' conftest.er1 >conftest.err
21105 rm -f conftest.er1
21106 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021108 (exit $ac_status); } && {
21109 test -z "$ac_c_werror_flag" ||
21110 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021111 } && test -s conftest$ac_exeext &&
21112 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021113 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021114else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021115 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021116sed 's/^/| /' conftest.$ac_ext >&5
21117
Martin v. Löwiseba40652007-08-30 20:10:57 +000021118 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021119fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021120
21121rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021122 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021123fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021124ac_res=`eval echo '${'$as_ac_var'}'`
21125 { echo "$as_me:$LINENO: result: $ac_res" >&5
21126echo "${ECHO_T}$ac_res" >&6; }
21127if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021128 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021129#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021130_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021131
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021132fi
21133done
21134
Michael W. Hudson54241132001-12-07 15:38:26 +000021135
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021136# checks for structures
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021137{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
21138echo $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 +000021139if test "${ac_cv_header_time+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021140 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021141else
Martin v. Löwis11437992002-04-12 09:54:03 +000021142 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021143/* confdefs.h. */
21144_ACEOF
21145cat confdefs.h >>conftest.$ac_ext
21146cat >>conftest.$ac_ext <<_ACEOF
21147/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021148#include <sys/types.h>
21149#include <sys/time.h>
21150#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021151
Martin v. Löwis11437992002-04-12 09:54:03 +000021152int
21153main ()
21154{
21155if ((struct tm *) 0)
21156return 0;
21157 ;
21158 return 0;
21159}
21160_ACEOF
21161rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021162if { (ac_try="$ac_compile"
21163case "(($ac_try" in
21164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21165 *) ac_try_echo=$ac_try;;
21166esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021167eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021168 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021169 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021170 grep -v '^ *+' conftest.er1 >conftest.err
21171 rm -f conftest.er1
21172 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021174 (exit $ac_status); } && {
21175 test -z "$ac_c_werror_flag" ||
21176 test ! -s conftest.err
21177 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021178 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021179else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021180 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021181sed 's/^/| /' conftest.$ac_ext >&5
21182
Martin v. Löwiseba40652007-08-30 20:10:57 +000021183 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021184fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021185
21186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021187fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021188{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
21189echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021190if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021191
21192cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021193#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021194_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021195
21196fi
21197
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021198{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
21199echo $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 +000021200if test "${ac_cv_struct_tm+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021201 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021202else
Martin v. Löwis11437992002-04-12 09:54:03 +000021203 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021204/* confdefs.h. */
21205_ACEOF
21206cat confdefs.h >>conftest.$ac_ext
21207cat >>conftest.$ac_ext <<_ACEOF
21208/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021209#include <sys/types.h>
21210#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021211
Martin v. Löwis11437992002-04-12 09:54:03 +000021212int
21213main ()
21214{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021215struct tm tm;
21216 int *p = &tm.tm_sec;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021217 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000021218 ;
21219 return 0;
21220}
21221_ACEOF
21222rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021223if { (ac_try="$ac_compile"
21224case "(($ac_try" in
21225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21226 *) ac_try_echo=$ac_try;;
21227esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021229 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021230 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021231 grep -v '^ *+' conftest.er1 >conftest.err
21232 rm -f conftest.er1
21233 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021235 (exit $ac_status); } && {
21236 test -z "$ac_c_werror_flag" ||
21237 test ! -s conftest.err
21238 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021239 ac_cv_struct_tm=time.h
21240else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021241 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021242sed 's/^/| /' conftest.$ac_ext >&5
21243
Martin v. Löwiseba40652007-08-30 20:10:57 +000021244 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021245fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021246
21247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021248fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021249{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
21250echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021251if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021252
21253cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021254#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021255_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021256
21257fi
21258
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021259{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
21260echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021261if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021262 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021263else
Martin v. Löwis11437992002-04-12 09:54:03 +000021264 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021265/* confdefs.h. */
21266_ACEOF
21267cat confdefs.h >>conftest.$ac_ext
21268cat >>conftest.$ac_ext <<_ACEOF
21269/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021270#include <sys/types.h>
21271#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000021272
21273
Martin v. Löwis11437992002-04-12 09:54:03 +000021274int
21275main ()
21276{
21277static struct tm ac_aggr;
21278if (ac_aggr.tm_zone)
21279return 0;
21280 ;
21281 return 0;
21282}
21283_ACEOF
21284rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021285if { (ac_try="$ac_compile"
21286case "(($ac_try" in
21287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21288 *) ac_try_echo=$ac_try;;
21289esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021291 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021292 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021293 grep -v '^ *+' conftest.er1 >conftest.err
21294 rm -f conftest.er1
21295 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021297 (exit $ac_status); } && {
21298 test -z "$ac_c_werror_flag" ||
21299 test ! -s conftest.err
21300 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021301 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021302else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021303 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021304sed 's/^/| /' conftest.$ac_ext >&5
21305
Martin v. Löwiseba40652007-08-30 20:10:57 +000021306 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021307/* confdefs.h. */
21308_ACEOF
21309cat confdefs.h >>conftest.$ac_ext
21310cat >>conftest.$ac_ext <<_ACEOF
21311/* end confdefs.h. */
21312#include <sys/types.h>
21313#include <$ac_cv_struct_tm>
21314
21315
21316int
21317main ()
21318{
21319static struct tm ac_aggr;
21320if (sizeof ac_aggr.tm_zone)
21321return 0;
21322 ;
21323 return 0;
21324}
21325_ACEOF
21326rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021327if { (ac_try="$ac_compile"
21328case "(($ac_try" in
21329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21330 *) ac_try_echo=$ac_try;;
21331esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021333 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021334 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021335 grep -v '^ *+' conftest.er1 >conftest.err
21336 rm -f conftest.er1
21337 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021339 (exit $ac_status); } && {
21340 test -z "$ac_c_werror_flag" ||
21341 test ! -s conftest.err
21342 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021343 ac_cv_member_struct_tm_tm_zone=yes
21344else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021345 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021346sed 's/^/| /' conftest.$ac_ext >&5
21347
Martin v. Löwiseba40652007-08-30 20:10:57 +000021348 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021349fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021350
21351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021352fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021353
21354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021355fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021356{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21357echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
21358if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021359
21360cat >>confdefs.h <<_ACEOF
21361#define HAVE_STRUCT_TM_TM_ZONE 1
21362_ACEOF
21363
21364
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021365fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021366
Martin v. Löwis11437992002-04-12 09:54:03 +000021367if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21368
21369cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021370#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021371_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021372
21373else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021374 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
21375echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021376if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021377 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000021378else
21379 cat >conftest.$ac_ext <<_ACEOF
21380/* confdefs.h. */
21381_ACEOF
21382cat confdefs.h >>conftest.$ac_ext
21383cat >>conftest.$ac_ext <<_ACEOF
21384/* end confdefs.h. */
21385#include <time.h>
21386
21387int
21388main ()
21389{
21390#ifndef tzname
21391 (void) tzname;
21392#endif
21393
21394 ;
21395 return 0;
21396}
21397_ACEOF
21398rm -f conftest.$ac_objext
21399if { (ac_try="$ac_compile"
21400case "(($ac_try" in
21401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21402 *) ac_try_echo=$ac_try;;
21403esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021405 (eval "$ac_compile") 2>conftest.er1
21406 ac_status=$?
21407 grep -v '^ *+' conftest.er1 >conftest.err
21408 rm -f conftest.er1
21409 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021411 (exit $ac_status); } && {
21412 test -z "$ac_c_werror_flag" ||
21413 test ! -s conftest.err
21414 } && test -s conftest.$ac_objext; then
21415 ac_cv_have_decl_tzname=yes
21416else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021417 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021418sed 's/^/| /' conftest.$ac_ext >&5
21419
21420 ac_cv_have_decl_tzname=no
21421fi
21422
21423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21424fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021425{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
21426echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
21427if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021428
21429cat >>confdefs.h <<_ACEOF
21430#define HAVE_DECL_TZNAME 1
21431_ACEOF
21432
21433
21434else
21435 cat >>confdefs.h <<_ACEOF
21436#define HAVE_DECL_TZNAME 0
21437_ACEOF
21438
21439
21440fi
21441
21442
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021443 { echo "$as_me:$LINENO: checking for tzname" >&5
21444echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021445if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021446 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021447else
Martin v. Löwis11437992002-04-12 09:54:03 +000021448 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021449/* confdefs.h. */
21450_ACEOF
21451cat confdefs.h >>conftest.$ac_ext
21452cat >>conftest.$ac_ext <<_ACEOF
21453/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021454#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000021455#if !HAVE_DECL_TZNAME
21456extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021457#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021458
Martin v. Löwis11437992002-04-12 09:54:03 +000021459int
21460main ()
21461{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021462return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021463 ;
21464 return 0;
21465}
21466_ACEOF
21467rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021468if { (ac_try="$ac_link"
21469case "(($ac_try" in
21470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21471 *) ac_try_echo=$ac_try;;
21472esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021474 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021475 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021476 grep -v '^ *+' conftest.er1 >conftest.err
21477 rm -f conftest.er1
21478 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021480 (exit $ac_status); } && {
21481 test -z "$ac_c_werror_flag" ||
21482 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021483 } && test -s conftest$ac_exeext &&
21484 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021485 ac_cv_var_tzname=yes
21486else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021487 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021488sed 's/^/| /' conftest.$ac_ext >&5
21489
Martin v. Löwiseba40652007-08-30 20:10:57 +000021490 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021491fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021492
21493rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021494 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021495fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021496{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21497echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021498 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021499
21500cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021501#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021502_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021503
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021504 fi
21505fi
21506
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021507{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21508echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021509if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021510 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021511else
21512 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021513/* confdefs.h. */
21514_ACEOF
21515cat confdefs.h >>conftest.$ac_ext
21516cat >>conftest.$ac_ext <<_ACEOF
21517/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021518$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021519int
21520main ()
21521{
21522static struct stat ac_aggr;
21523if (ac_aggr.st_rdev)
21524return 0;
21525 ;
21526 return 0;
21527}
21528_ACEOF
21529rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021530if { (ac_try="$ac_compile"
21531case "(($ac_try" in
21532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21533 *) ac_try_echo=$ac_try;;
21534esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021536 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021537 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021538 grep -v '^ *+' conftest.er1 >conftest.err
21539 rm -f conftest.er1
21540 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021542 (exit $ac_status); } && {
21543 test -z "$ac_c_werror_flag" ||
21544 test ! -s conftest.err
21545 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021546 ac_cv_member_struct_stat_st_rdev=yes
21547else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021548 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021549sed 's/^/| /' conftest.$ac_ext >&5
21550
Martin v. Löwiseba40652007-08-30 20:10:57 +000021551 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021552/* confdefs.h. */
21553_ACEOF
21554cat confdefs.h >>conftest.$ac_ext
21555cat >>conftest.$ac_ext <<_ACEOF
21556/* end confdefs.h. */
21557$ac_includes_default
21558int
21559main ()
21560{
21561static struct stat ac_aggr;
21562if (sizeof ac_aggr.st_rdev)
21563return 0;
21564 ;
21565 return 0;
21566}
21567_ACEOF
21568rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021569if { (ac_try="$ac_compile"
21570case "(($ac_try" in
21571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21572 *) ac_try_echo=$ac_try;;
21573esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021575 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021576 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021577 grep -v '^ *+' conftest.er1 >conftest.err
21578 rm -f conftest.er1
21579 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021581 (exit $ac_status); } && {
21582 test -z "$ac_c_werror_flag" ||
21583 test ! -s conftest.err
21584 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021585 ac_cv_member_struct_stat_st_rdev=yes
21586else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021587 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021588sed 's/^/| /' conftest.$ac_ext >&5
21589
Martin v. Löwiseba40652007-08-30 20:10:57 +000021590 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021591fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021592
21593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021594fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021595
21596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021597fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021598{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21599echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21600if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021601
21602cat >>confdefs.h <<_ACEOF
21603#define HAVE_STRUCT_STAT_ST_RDEV 1
21604_ACEOF
21605
21606
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021607fi
21608
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021609{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21610echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021611if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021612 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021613else
Martin v. Löwis11437992002-04-12 09:54:03 +000021614 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021615/* confdefs.h. */
21616_ACEOF
21617cat confdefs.h >>conftest.$ac_ext
21618cat >>conftest.$ac_ext <<_ACEOF
21619/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021620$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021621int
21622main ()
21623{
21624static struct stat ac_aggr;
21625if (ac_aggr.st_blksize)
21626return 0;
21627 ;
21628 return 0;
21629}
21630_ACEOF
21631rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021632if { (ac_try="$ac_compile"
21633case "(($ac_try" in
21634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21635 *) ac_try_echo=$ac_try;;
21636esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021638 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021639 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021640 grep -v '^ *+' conftest.er1 >conftest.err
21641 rm -f conftest.er1
21642 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021644 (exit $ac_status); } && {
21645 test -z "$ac_c_werror_flag" ||
21646 test ! -s conftest.err
21647 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021648 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021649else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021650 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021651sed 's/^/| /' conftest.$ac_ext >&5
21652
Martin v. Löwiseba40652007-08-30 20:10:57 +000021653 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021654/* confdefs.h. */
21655_ACEOF
21656cat confdefs.h >>conftest.$ac_ext
21657cat >>conftest.$ac_ext <<_ACEOF
21658/* end confdefs.h. */
21659$ac_includes_default
21660int
21661main ()
21662{
21663static struct stat ac_aggr;
21664if (sizeof ac_aggr.st_blksize)
21665return 0;
21666 ;
21667 return 0;
21668}
21669_ACEOF
21670rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021671if { (ac_try="$ac_compile"
21672case "(($ac_try" in
21673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21674 *) ac_try_echo=$ac_try;;
21675esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021677 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021678 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021679 grep -v '^ *+' conftest.er1 >conftest.err
21680 rm -f conftest.er1
21681 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021683 (exit $ac_status); } && {
21684 test -z "$ac_c_werror_flag" ||
21685 test ! -s conftest.err
21686 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021687 ac_cv_member_struct_stat_st_blksize=yes
21688else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021689 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021690sed 's/^/| /' conftest.$ac_ext >&5
21691
Martin v. Löwiseba40652007-08-30 20:10:57 +000021692 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021693fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021694
21695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021696fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021697
21698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021699fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021700{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21701echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21702if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021703
Martin v. Löwis11437992002-04-12 09:54:03 +000021704cat >>confdefs.h <<_ACEOF
21705#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21706_ACEOF
21707
21708
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021709fi
21710
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021711{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21712echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021713if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021714 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021715else
21716 cat >conftest.$ac_ext <<_ACEOF
21717/* confdefs.h. */
21718_ACEOF
21719cat confdefs.h >>conftest.$ac_ext
21720cat >>conftest.$ac_ext <<_ACEOF
21721/* end confdefs.h. */
21722$ac_includes_default
21723int
21724main ()
21725{
21726static struct stat ac_aggr;
21727if (ac_aggr.st_flags)
21728return 0;
21729 ;
21730 return 0;
21731}
21732_ACEOF
21733rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021734if { (ac_try="$ac_compile"
21735case "(($ac_try" in
21736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21737 *) ac_try_echo=$ac_try;;
21738esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021740 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021741 ac_status=$?
21742 grep -v '^ *+' conftest.er1 >conftest.err
21743 rm -f conftest.er1
21744 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021746 (exit $ac_status); } && {
21747 test -z "$ac_c_werror_flag" ||
21748 test ! -s conftest.err
21749 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021750 ac_cv_member_struct_stat_st_flags=yes
21751else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021752 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021753sed 's/^/| /' conftest.$ac_ext >&5
21754
Martin v. Löwiseba40652007-08-30 20:10:57 +000021755 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021756/* confdefs.h. */
21757_ACEOF
21758cat confdefs.h >>conftest.$ac_ext
21759cat >>conftest.$ac_ext <<_ACEOF
21760/* end confdefs.h. */
21761$ac_includes_default
21762int
21763main ()
21764{
21765static struct stat ac_aggr;
21766if (sizeof ac_aggr.st_flags)
21767return 0;
21768 ;
21769 return 0;
21770}
21771_ACEOF
21772rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021773if { (ac_try="$ac_compile"
21774case "(($ac_try" in
21775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21776 *) ac_try_echo=$ac_try;;
21777esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021779 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021780 ac_status=$?
21781 grep -v '^ *+' conftest.er1 >conftest.err
21782 rm -f conftest.er1
21783 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021785 (exit $ac_status); } && {
21786 test -z "$ac_c_werror_flag" ||
21787 test ! -s conftest.err
21788 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021789 ac_cv_member_struct_stat_st_flags=yes
21790else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021791 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021792sed 's/^/| /' conftest.$ac_ext >&5
21793
Martin v. Löwiseba40652007-08-30 20:10:57 +000021794 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021795fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021796
21797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021798fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021799
21800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021801fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021802{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21803echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
21804if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021805
21806cat >>confdefs.h <<_ACEOF
21807#define HAVE_STRUCT_STAT_ST_FLAGS 1
21808_ACEOF
21809
21810
21811fi
21812
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021813{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
21814echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021815if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021816 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021817else
21818 cat >conftest.$ac_ext <<_ACEOF
21819/* confdefs.h. */
21820_ACEOF
21821cat confdefs.h >>conftest.$ac_ext
21822cat >>conftest.$ac_ext <<_ACEOF
21823/* end confdefs.h. */
21824$ac_includes_default
21825int
21826main ()
21827{
21828static struct stat ac_aggr;
21829if (ac_aggr.st_gen)
21830return 0;
21831 ;
21832 return 0;
21833}
21834_ACEOF
21835rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021836if { (ac_try="$ac_compile"
21837case "(($ac_try" in
21838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21839 *) ac_try_echo=$ac_try;;
21840esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021842 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021843 ac_status=$?
21844 grep -v '^ *+' conftest.er1 >conftest.err
21845 rm -f conftest.er1
21846 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021848 (exit $ac_status); } && {
21849 test -z "$ac_c_werror_flag" ||
21850 test ! -s conftest.err
21851 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021852 ac_cv_member_struct_stat_st_gen=yes
21853else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021854 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021855sed 's/^/| /' conftest.$ac_ext >&5
21856
Martin v. Löwiseba40652007-08-30 20:10:57 +000021857 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021858/* confdefs.h. */
21859_ACEOF
21860cat confdefs.h >>conftest.$ac_ext
21861cat >>conftest.$ac_ext <<_ACEOF
21862/* end confdefs.h. */
21863$ac_includes_default
21864int
21865main ()
21866{
21867static struct stat ac_aggr;
21868if (sizeof ac_aggr.st_gen)
21869return 0;
21870 ;
21871 return 0;
21872}
21873_ACEOF
21874rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021875if { (ac_try="$ac_compile"
21876case "(($ac_try" in
21877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21878 *) ac_try_echo=$ac_try;;
21879esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021881 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021882 ac_status=$?
21883 grep -v '^ *+' conftest.er1 >conftest.err
21884 rm -f conftest.er1
21885 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021887 (exit $ac_status); } && {
21888 test -z "$ac_c_werror_flag" ||
21889 test ! -s conftest.err
21890 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021891 ac_cv_member_struct_stat_st_gen=yes
21892else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021893 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021894sed 's/^/| /' conftest.$ac_ext >&5
21895
Martin v. Löwiseba40652007-08-30 20:10:57 +000021896 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021897fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021898
21899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021900fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021901
21902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021903fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021904{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21905echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21906if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021907
21908cat >>confdefs.h <<_ACEOF
21909#define HAVE_STRUCT_STAT_ST_GEN 1
21910_ACEOF
21911
21912
21913fi
21914
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021915{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21916echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021917if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021918 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021919else
21920 cat >conftest.$ac_ext <<_ACEOF
21921/* confdefs.h. */
21922_ACEOF
21923cat confdefs.h >>conftest.$ac_ext
21924cat >>conftest.$ac_ext <<_ACEOF
21925/* end confdefs.h. */
21926$ac_includes_default
21927int
21928main ()
21929{
21930static struct stat ac_aggr;
21931if (ac_aggr.st_birthtime)
21932return 0;
21933 ;
21934 return 0;
21935}
21936_ACEOF
21937rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021938if { (ac_try="$ac_compile"
21939case "(($ac_try" in
21940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21941 *) ac_try_echo=$ac_try;;
21942esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021943eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021944 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021945 ac_status=$?
21946 grep -v '^ *+' conftest.er1 >conftest.err
21947 rm -f conftest.er1
21948 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021950 (exit $ac_status); } && {
21951 test -z "$ac_c_werror_flag" ||
21952 test ! -s conftest.err
21953 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021954 ac_cv_member_struct_stat_st_birthtime=yes
21955else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021956 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021957sed 's/^/| /' conftest.$ac_ext >&5
21958
Martin v. Löwiseba40652007-08-30 20:10:57 +000021959 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021960/* confdefs.h. */
21961_ACEOF
21962cat confdefs.h >>conftest.$ac_ext
21963cat >>conftest.$ac_ext <<_ACEOF
21964/* end confdefs.h. */
21965$ac_includes_default
21966int
21967main ()
21968{
21969static struct stat ac_aggr;
21970if (sizeof ac_aggr.st_birthtime)
21971return 0;
21972 ;
21973 return 0;
21974}
21975_ACEOF
21976rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021977if { (ac_try="$ac_compile"
21978case "(($ac_try" in
21979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21980 *) ac_try_echo=$ac_try;;
21981esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021983 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021984 ac_status=$?
21985 grep -v '^ *+' conftest.er1 >conftest.err
21986 rm -f conftest.er1
21987 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021989 (exit $ac_status); } && {
21990 test -z "$ac_c_werror_flag" ||
21991 test ! -s conftest.err
21992 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021993 ac_cv_member_struct_stat_st_birthtime=yes
21994else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021995 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021996sed 's/^/| /' conftest.$ac_ext >&5
21997
Martin v. Löwiseba40652007-08-30 20:10:57 +000021998 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021999fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022000
22001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022002fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022003
22004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022005fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022006{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
22007echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
22008if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022009
22010cat >>confdefs.h <<_ACEOF
22011#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
22012_ACEOF
22013
22014
22015fi
22016
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022017{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
22018echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022019if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022020 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022021else
Martin v. Löwis11437992002-04-12 09:54:03 +000022022 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022023/* confdefs.h. */
22024_ACEOF
22025cat confdefs.h >>conftest.$ac_ext
22026cat >>conftest.$ac_ext <<_ACEOF
22027/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022028$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022029int
22030main ()
22031{
22032static struct stat ac_aggr;
22033if (ac_aggr.st_blocks)
22034return 0;
22035 ;
22036 return 0;
22037}
22038_ACEOF
22039rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022040if { (ac_try="$ac_compile"
22041case "(($ac_try" in
22042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22043 *) ac_try_echo=$ac_try;;
22044esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022046 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022047 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022048 grep -v '^ *+' conftest.er1 >conftest.err
22049 rm -f conftest.er1
22050 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022052 (exit $ac_status); } && {
22053 test -z "$ac_c_werror_flag" ||
22054 test ! -s conftest.err
22055 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022056 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000022057else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022058 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022059sed 's/^/| /' conftest.$ac_ext >&5
22060
Martin v. Löwiseba40652007-08-30 20:10:57 +000022061 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022062/* confdefs.h. */
22063_ACEOF
22064cat confdefs.h >>conftest.$ac_ext
22065cat >>conftest.$ac_ext <<_ACEOF
22066/* end confdefs.h. */
22067$ac_includes_default
22068int
22069main ()
22070{
22071static struct stat ac_aggr;
22072if (sizeof ac_aggr.st_blocks)
22073return 0;
22074 ;
22075 return 0;
22076}
22077_ACEOF
22078rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022079if { (ac_try="$ac_compile"
22080case "(($ac_try" in
22081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22082 *) ac_try_echo=$ac_try;;
22083esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022085 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000022086 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022087 grep -v '^ *+' conftest.er1 >conftest.err
22088 rm -f conftest.er1
22089 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022091 (exit $ac_status); } && {
22092 test -z "$ac_c_werror_flag" ||
22093 test ! -s conftest.err
22094 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022095 ac_cv_member_struct_stat_st_blocks=yes
22096else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022097 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022098sed 's/^/| /' conftest.$ac_ext >&5
22099
Martin v. Löwiseba40652007-08-30 20:10:57 +000022100 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000022101fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022102
22103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022104fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022105
22106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000022107fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022108{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
22109echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
22110if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000022111
Martin v. Löwis11437992002-04-12 09:54:03 +000022112cat >>confdefs.h <<_ACEOF
22113#define HAVE_STRUCT_STAT_ST_BLOCKS 1
22114_ACEOF
22115
22116
22117cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022118#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022119_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022120
22121else
Martin v. Löwiseba40652007-08-30 20:10:57 +000022122 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000022123 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022124 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
22125 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022126esac
22127
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022128fi
22129
Michael W. Hudson54241132001-12-07 15:38:26 +000022130
Martin v. Löwis11437992002-04-12 09:54:03 +000022131
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022132{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
22133echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022134if test "${ac_cv_header_time_altzone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022135 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022136else
Martin v. Löwis11437992002-04-12 09:54:03 +000022137 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022138/* confdefs.h. */
22139_ACEOF
22140cat confdefs.h >>conftest.$ac_ext
22141cat >>conftest.$ac_ext <<_ACEOF
22142/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022143#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022144int
22145main ()
22146{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022147return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000022148 ;
22149 return 0;
22150}
22151_ACEOF
22152rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022153if { (ac_try="$ac_compile"
22154case "(($ac_try" in
22155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22156 *) ac_try_echo=$ac_try;;
22157esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022159 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022160 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022161 grep -v '^ *+' conftest.er1 >conftest.err
22162 rm -f conftest.er1
22163 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022165 (exit $ac_status); } && {
22166 test -z "$ac_c_werror_flag" ||
22167 test ! -s conftest.err
22168 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022169 ac_cv_header_time_altzone=yes
22170else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022171 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022172sed 's/^/| /' conftest.$ac_ext >&5
22173
Martin v. Löwiseba40652007-08-30 20:10:57 +000022174 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022175fi
22176
Martin v. Löwiseba40652007-08-30 20:10:57 +000022177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22178fi
22179
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022180{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
22181echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022182if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022183
22184cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022185#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022186_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022187
22188fi
22189
Guido van Rossumda88dad1995-01-26 00:46:29 +000022190was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022191{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
22192echo $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 +000022193cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022194/* confdefs.h. */
22195_ACEOF
22196cat confdefs.h >>conftest.$ac_ext
22197cat >>conftest.$ac_ext <<_ACEOF
22198/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022199
22200#include <sys/types.h>
22201#include <sys/select.h>
22202#include <sys/time.h>
22203
Martin v. Löwis11437992002-04-12 09:54:03 +000022204int
22205main ()
22206{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022207;
Martin v. Löwis11437992002-04-12 09:54:03 +000022208 ;
22209 return 0;
22210}
22211_ACEOF
22212rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022213if { (ac_try="$ac_compile"
22214case "(($ac_try" in
22215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22216 *) ac_try_echo=$ac_try;;
22217esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022219 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022220 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022221 grep -v '^ *+' conftest.er1 >conftest.err
22222 rm -f conftest.er1
22223 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022225 (exit $ac_status); } && {
22226 test -z "$ac_c_werror_flag" ||
22227 test ! -s conftest.err
22228 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022229
22230
22231cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022232#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022233_ACEOF
22234
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022235 was_it_defined=yes
22236
Guido van Rossumf78abae1997-01-21 22:02:36 +000022237else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022238 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022239sed 's/^/| /' conftest.$ac_ext >&5
22240
Brett Cannon19fab762007-06-02 03:02:29 +000022241
Martin v. Löwiseba40652007-08-30 20:10:57 +000022242fi
22243
22244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022245{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
22246echo "${ECHO_T}$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022247
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022248{ echo "$as_me:$LINENO: checking for addrinfo" >&5
22249echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022250if test "${ac_cv_struct_addrinfo+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022251 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022252else
Martin v. Löwis11437992002-04-12 09:54:03 +000022253 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022254/* confdefs.h. */
22255_ACEOF
22256cat confdefs.h >>conftest.$ac_ext
22257cat >>conftest.$ac_ext <<_ACEOF
22258/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022259
22260# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022261int
22262main ()
22263{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022264struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000022265 ;
22266 return 0;
22267}
22268_ACEOF
22269rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022270if { (ac_try="$ac_compile"
22271case "(($ac_try" in
22272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22273 *) ac_try_echo=$ac_try;;
22274esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022275eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022276 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022277 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022278 grep -v '^ *+' conftest.er1 >conftest.err
22279 rm -f conftest.er1
22280 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022282 (exit $ac_status); } && {
22283 test -z "$ac_c_werror_flag" ||
22284 test ! -s conftest.err
22285 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022286 ac_cv_struct_addrinfo=yes
22287else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022288 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022289sed 's/^/| /' conftest.$ac_ext >&5
22290
Martin v. Löwiseba40652007-08-30 20:10:57 +000022291 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022292fi
22293
Martin v. Löwiseba40652007-08-30 20:10:57 +000022294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22295fi
22296
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022297{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
22298echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022299if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022300
22301cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022302#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022303_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022304
22305fi
22306
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022307{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
22308echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022309if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022310 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022311else
Martin v. Löwis11437992002-04-12 09:54:03 +000022312 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022313/* confdefs.h. */
22314_ACEOF
22315cat confdefs.h >>conftest.$ac_ext
22316cat >>conftest.$ac_ext <<_ACEOF
22317/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022318
22319# include <sys/types.h>
22320# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022321int
22322main ()
22323{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022324struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000022325 ;
22326 return 0;
22327}
22328_ACEOF
22329rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022330if { (ac_try="$ac_compile"
22331case "(($ac_try" in
22332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22333 *) ac_try_echo=$ac_try;;
22334esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022336 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022337 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022338 grep -v '^ *+' conftest.er1 >conftest.err
22339 rm -f conftest.er1
22340 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022342 (exit $ac_status); } && {
22343 test -z "$ac_c_werror_flag" ||
22344 test ! -s conftest.err
22345 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022346 ac_cv_struct_sockaddr_storage=yes
22347else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022348 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022349sed 's/^/| /' conftest.$ac_ext >&5
22350
Martin v. Löwiseba40652007-08-30 20:10:57 +000022351 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022352fi
22353
Martin v. Löwiseba40652007-08-30 20:10:57 +000022354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22355fi
22356
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022357{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
22358echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022359if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022360
22361cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022362#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022363_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022364
22365fi
22366
Guido van Rossum627b2d71993-12-24 10:39:16 +000022367# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000022368
Michael W. Hudson54241132001-12-07 15:38:26 +000022369
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022370{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
22371echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022372if test "${ac_cv_c_char_unsigned+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022373 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000022374else
Martin v. Löwis11437992002-04-12 09:54:03 +000022375 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022376/* confdefs.h. */
22377_ACEOF
22378cat confdefs.h >>conftest.$ac_ext
22379cat >>conftest.$ac_ext <<_ACEOF
22380/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022381$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022382int
22383main ()
22384{
22385static int test_array [1 - 2 * !(((char) -1) < 0)];
22386test_array [0] = 0
22387
22388 ;
22389 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000022390}
Martin v. Löwis11437992002-04-12 09:54:03 +000022391_ACEOF
22392rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022393if { (ac_try="$ac_compile"
22394case "(($ac_try" in
22395 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22396 *) ac_try_echo=$ac_try;;
22397esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022398eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022399 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022400 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022401 grep -v '^ *+' conftest.er1 >conftest.err
22402 rm -f conftest.er1
22403 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022405 (exit $ac_status); } && {
22406 test -z "$ac_c_werror_flag" ||
22407 test ! -s conftest.err
22408 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022409 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022410else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022411 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022412sed 's/^/| /' conftest.$ac_ext >&5
22413
Martin v. Löwiseba40652007-08-30 20:10:57 +000022414 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022415fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022416
22417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022418fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022419{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
22420echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022421if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022422 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022423#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022424_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022425
22426fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000022427
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022428{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
22429echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022430if test "${ac_cv_c_const+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022431 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022432else
22433 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022434/* confdefs.h. */
22435_ACEOF
22436cat confdefs.h >>conftest.$ac_ext
22437cat >>conftest.$ac_ext <<_ACEOF
22438/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022439
Martin v. Löwis11437992002-04-12 09:54:03 +000022440int
22441main ()
22442{
22443/* FIXME: Include the comments suggested by Paul. */
22444#ifndef __cplusplus
22445 /* Ultrix mips cc rejects this. */
22446 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000022447 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022448 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022449 char const *const *pcpcc;
22450 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022451 /* NEC SVR4.0.2 mips cc rejects this. */
22452 struct point {int x, y;};
22453 static struct point const zero = {0,0};
22454 /* AIX XL C 1.02.0.0 rejects this.
22455 It does not let you subtract one const X* pointer from another in
22456 an arm of an if-expression whose if-part is not a constant
22457 expression */
22458 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000022459 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022460 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022461 ++pcpcc;
22462 ppc = (char**) pcpcc;
22463 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022464 { /* SCO 3.2v4 cc rejects this. */
22465 char *t;
22466 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022467
Martin v. Löwis11437992002-04-12 09:54:03 +000022468 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022469 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022470 }
22471 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22472 int x[] = {25, 17};
22473 const int *foo = &x[0];
22474 ++foo;
22475 }
22476 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22477 typedef const int *iptr;
22478 iptr p = 0;
22479 ++p;
22480 }
22481 { /* AIX XL C 1.02.0.0 rejects this saying
22482 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22483 struct s { int j; const int *ap[3]; };
22484 struct s *b; b->j = 5;
22485 }
22486 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22487 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022488 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022489 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022490 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022491#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022492
Martin v. Löwis11437992002-04-12 09:54:03 +000022493 ;
22494 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022495}
Martin v. Löwis11437992002-04-12 09:54:03 +000022496_ACEOF
22497rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022498if { (ac_try="$ac_compile"
22499case "(($ac_try" in
22500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22501 *) ac_try_echo=$ac_try;;
22502esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022504 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022505 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022506 grep -v '^ *+' conftest.er1 >conftest.err
22507 rm -f conftest.er1
22508 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022510 (exit $ac_status); } && {
22511 test -z "$ac_c_werror_flag" ||
22512 test ! -s conftest.err
22513 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022514 ac_cv_c_const=yes
22515else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022516 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022517sed 's/^/| /' conftest.$ac_ext >&5
22518
Martin v. Löwiseba40652007-08-30 20:10:57 +000022519 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022520fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022521
22522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022523fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022524{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22525echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022526if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022527
22528cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022529#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000022530_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022531
22532fi
22533
Michael W. Hudson54241132001-12-07 15:38:26 +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 working volatile" >&5
22537echo $ECHO_N "checking for working volatile... $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 Rossum627b2d71993-12-24 10:39:16 +000022544
Martin v. Löwis11437992002-04-12 09:54:03 +000022545int
22546main ()
22547{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022548volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022549 ;
22550 return 0;
22551}
22552_ACEOF
22553rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022554if { (ac_try="$ac_compile"
22555case "(($ac_try" in
22556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22557 *) ac_try_echo=$ac_try;;
22558esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022560 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022561 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022562 grep -v '^ *+' conftest.er1 >conftest.err
22563 rm -f conftest.er1
22564 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022566 (exit $ac_status); } && {
22567 test -z "$ac_c_werror_flag" ||
22568 test ! -s conftest.err
22569 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022570 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022571else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022572 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022573sed 's/^/| /' conftest.$ac_ext >&5
22574
Martin v. Löwis11437992002-04-12 09:54:03 +000022575
22576cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022577#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022578_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022579
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022580
Guido van Rossum627b2d71993-12-24 10:39:16 +000022581fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022582
22583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022584{ echo "$as_me:$LINENO: result: $works" >&5
22585echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022586
Guido van Rossumda88dad1995-01-26 00:46:29 +000022587works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022588{ echo "$as_me:$LINENO: checking for working signed char" >&5
22589echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022590cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022591/* confdefs.h. */
22592_ACEOF
22593cat confdefs.h >>conftest.$ac_ext
22594cat >>conftest.$ac_ext <<_ACEOF
22595/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022596
Martin v. Löwis11437992002-04-12 09:54:03 +000022597int
22598main ()
22599{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022600signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022601 ;
22602 return 0;
22603}
22604_ACEOF
22605rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022606if { (ac_try="$ac_compile"
22607case "(($ac_try" in
22608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22609 *) ac_try_echo=$ac_try;;
22610esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022612 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022613 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022614 grep -v '^ *+' conftest.er1 >conftest.err
22615 rm -f conftest.er1
22616 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022618 (exit $ac_status); } && {
22619 test -z "$ac_c_werror_flag" ||
22620 test ! -s conftest.err
22621 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022622 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022623else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022624 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022625sed 's/^/| /' conftest.$ac_ext >&5
22626
Martin v. Löwis11437992002-04-12 09:54:03 +000022627
22628cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022629#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022630_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022631
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022632
Guido van Rossum7f43da71994-08-01 12:15:30 +000022633fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022634
22635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022636{ echo "$as_me:$LINENO: result: $works" >&5
22637echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022638
Guido van Rossumda88dad1995-01-26 00:46:29 +000022639have_prototypes=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022640{ echo "$as_me:$LINENO: checking for prototypes" >&5
22641echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022642cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022643/* confdefs.h. */
22644_ACEOF
22645cat confdefs.h >>conftest.$ac_ext
22646cat >>conftest.$ac_ext <<_ACEOF
22647/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022648int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022649int
22650main ()
22651{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022652return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022653 ;
22654 return 0;
22655}
22656_ACEOF
22657rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022658if { (ac_try="$ac_compile"
22659case "(($ac_try" in
22660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22661 *) ac_try_echo=$ac_try;;
22662esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022664 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022665 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022666 grep -v '^ *+' conftest.er1 >conftest.err
22667 rm -f conftest.er1
22668 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022670 (exit $ac_status); } && {
22671 test -z "$ac_c_werror_flag" ||
22672 test ! -s conftest.err
22673 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022674
22675
22676cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022677#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022678_ACEOF
22679
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022680 have_prototypes=yes
22681
Guido van Rossumf78abae1997-01-21 22:02:36 +000022682else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022683 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022684sed 's/^/| /' conftest.$ac_ext >&5
22685
Martin v. Löwiseba40652007-08-30 20:10:57 +000022686
Guido van Rossum7f43da71994-08-01 12:15:30 +000022687fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022688
22689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022690{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22691echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022692
Guido van Rossumda88dad1995-01-26 00:46:29 +000022693works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022694{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22695echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022696cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022697/* confdefs.h. */
22698_ACEOF
22699cat confdefs.h >>conftest.$ac_ext
22700cat >>conftest.$ac_ext <<_ACEOF
22701/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022702
22703#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022704int foo(int x, ...) {
22705 va_list va;
22706 va_start(va, x);
22707 va_arg(va, int);
22708 va_arg(va, char *);
22709 va_arg(va, double);
22710 return 0;
22711}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022712
Martin v. Löwis11437992002-04-12 09:54:03 +000022713int
22714main ()
22715{
Guido van Rossum90eea071996-08-30 20:58:57 +000022716return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022717 ;
22718 return 0;
22719}
22720_ACEOF
22721rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022722if { (ac_try="$ac_compile"
22723case "(($ac_try" in
22724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22725 *) ac_try_echo=$ac_try;;
22726esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022728 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022729 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022730 grep -v '^ *+' conftest.er1 >conftest.err
22731 rm -f conftest.er1
22732 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022734 (exit $ac_status); } && {
22735 test -z "$ac_c_werror_flag" ||
22736 test ! -s conftest.err
22737 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022738
22739
22740cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022741#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022742_ACEOF
22743
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022744 works=yes
22745
Guido van Rossumf78abae1997-01-21 22:02:36 +000022746else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022748sed 's/^/| /' conftest.$ac_ext >&5
22749
Martin v. Löwiseba40652007-08-30 20:10:57 +000022750
Guido van Rossum627b2d71993-12-24 10:39:16 +000022751fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022752
22753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022754{ echo "$as_me:$LINENO: result: $works" >&5
22755echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022756
Martin v. Löwisd6320502004-08-12 13:45:08 +000022757# check for socketpair
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022758{ echo "$as_me:$LINENO: checking for socketpair" >&5
22759echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022760cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022761/* confdefs.h. */
22762_ACEOF
22763cat confdefs.h >>conftest.$ac_ext
22764cat >>conftest.$ac_ext <<_ACEOF
22765/* end confdefs.h. */
22766
22767#include <sys/types.h>
22768#include <sys/socket.h>
22769
22770int
22771main ()
22772{
22773void *x=socketpair
22774 ;
22775 return 0;
22776}
22777_ACEOF
22778rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022779if { (ac_try="$ac_compile"
22780case "(($ac_try" in
22781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22782 *) ac_try_echo=$ac_try;;
22783esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022785 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000022786 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022787 grep -v '^ *+' conftest.er1 >conftest.err
22788 rm -f conftest.er1
22789 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022791 (exit $ac_status); } && {
22792 test -z "$ac_c_werror_flag" ||
22793 test ! -s conftest.err
22794 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000022795
22796cat >>confdefs.h <<\_ACEOF
22797#define HAVE_SOCKETPAIR 1
22798_ACEOF
22799
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022800 { echo "$as_me:$LINENO: result: yes" >&5
22801echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022802else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022803 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000022804sed 's/^/| /' conftest.$ac_ext >&5
22805
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022806 { echo "$as_me:$LINENO: result: no" >&5
22807echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022808
22809fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022810
22811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022812
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022813# check if sockaddr has sa_len member
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022814{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
22815echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022816cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022817/* confdefs.h. */
22818_ACEOF
22819cat confdefs.h >>conftest.$ac_ext
22820cat >>conftest.$ac_ext <<_ACEOF
22821/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022822#include <sys/types.h>
22823#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022824int
22825main ()
22826{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022827struct sockaddr x;
22828x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022829 ;
22830 return 0;
22831}
22832_ACEOF
22833rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022834if { (ac_try="$ac_compile"
22835case "(($ac_try" in
22836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22837 *) ac_try_echo=$ac_try;;
22838esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022840 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022841 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022842 grep -v '^ *+' conftest.er1 >conftest.err
22843 rm -f conftest.er1
22844 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022846 (exit $ac_status); } && {
22847 test -z "$ac_c_werror_flag" ||
22848 test ! -s conftest.err
22849 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022850 { echo "$as_me:$LINENO: result: yes" >&5
22851echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022852
22853cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022854#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022855_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022856
22857else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022858 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022859sed 's/^/| /' conftest.$ac_ext >&5
22860
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022861 { echo "$as_me:$LINENO: result: no" >&5
22862echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022863fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022864
22865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022866
Guido van Rossumda88dad1995-01-26 00:46:29 +000022867va_list_is_array=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022868{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22869echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022870cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022871/* confdefs.h. */
22872_ACEOF
22873cat confdefs.h >>conftest.$ac_ext
22874cat >>conftest.$ac_ext <<_ACEOF
22875/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022876
22877#ifdef HAVE_STDARG_PROTOTYPES
22878#include <stdarg.h>
22879#else
22880#include <varargs.h>
22881#endif
22882
Martin v. Löwis11437992002-04-12 09:54:03 +000022883int
22884main ()
22885{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022886va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022887 ;
22888 return 0;
22889}
22890_ACEOF
22891rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022892if { (ac_try="$ac_compile"
22893case "(($ac_try" in
22894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22895 *) ac_try_echo=$ac_try;;
22896esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022898 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022899 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022900 grep -v '^ *+' conftest.er1 >conftest.err
22901 rm -f conftest.er1
22902 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022904 (exit $ac_status); } && {
22905 test -z "$ac_c_werror_flag" ||
22906 test ! -s conftest.err
22907 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022908 :
22909else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022910 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022911sed 's/^/| /' conftest.$ac_ext >&5
22912
Martin v. Löwis11437992002-04-12 09:54:03 +000022913
22914
22915cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022916#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022917_ACEOF
22918
Guido van Rossumda88dad1995-01-26 00:46:29 +000022919 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022920
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022921fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022922
22923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022924{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22925echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022926
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022927# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022928
22929
22930
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022931{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22932echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022933if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022934 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022935else
Martin v. Löwis11437992002-04-12 09:54:03 +000022936 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022937/* confdefs.h. */
22938_ACEOF
22939cat confdefs.h >>conftest.$ac_ext
22940cat >>conftest.$ac_ext <<_ACEOF
22941/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022942/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22943 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22944#define gethostbyname_r innocuous_gethostbyname_r
22945
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022946/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022947 which can conflict with char gethostbyname_r (); below.
22948 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022949 <limits.h> exists even on freestanding compilers. */
22950
22951#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022952# include <limits.h>
22953#else
22954# include <assert.h>
22955#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022956
22957#undef gethostbyname_r
22958
Martin v. Löwiseba40652007-08-30 20:10:57 +000022959/* Override any GCC internal prototype to avoid an error.
22960 Use char because int might match the return type of a GCC
22961 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022962#ifdef __cplusplus
22963extern "C"
22964#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022965char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022966/* The GNU C library defines this for functions which it implements
22967 to always fail with ENOSYS. Some functions are actually named
22968 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022969#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022970choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022971#endif
22972
Skip Montanaro6dead952003-09-25 14:50:04 +000022973int
22974main ()
22975{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022976return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022977 ;
22978 return 0;
22979}
22980_ACEOF
22981rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022982if { (ac_try="$ac_link"
22983case "(($ac_try" in
22984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22985 *) ac_try_echo=$ac_try;;
22986esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022988 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022989 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022990 grep -v '^ *+' conftest.er1 >conftest.err
22991 rm -f conftest.er1
22992 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022994 (exit $ac_status); } && {
22995 test -z "$ac_c_werror_flag" ||
22996 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022997 } && test -s conftest$ac_exeext &&
22998 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022999 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023000else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023001 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023002sed 's/^/| /' conftest.$ac_ext >&5
23003
Martin v. Löwiseba40652007-08-30 20:10:57 +000023004 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023005fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023006
23007rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023008 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023009fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023010{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
23011echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
23012if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023013
Martin v. Löwis11437992002-04-12 09:54:03 +000023014 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023015#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023016_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023017
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023018 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
23019echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023020 OLD_CFLAGS=$CFLAGS
23021 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023022 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023023/* confdefs.h. */
23024_ACEOF
23025cat confdefs.h >>conftest.$ac_ext
23026cat >>conftest.$ac_ext <<_ACEOF
23027/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023028
23029# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023030
Martin v. Löwis11437992002-04-12 09:54:03 +000023031int
23032main ()
23033{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023034
23035 char *name;
23036 struct hostent *he, *res;
23037 char buffer[2048];
23038 int buflen = 2048;
23039 int h_errnop;
23040
23041 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000023042
23043 ;
23044 return 0;
23045}
23046_ACEOF
23047rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023048if { (ac_try="$ac_compile"
23049case "(($ac_try" in
23050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23051 *) ac_try_echo=$ac_try;;
23052esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023054 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023055 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023056 grep -v '^ *+' conftest.er1 >conftest.err
23057 rm -f conftest.er1
23058 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023060 (exit $ac_status); } && {
23061 test -z "$ac_c_werror_flag" ||
23062 test ! -s conftest.err
23063 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023064
23065 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023066#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023067_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023068
Martin v. Löwis11437992002-04-12 09:54:03 +000023069
23070cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023071#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023072_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023073
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023074 { echo "$as_me:$LINENO: result: yes" >&5
23075echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023076
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023077else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023078 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023079sed 's/^/| /' conftest.$ac_ext >&5
23080
Martin v. Löwis11437992002-04-12 09:54:03 +000023081
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023082 { echo "$as_me:$LINENO: result: no" >&5
23083echo "${ECHO_T}no" >&6; }
23084 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
23085echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023086 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023087/* confdefs.h. */
23088_ACEOF
23089cat confdefs.h >>conftest.$ac_ext
23090cat >>conftest.$ac_ext <<_ACEOF
23091/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023092
23093# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023094
Martin v. Löwis11437992002-04-12 09:54:03 +000023095int
23096main ()
23097{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023098
23099 char *name;
23100 struct hostent *he;
23101 char buffer[2048];
23102 int buflen = 2048;
23103 int h_errnop;
23104
23105 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000023106
23107 ;
23108 return 0;
23109}
23110_ACEOF
23111rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023112if { (ac_try="$ac_compile"
23113case "(($ac_try" in
23114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23115 *) ac_try_echo=$ac_try;;
23116esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023118 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023119 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023120 grep -v '^ *+' conftest.er1 >conftest.err
23121 rm -f conftest.er1
23122 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023124 (exit $ac_status); } && {
23125 test -z "$ac_c_werror_flag" ||
23126 test ! -s conftest.err
23127 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023128
23129 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023130#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023131_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023132
Martin v. Löwis11437992002-04-12 09:54:03 +000023133
23134cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023135#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023136_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023137
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023138 { echo "$as_me:$LINENO: result: yes" >&5
23139echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023140
Guido van Rossuma96f0ba1999-03-22 21:49:51 +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öwis11437992002-04-12 09:54:03 +000023145
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023146 { echo "$as_me:$LINENO: result: no" >&5
23147echo "${ECHO_T}no" >&6; }
23148 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
23149echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023150 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023151/* confdefs.h. */
23152_ACEOF
23153cat confdefs.h >>conftest.$ac_ext
23154cat >>conftest.$ac_ext <<_ACEOF
23155/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023156
23157# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023158
Martin v. Löwis11437992002-04-12 09:54:03 +000023159int
23160main ()
23161{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023162
23163 char *name;
23164 struct hostent *he;
23165 struct hostent_data data;
23166
23167 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000023168
23169 ;
23170 return 0;
23171}
23172_ACEOF
23173rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023174if { (ac_try="$ac_compile"
23175case "(($ac_try" in
23176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23177 *) ac_try_echo=$ac_try;;
23178esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023180 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023181 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023182 grep -v '^ *+' conftest.er1 >conftest.err
23183 rm -f conftest.er1
23184 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023186 (exit $ac_status); } && {
23187 test -z "$ac_c_werror_flag" ||
23188 test ! -s conftest.err
23189 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023190
23191 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023192#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023193_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023194
Martin v. Löwis11437992002-04-12 09:54:03 +000023195
23196cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023197#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023198_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023199
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023200 { echo "$as_me:$LINENO: result: yes" >&5
23201echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023202
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023203else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023204 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023205sed 's/^/| /' conftest.$ac_ext >&5
23206
Martin v. Löwis11437992002-04-12 09:54:03 +000023207
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023208 { echo "$as_me:$LINENO: result: no" >&5
23209echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023210
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023211fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023212
23213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023214
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023215fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023216
23217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023218
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023219fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023220
23221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023222 CFLAGS=$OLD_CFLAGS
23223
23224else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023225
Martin v. Löwis11437992002-04-12 09:54:03 +000023226
23227for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000023228do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023229as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23230{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23231echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023232if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023233 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023234else
Martin v. Löwis11437992002-04-12 09:54:03 +000023235 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023236/* confdefs.h. */
23237_ACEOF
23238cat confdefs.h >>conftest.$ac_ext
23239cat >>conftest.$ac_ext <<_ACEOF
23240/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023241/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23242 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23243#define $ac_func innocuous_$ac_func
23244
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023245/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023246 which can conflict with char $ac_func (); below.
23247 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023248 <limits.h> exists even on freestanding compilers. */
23249
23250#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023251# include <limits.h>
23252#else
23253# include <assert.h>
23254#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023255
23256#undef $ac_func
23257
Martin v. Löwiseba40652007-08-30 20:10:57 +000023258/* Override any GCC internal prototype to avoid an error.
23259 Use char because int might match the return type of a GCC
23260 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023261#ifdef __cplusplus
23262extern "C"
23263#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023264char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023265/* The GNU C library defines this for functions which it implements
23266 to always fail with ENOSYS. Some functions are actually named
23267 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023268#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023269choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023270#endif
23271
Skip Montanaro6dead952003-09-25 14:50:04 +000023272int
23273main ()
23274{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023275return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023276 ;
23277 return 0;
23278}
23279_ACEOF
23280rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023281if { (ac_try="$ac_link"
23282case "(($ac_try" in
23283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23284 *) ac_try_echo=$ac_try;;
23285esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023286eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023287 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023288 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023289 grep -v '^ *+' conftest.er1 >conftest.err
23290 rm -f conftest.er1
23291 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023293 (exit $ac_status); } && {
23294 test -z "$ac_c_werror_flag" ||
23295 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023296 } && test -s conftest$ac_exeext &&
23297 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023298 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000023299else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023300 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023301sed 's/^/| /' conftest.$ac_ext >&5
23302
Martin v. Löwiseba40652007-08-30 20:10:57 +000023303 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000023304fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023305
23306rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023307 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000023308fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023309ac_res=`eval echo '${'$as_ac_var'}'`
23310 { echo "$as_me:$LINENO: result: $ac_res" >&5
23311echo "${ECHO_T}$ac_res" >&6; }
23312if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023313 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023314#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023315_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023316
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023317fi
Thomas Wouters3a584202000-08-05 23:28:51 +000023318done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023319
Michael W. Hudson54241132001-12-07 15:38:26 +000023320
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023321fi
23322
Michael W. Hudson54241132001-12-07 15:38:26 +000023323
23324
23325
23326
23327
23328
Guido van Rossum627b2d71993-12-24 10:39:16 +000023329# checks for system services
23330# (none yet)
23331
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023332# Linux requires this for correct f.p. operations
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023333{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
23334echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023335if test "${ac_cv_func___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023336 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023337else
Martin v. Löwis11437992002-04-12 09:54:03 +000023338 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023339/* confdefs.h. */
23340_ACEOF
23341cat confdefs.h >>conftest.$ac_ext
23342cat >>conftest.$ac_ext <<_ACEOF
23343/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023344/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
23345 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23346#define __fpu_control innocuous___fpu_control
23347
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023348/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023349 which can conflict with char __fpu_control (); below.
23350 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023351 <limits.h> exists even on freestanding compilers. */
23352
23353#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023354# include <limits.h>
23355#else
23356# include <assert.h>
23357#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023358
23359#undef __fpu_control
23360
Martin v. Löwiseba40652007-08-30 20:10:57 +000023361/* Override any GCC internal prototype to avoid an error.
23362 Use char because int might match the return type of a GCC
23363 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023364#ifdef __cplusplus
23365extern "C"
23366#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023367char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023368/* The GNU C library defines this for functions which it implements
23369 to always fail with ENOSYS. Some functions are actually named
23370 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023371#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023372choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023373#endif
23374
Skip Montanaro6dead952003-09-25 14:50:04 +000023375int
23376main ()
23377{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023378return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023379 ;
23380 return 0;
23381}
23382_ACEOF
23383rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023384if { (ac_try="$ac_link"
23385case "(($ac_try" in
23386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23387 *) ac_try_echo=$ac_try;;
23388esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023390 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023391 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023392 grep -v '^ *+' conftest.er1 >conftest.err
23393 rm -f conftest.er1
23394 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023396 (exit $ac_status); } && {
23397 test -z "$ac_c_werror_flag" ||
23398 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023399 } && test -s conftest$ac_exeext &&
23400 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023401 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023402else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023403 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023404sed 's/^/| /' conftest.$ac_ext >&5
23405
Martin v. Löwiseba40652007-08-30 20:10:57 +000023406 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023407fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023408
23409rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023410 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023411fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023412{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
23413echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
23414if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023415 :
23416else
Martin v. Löwis11437992002-04-12 09:54:03 +000023417
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023418{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
23419echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023420if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023421 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023422else
Martin v. Löwis11437992002-04-12 09:54:03 +000023423 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023424LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023425cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023426/* confdefs.h. */
23427_ACEOF
23428cat confdefs.h >>conftest.$ac_ext
23429cat >>conftest.$ac_ext <<_ACEOF
23430/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023431
Martin v. Löwiseba40652007-08-30 20:10:57 +000023432/* Override any GCC internal prototype to avoid an error.
23433 Use char because int might match the return type of a GCC
23434 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023435#ifdef __cplusplus
23436extern "C"
23437#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023438char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023439int
23440main ()
23441{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023442return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023443 ;
23444 return 0;
23445}
23446_ACEOF
23447rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023448if { (ac_try="$ac_link"
23449case "(($ac_try" in
23450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23451 *) ac_try_echo=$ac_try;;
23452esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023454 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023455 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023456 grep -v '^ *+' conftest.er1 >conftest.err
23457 rm -f conftest.er1
23458 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023460 (exit $ac_status); } && {
23461 test -z "$ac_c_werror_flag" ||
23462 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023463 } && test -s conftest$ac_exeext &&
23464 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023465 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023466else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023467 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023468sed 's/^/| /' conftest.$ac_ext >&5
23469
Martin v. Löwiseba40652007-08-30 20:10:57 +000023470 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023471fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023472
23473rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023474 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023475LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023476fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023477{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23478echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
23479if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023480 cat >>confdefs.h <<_ACEOF
23481#define HAVE_LIBIEEE 1
23482_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023483
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023484 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023485
Guido van Rossum627b2d71993-12-24 10:39:16 +000023486fi
23487
Michael W. Hudson54241132001-12-07 15:38:26 +000023488
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023489fi
23490
Michael W. Hudson54241132001-12-07 15:38:26 +000023491
Guido van Rossum7f253911997-05-09 02:42:48 +000023492# Check for --with-fpectl
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023493{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23494echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023495
Martin v. Löwiseba40652007-08-30 20:10:57 +000023496# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023497if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023498 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023499if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023500then
23501
23502cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023503#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023504_ACEOF
23505
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023506 { echo "$as_me:$LINENO: result: yes" >&5
23507echo "${ECHO_T}yes" >&6; }
23508else { echo "$as_me:$LINENO: result: no" >&5
23509echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023510fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023511else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023512 { echo "$as_me:$LINENO: result: no" >&5
23513echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023514fi
23515
Guido van Rossum7f253911997-05-09 02:42:48 +000023516
Guido van Rossum7f43da71994-08-01 12:15:30 +000023517# check for --with-libm=...
23518
Guido van Rossum563e7081996-09-10 18:20:48 +000023519case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023520Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000023521BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023522*) LIBM=-lm
23523esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023524{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23525echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023526
Martin v. Löwiseba40652007-08-30 20:10:57 +000023527# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023528if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023529 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023530if test "$withval" = no
23531then LIBM=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023532 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
23533echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023534elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023535then LIBM=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023536 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23537echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
23538else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23539echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023540 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023541fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023542else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023543 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23544echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023545fi
23546
Guido van Rossum7f43da71994-08-01 12:15:30 +000023547
23548# check for --with-libc=...
23549
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023550{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23551echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023552
Martin v. Löwiseba40652007-08-30 20:10:57 +000023553# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023554if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023555 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023556if test "$withval" = no
23557then LIBC=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023558 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
23559echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023560elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023561then LIBC=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023562 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23563echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23564else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23565echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023566 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023567fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023568else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023569 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23570echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023571fi
23572
Guido van Rossum7f43da71994-08-01 12:15:30 +000023573
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023574# **************************************************
23575# * Check for various properties of floating point *
23576# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000023577
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023578{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
23579echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
23580if test "${ac_cv_little_endian_double+set}" = set; then
23581 echo $ECHO_N "(cached) $ECHO_C" >&6
23582else
23583
23584if test "$cross_compiling" = yes; then
23585 ac_cv_little_endian_double=no
23586else
23587 cat >conftest.$ac_ext <<_ACEOF
23588/* confdefs.h. */
23589_ACEOF
23590cat confdefs.h >>conftest.$ac_ext
23591cat >>conftest.$ac_ext <<_ACEOF
23592/* end confdefs.h. */
23593
23594#include <string.h>
23595int main() {
23596 double x = 9006104071832581.0;
23597 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
23598 return 0;
23599 else
23600 return 1;
23601}
23602
23603_ACEOF
23604rm -f conftest$ac_exeext
23605if { (ac_try="$ac_link"
23606case "(($ac_try" in
23607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23608 *) ac_try_echo=$ac_try;;
23609esac
23610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23611 (eval "$ac_link") 2>&5
23612 ac_status=$?
23613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23614 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23615 { (case "(($ac_try" in
23616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23617 *) ac_try_echo=$ac_try;;
23618esac
23619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23620 (eval "$ac_try") 2>&5
23621 ac_status=$?
23622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23623 (exit $ac_status); }; }; then
23624 ac_cv_little_endian_double=yes
23625else
23626 echo "$as_me: program exited with status $ac_status" >&5
23627echo "$as_me: failed program was:" >&5
23628sed 's/^/| /' conftest.$ac_ext >&5
23629
23630( exit $ac_status )
23631ac_cv_little_endian_double=no
23632fi
23633rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23634fi
23635
23636
23637fi
23638
23639{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
23640echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
23641if test "$ac_cv_little_endian_double" = yes
23642then
23643
23644cat >>confdefs.h <<\_ACEOF
23645#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
23646_ACEOF
23647
23648fi
23649
23650{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
23651echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
23652if test "${ac_cv_big_endian_double+set}" = set; then
23653 echo $ECHO_N "(cached) $ECHO_C" >&6
23654else
23655
23656if test "$cross_compiling" = yes; then
23657 ac_cv_big_endian_double=no
23658else
23659 cat >conftest.$ac_ext <<_ACEOF
23660/* confdefs.h. */
23661_ACEOF
23662cat confdefs.h >>conftest.$ac_ext
23663cat >>conftest.$ac_ext <<_ACEOF
23664/* end confdefs.h. */
23665
23666#include <string.h>
23667int main() {
23668 double x = 9006104071832581.0;
23669 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
23670 return 0;
23671 else
23672 return 1;
23673}
23674
23675_ACEOF
23676rm -f conftest$ac_exeext
23677if { (ac_try="$ac_link"
23678case "(($ac_try" in
23679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23680 *) ac_try_echo=$ac_try;;
23681esac
23682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23683 (eval "$ac_link") 2>&5
23684 ac_status=$?
23685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23686 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23687 { (case "(($ac_try" in
23688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23689 *) ac_try_echo=$ac_try;;
23690esac
23691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23692 (eval "$ac_try") 2>&5
23693 ac_status=$?
23694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23695 (exit $ac_status); }; }; then
23696 ac_cv_big_endian_double=yes
23697else
23698 echo "$as_me: program exited with status $ac_status" >&5
23699echo "$as_me: failed program was:" >&5
23700sed 's/^/| /' conftest.$ac_ext >&5
23701
23702( exit $ac_status )
23703ac_cv_big_endian_double=no
23704fi
23705rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23706fi
23707
23708
23709fi
23710
23711{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23712echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
23713if test "$ac_cv_big_endian_double" = yes
23714then
23715
23716cat >>confdefs.h <<\_ACEOF
23717#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23718_ACEOF
23719
23720fi
23721
23722# Some ARM platforms use a mixed-endian representation for doubles.
23723# While Python doesn't currently have full support for these platforms
23724# (see e.g., issue 1762561), we can at least make sure that float <-> string
23725# conversions work.
23726{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23727echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
23728if test "${ac_cv_mixed_endian_double+set}" = set; then
23729 echo $ECHO_N "(cached) $ECHO_C" >&6
23730else
23731
23732if test "$cross_compiling" = yes; then
23733 ac_cv_mixed_endian_double=no
23734else
23735 cat >conftest.$ac_ext <<_ACEOF
23736/* confdefs.h. */
23737_ACEOF
23738cat confdefs.h >>conftest.$ac_ext
23739cat >>conftest.$ac_ext <<_ACEOF
23740/* end confdefs.h. */
23741
23742#include <string.h>
23743int main() {
23744 double x = 9006104071832581.0;
23745 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23746 return 0;
23747 else
23748 return 1;
23749}
23750
23751_ACEOF
23752rm -f conftest$ac_exeext
23753if { (ac_try="$ac_link"
23754case "(($ac_try" in
23755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23756 *) ac_try_echo=$ac_try;;
23757esac
23758eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23759 (eval "$ac_link") 2>&5
23760 ac_status=$?
23761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23762 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23763 { (case "(($ac_try" in
23764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23765 *) ac_try_echo=$ac_try;;
23766esac
23767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23768 (eval "$ac_try") 2>&5
23769 ac_status=$?
23770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23771 (exit $ac_status); }; }; then
23772 ac_cv_mixed_endian_double=yes
23773else
23774 echo "$as_me: program exited with status $ac_status" >&5
23775echo "$as_me: failed program was:" >&5
23776sed 's/^/| /' conftest.$ac_ext >&5
23777
23778( exit $ac_status )
23779ac_cv_mixed_endian_double=no
23780fi
23781rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23782fi
23783
23784
23785fi
23786
23787{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
23788echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
23789if test "$ac_cv_mixed_endian_double" = yes
23790then
23791
23792cat >>confdefs.h <<\_ACEOF
23793#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
23794_ACEOF
23795
23796fi
23797
23798# The short float repr introduced in Python 3.1 requires the
23799# correctly-rounded string <-> double conversion functions from
23800# Python/dtoa.c, which in turn require that the FPU uses 53-bit
23801# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000023802# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023803# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000023804
23805# This inline assembler syntax may also work for suncc and icc,
23806# so we try it on all platforms.
23807
23808{ 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 +000023809echo $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 +000023810cat >conftest.$ac_ext <<_ACEOF
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023811/* confdefs.h. */
23812_ACEOF
23813cat confdefs.h >>conftest.$ac_ext
23814cat >>conftest.$ac_ext <<_ACEOF
23815/* end confdefs.h. */
23816
23817int
23818main ()
23819{
23820
Mark Dickinsona548dee2009-11-15 13:12:43 +000023821 unsigned short cw;
23822 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
23823 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023824
23825 ;
23826 return 0;
23827}
23828_ACEOF
23829rm -f conftest.$ac_objext
23830if { (ac_try="$ac_compile"
23831case "(($ac_try" in
23832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23833 *) ac_try_echo=$ac_try;;
23834esac
23835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23836 (eval "$ac_compile") 2>conftest.er1
23837 ac_status=$?
23838 grep -v '^ *+' conftest.er1 >conftest.err
23839 rm -f conftest.er1
23840 cat conftest.err >&5
23841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23842 (exit $ac_status); } && {
23843 test -z "$ac_c_werror_flag" ||
23844 test ! -s conftest.err
23845 } && test -s conftest.$ac_objext; then
23846 have_gcc_asm_for_x87=yes
23847else
23848 echo "$as_me: failed program was:" >&5
23849sed 's/^/| /' conftest.$ac_ext >&5
23850
23851 have_gcc_asm_for_x87=no
23852fi
23853
23854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsona548dee2009-11-15 13:12:43 +000023855{ echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023856echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000023857if test "$have_gcc_asm_for_x87" = yes
23858then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023859
23860cat >>confdefs.h <<\_ACEOF
23861#define HAVE_GCC_ASM_FOR_X87 1
23862_ACEOF
23863
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023864fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000023865
Mark Dickinson04b27232009-01-04 12:29:36 +000023866# Detect whether system arithmetic is subject to x87-style double
23867# rounding issues. The result of this test has little meaning on non
23868# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23869# mode is round-to-nearest and double rounding issues are present, and
23870# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023871{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23872echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000023873# $BASECFLAGS may affect the result
23874ac_save_cc="$CC"
23875CC="$CC $BASECFLAGS"
Mark Dickinson04b27232009-01-04 12:29:36 +000023876if test "$cross_compiling" = yes; then
23877 ac_cv_x87_double_rounding=no
23878else
23879 cat >conftest.$ac_ext <<_ACEOF
23880/* confdefs.h. */
23881_ACEOF
23882cat confdefs.h >>conftest.$ac_ext
23883cat >>conftest.$ac_ext <<_ACEOF
23884/* end confdefs.h. */
23885
23886#include <stdlib.h>
23887#include <math.h>
23888int main() {
23889 volatile double x, y, z;
23890 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23891 x = 0.99999999999999989; /* 1-2**-53 */
23892 y = 1./x;
23893 if (y != 1.)
23894 exit(0);
23895 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23896 x = 1e16;
23897 y = 2.99999;
23898 z = x + y;
23899 if (z != 1e16+4.)
23900 exit(0);
23901 /* both tests show evidence of double rounding */
23902 exit(1);
23903}
23904
23905_ACEOF
23906rm -f conftest$ac_exeext
23907if { (ac_try="$ac_link"
23908case "(($ac_try" in
23909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23910 *) ac_try_echo=$ac_try;;
23911esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023913 (eval "$ac_link") 2>&5
23914 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023916 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23917 { (case "(($ac_try" in
23918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23919 *) ac_try_echo=$ac_try;;
23920esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023922 (eval "$ac_try") 2>&5
23923 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023925 (exit $ac_status); }; }; then
23926 ac_cv_x87_double_rounding=no
23927else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023928 echo "$as_me: program exited with status $ac_status" >&5
23929echo "$as_me: failed program was:" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023930sed 's/^/| /' conftest.$ac_ext >&5
23931
23932( exit $ac_status )
23933ac_cv_x87_double_rounding=yes
23934fi
23935rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23936fi
23937
23938
Mark Dickinson99abd142009-10-24 13:44:16 +000023939CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023940{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23941echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000023942if test "$ac_cv_x87_double_rounding" = yes
23943then
23944
23945cat >>confdefs.h <<\_ACEOF
23946#define X87_DOUBLE_ROUNDING 1
23947_ACEOF
23948
23949fi
23950
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023951# ************************************
23952# * Check for mathematical functions *
23953# ************************************
23954
23955LIBS_SAVE=$LIBS
23956LIBS="$LIBS $LIBM"
23957
Mark Dickinson265d7382008-04-21 22:32:24 +000023958# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23959# -0. on some architectures.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023960{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23961echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000023962if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023963 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000023964else
23965
23966if test "$cross_compiling" = yes; then
23967 ac_cv_tanh_preserves_zero_sign=no
23968else
23969 cat >conftest.$ac_ext <<_ACEOF
23970/* confdefs.h. */
23971_ACEOF
23972cat confdefs.h >>conftest.$ac_ext
23973cat >>conftest.$ac_ext <<_ACEOF
23974/* end confdefs.h. */
23975
23976#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000023977#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000023978int main() {
23979 /* return 0 if either negative zeros don't exist
23980 on this platform or if negative zeros exist
23981 and tanh(-0.) == -0. */
23982 if (atan2(0., -1.) == atan2(-0., -1.) ||
23983 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23984 else exit(1);
23985}
23986
23987_ACEOF
23988rm -f conftest$ac_exeext
23989if { (ac_try="$ac_link"
23990case "(($ac_try" in
23991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23992 *) ac_try_echo=$ac_try;;
23993esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023995 (eval "$ac_link") 2>&5
23996 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023998 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23999 { (case "(($ac_try" in
24000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24001 *) ac_try_echo=$ac_try;;
24002esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024004 (eval "$ac_try") 2>&5
24005 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024007 (exit $ac_status); }; }; then
24008 ac_cv_tanh_preserves_zero_sign=yes
24009else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024010 echo "$as_me: program exited with status $ac_status" >&5
24011echo "$as_me: failed program was:" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024012sed 's/^/| /' conftest.$ac_ext >&5
24013
24014( exit $ac_status )
24015ac_cv_tanh_preserves_zero_sign=no
24016fi
24017rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24018fi
24019
24020
24021fi
24022
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024023{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
24024echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000024025if test "$ac_cv_tanh_preserves_zero_sign" = yes
24026then
24027
24028cat >>confdefs.h <<\_ACEOF
24029#define TANH_PRESERVES_ZERO_SIGN 1
24030_ACEOF
24031
24032fi
24033
Martin v. Löwis11437992002-04-12 09:54:03 +000024034
Guido van Rossum2b3ac691996-08-30 15:18:41 +000024035
Michael W. Hudson54241132001-12-07 15:38:26 +000024036
Christian Heimes0a8143f2007-12-18 23:22:54 +000024037
24038
24039
24040
24041
Mark Dickinson8e5446f2009-04-18 14:41:37 +000024042
Mark Dickinson65898e02009-09-05 10:27:00 +000024043for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
24044do
24045as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24046{ echo "$as_me:$LINENO: checking for $ac_func" >&5
24047echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
24048if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
24049 echo $ECHO_N "(cached) $ECHO_C" >&6
24050else
24051 cat >conftest.$ac_ext <<_ACEOF
24052/* confdefs.h. */
24053_ACEOF
24054cat confdefs.h >>conftest.$ac_ext
24055cat >>conftest.$ac_ext <<_ACEOF
24056/* end confdefs.h. */
24057/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24058 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24059#define $ac_func innocuous_$ac_func
24060
24061/* System header to define __stub macros and hopefully few prototypes,
24062 which can conflict with char $ac_func (); below.
24063 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24064 <limits.h> exists even on freestanding compilers. */
24065
24066#ifdef __STDC__
24067# include <limits.h>
24068#else
24069# include <assert.h>
24070#endif
24071
24072#undef $ac_func
24073
24074/* Override any GCC internal prototype to avoid an error.
24075 Use char because int might match the return type of a GCC
24076 builtin and then its argument prototype would still apply. */
24077#ifdef __cplusplus
24078extern "C"
24079#endif
24080char $ac_func ();
24081/* The GNU C library defines this for functions which it implements
24082 to always fail with ENOSYS. Some functions are actually named
24083 something starting with __ and the normal name is an alias. */
24084#if defined __stub_$ac_func || defined __stub___$ac_func
24085choke me
24086#endif
24087
24088int
24089main ()
24090{
24091return $ac_func ();
24092 ;
24093 return 0;
24094}
24095_ACEOF
24096rm -f conftest.$ac_objext conftest$ac_exeext
24097if { (ac_try="$ac_link"
24098case "(($ac_try" in
24099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24100 *) ac_try_echo=$ac_try;;
24101esac
24102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24103 (eval "$ac_link") 2>conftest.er1
24104 ac_status=$?
24105 grep -v '^ *+' conftest.er1 >conftest.err
24106 rm -f conftest.er1
24107 cat conftest.err >&5
24108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24109 (exit $ac_status); } && {
24110 test -z "$ac_c_werror_flag" ||
24111 test ! -s conftest.err
24112 } && test -s conftest$ac_exeext &&
24113 $as_test_x conftest$ac_exeext; then
24114 eval "$as_ac_var=yes"
24115else
24116 echo "$as_me: failed program was:" >&5
24117sed 's/^/| /' conftest.$ac_ext >&5
24118
24119 eval "$as_ac_var=no"
24120fi
24121
24122rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24123 conftest$ac_exeext conftest.$ac_ext
24124fi
24125ac_res=`eval echo '${'$as_ac_var'}'`
24126 { echo "$as_me:$LINENO: result: $ac_res" >&5
24127echo "${ECHO_T}$ac_res" >&6; }
24128if test `eval echo '${'$as_ac_var'}'` = yes; then
24129 cat >>confdefs.h <<_ACEOF
24130#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24131_ACEOF
24132
24133fi
24134done
24135
24136
24137
24138
24139
24140
24141for ac_func in hypot lgamma log1p round tgamma
Christian Heimes0a8143f2007-12-18 23:22:54 +000024142do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024143as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24144{ echo "$as_me:$LINENO: checking for $ac_func" >&5
24145echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes0a8143f2007-12-18 23:22:54 +000024146if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024147 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes0a8143f2007-12-18 23:22:54 +000024148else
24149 cat >conftest.$ac_ext <<_ACEOF
24150/* confdefs.h. */
24151_ACEOF
24152cat confdefs.h >>conftest.$ac_ext
24153cat >>conftest.$ac_ext <<_ACEOF
24154/* end confdefs.h. */
24155/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24156 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24157#define $ac_func innocuous_$ac_func
24158
24159/* System header to define __stub macros and hopefully few prototypes,
24160 which can conflict with char $ac_func (); below.
24161 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24162 <limits.h> exists even on freestanding compilers. */
24163
24164#ifdef __STDC__
24165# include <limits.h>
24166#else
24167# include <assert.h>
24168#endif
24169
24170#undef $ac_func
24171
24172/* Override any GCC internal prototype to avoid an error.
24173 Use char because int might match the return type of a GCC
24174 builtin and then its argument prototype would still apply. */
24175#ifdef __cplusplus
24176extern "C"
24177#endif
24178char $ac_func ();
24179/* The GNU C library defines this for functions which it implements
24180 to always fail with ENOSYS. Some functions are actually named
24181 something starting with __ and the normal name is an alias. */
24182#if defined __stub_$ac_func || defined __stub___$ac_func
24183choke me
24184#endif
24185
24186int
24187main ()
24188{
24189return $ac_func ();
24190 ;
24191 return 0;
24192}
24193_ACEOF
24194rm -f conftest.$ac_objext conftest$ac_exeext
24195if { (ac_try="$ac_link"
24196case "(($ac_try" in
24197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24198 *) ac_try_echo=$ac_try;;
24199esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024201 (eval "$ac_link") 2>conftest.er1
24202 ac_status=$?
24203 grep -v '^ *+' conftest.er1 >conftest.err
24204 rm -f conftest.er1
24205 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024207 (exit $ac_status); } && {
24208 test -z "$ac_c_werror_flag" ||
24209 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024210 } && test -s conftest$ac_exeext &&
24211 $as_test_x conftest$ac_exeext; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000024212 eval "$as_ac_var=yes"
24213else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024214 echo "$as_me: failed program was:" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024215sed 's/^/| /' conftest.$ac_ext >&5
24216
24217 eval "$as_ac_var=no"
24218fi
24219
24220rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24221 conftest$ac_exeext conftest.$ac_ext
24222fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024223ac_res=`eval echo '${'$as_ac_var'}'`
24224 { echo "$as_me:$LINENO: result: $ac_res" >&5
24225echo "${ECHO_T}$ac_res" >&6; }
24226if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000024227 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024228#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000024229_ACEOF
24230
24231fi
24232done
24233
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024234{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
24235echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024236if test "${ac_cv_have_decl_isinf+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024237 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024238else
24239 cat >conftest.$ac_ext <<_ACEOF
24240/* confdefs.h. */
24241_ACEOF
24242cat confdefs.h >>conftest.$ac_ext
24243cat >>conftest.$ac_ext <<_ACEOF
24244/* end confdefs.h. */
24245#include <math.h>
24246
24247int
24248main ()
24249{
24250#ifndef isinf
24251 (void) isinf;
24252#endif
24253
24254 ;
24255 return 0;
24256}
24257_ACEOF
24258rm -f conftest.$ac_objext
24259if { (ac_try="$ac_compile"
24260case "(($ac_try" in
24261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24262 *) ac_try_echo=$ac_try;;
24263esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024265 (eval "$ac_compile") 2>conftest.er1
24266 ac_status=$?
24267 grep -v '^ *+' conftest.er1 >conftest.err
24268 rm -f conftest.er1
24269 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024271 (exit $ac_status); } && {
24272 test -z "$ac_c_werror_flag" ||
24273 test ! -s conftest.err
24274 } && test -s conftest.$ac_objext; then
24275 ac_cv_have_decl_isinf=yes
24276else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024277 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024278sed 's/^/| /' conftest.$ac_ext >&5
24279
24280 ac_cv_have_decl_isinf=no
24281fi
24282
24283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24284fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024285{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
24286echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
24287if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024288
24289cat >>confdefs.h <<_ACEOF
24290#define HAVE_DECL_ISINF 1
24291_ACEOF
24292
24293
24294else
24295 cat >>confdefs.h <<_ACEOF
24296#define HAVE_DECL_ISINF 0
24297_ACEOF
24298
24299
24300fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024301{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
24302echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024303if test "${ac_cv_have_decl_isnan+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024304 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024305else
24306 cat >conftest.$ac_ext <<_ACEOF
24307/* confdefs.h. */
24308_ACEOF
24309cat confdefs.h >>conftest.$ac_ext
24310cat >>conftest.$ac_ext <<_ACEOF
24311/* end confdefs.h. */
24312#include <math.h>
24313
24314int
24315main ()
24316{
24317#ifndef isnan
24318 (void) isnan;
24319#endif
24320
24321 ;
24322 return 0;
24323}
24324_ACEOF
24325rm -f conftest.$ac_objext
24326if { (ac_try="$ac_compile"
24327case "(($ac_try" in
24328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24329 *) ac_try_echo=$ac_try;;
24330esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024332 (eval "$ac_compile") 2>conftest.er1
24333 ac_status=$?
24334 grep -v '^ *+' conftest.er1 >conftest.err
24335 rm -f conftest.er1
24336 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024338 (exit $ac_status); } && {
24339 test -z "$ac_c_werror_flag" ||
24340 test ! -s conftest.err
24341 } && test -s conftest.$ac_objext; then
24342 ac_cv_have_decl_isnan=yes
24343else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024344 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024345sed 's/^/| /' conftest.$ac_ext >&5
24346
24347 ac_cv_have_decl_isnan=no
24348fi
24349
24350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24351fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024352{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
24353echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
24354if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024355
24356cat >>confdefs.h <<_ACEOF
24357#define HAVE_DECL_ISNAN 1
24358_ACEOF
24359
24360
24361else
24362 cat >>confdefs.h <<_ACEOF
24363#define HAVE_DECL_ISNAN 0
24364_ACEOF
24365
24366
24367fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024368{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
24369echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024370if test "${ac_cv_have_decl_isfinite+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024371 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024372else
24373 cat >conftest.$ac_ext <<_ACEOF
24374/* confdefs.h. */
24375_ACEOF
24376cat confdefs.h >>conftest.$ac_ext
24377cat >>conftest.$ac_ext <<_ACEOF
24378/* end confdefs.h. */
24379#include <math.h>
24380
24381int
24382main ()
24383{
24384#ifndef isfinite
24385 (void) isfinite;
24386#endif
24387
24388 ;
24389 return 0;
24390}
24391_ACEOF
24392rm -f conftest.$ac_objext
24393if { (ac_try="$ac_compile"
24394case "(($ac_try" in
24395 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24396 *) ac_try_echo=$ac_try;;
24397esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024398eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024399 (eval "$ac_compile") 2>conftest.er1
24400 ac_status=$?
24401 grep -v '^ *+' conftest.er1 >conftest.err
24402 rm -f conftest.er1
24403 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024405 (exit $ac_status); } && {
24406 test -z "$ac_c_werror_flag" ||
24407 test ! -s conftest.err
24408 } && test -s conftest.$ac_objext; then
24409 ac_cv_have_decl_isfinite=yes
24410else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024411 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024412sed 's/^/| /' conftest.$ac_ext >&5
24413
24414 ac_cv_have_decl_isfinite=no
24415fi
24416
24417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24418fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024419{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
24420echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
24421if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024422
24423cat >>confdefs.h <<_ACEOF
24424#define HAVE_DECL_ISFINITE 1
24425_ACEOF
24426
24427
24428else
24429 cat >>confdefs.h <<_ACEOF
24430#define HAVE_DECL_ISFINITE 0
24431_ACEOF
24432
24433
24434fi
24435
24436
Christian Heimes0a8143f2007-12-18 23:22:54 +000024437
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000024438LIBS=$LIBS_SAVE
24439
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024440# For multiprocessing module, check that sem_open
24441# actually works. For FreeBSD versions <= 7.2,
24442# the kernel module that provides POSIX semaphores
24443# isn't loaded by default, so an attempt to call
24444# sem_open results in a 'Signal 12' error.
24445{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
24446echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
24447if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
24448 echo $ECHO_N "(cached) $ECHO_C" >&6
24449else
24450 if test "$cross_compiling" = yes; then
24451 ac_cv_posix_semaphores_enabled=yes
24452else
24453 cat >conftest.$ac_ext <<_ACEOF
24454/* confdefs.h. */
24455_ACEOF
24456cat confdefs.h >>conftest.$ac_ext
24457cat >>conftest.$ac_ext <<_ACEOF
24458/* end confdefs.h. */
24459
24460#include <unistd.h>
24461#include <fcntl.h>
24462#include <stdio.h>
24463#include <semaphore.h>
24464#include <sys/stat.h>
24465
24466int main(void) {
24467 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
24468 if (a == SEM_FAILED) {
24469 perror("sem_open");
24470 return 1;
24471 }
24472 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024473 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024474 return 0;
24475}
24476
24477_ACEOF
24478rm -f conftest$ac_exeext
24479if { (ac_try="$ac_link"
24480case "(($ac_try" in
24481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24482 *) ac_try_echo=$ac_try;;
24483esac
24484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24485 (eval "$ac_link") 2>&5
24486 ac_status=$?
24487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24488 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24489 { (case "(($ac_try" in
24490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24491 *) ac_try_echo=$ac_try;;
24492esac
24493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24494 (eval "$ac_try") 2>&5
24495 ac_status=$?
24496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24497 (exit $ac_status); }; }; then
24498 ac_cv_posix_semaphores_enabled=yes
24499else
24500 echo "$as_me: program exited with status $ac_status" >&5
24501echo "$as_me: failed program was:" >&5
24502sed 's/^/| /' conftest.$ac_ext >&5
24503
24504( exit $ac_status )
24505ac_cv_posix_semaphores_enabled=no
24506fi
24507rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24508fi
24509
24510
24511
24512fi
24513
24514{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
24515echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
24516if test $ac_cv_posix_semaphores_enabled = no
24517then
24518
24519cat >>confdefs.h <<\_ACEOF
24520#define POSIX_SEMAPHORES_NOT_ENABLED 1
24521_ACEOF
24522
24523fi
24524
24525# Multiprocessing check for broken sem_getvalue
24526{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
24527echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
24528if test "${ac_cv_broken_sem_getvalue+set}" = set; then
24529 echo $ECHO_N "(cached) $ECHO_C" >&6
24530else
24531 if test "$cross_compiling" = yes; then
24532 ac_cv_broken_sem_getvalue=yes
24533else
24534 cat >conftest.$ac_ext <<_ACEOF
24535/* confdefs.h. */
24536_ACEOF
24537cat confdefs.h >>conftest.$ac_ext
24538cat >>conftest.$ac_ext <<_ACEOF
24539/* end confdefs.h. */
24540
24541#include <unistd.h>
24542#include <fcntl.h>
24543#include <stdio.h>
24544#include <semaphore.h>
24545#include <sys/stat.h>
24546
24547int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024548 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024549 int count;
24550 int res;
24551 if(a==SEM_FAILED){
24552 perror("sem_open");
24553 return 1;
24554
24555 }
24556 res = sem_getvalue(a, &count);
24557 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024558 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024559 return res==-1 ? 1 : 0;
24560}
24561
24562_ACEOF
24563rm -f conftest$ac_exeext
24564if { (ac_try="$ac_link"
24565case "(($ac_try" in
24566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24567 *) ac_try_echo=$ac_try;;
24568esac
24569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24570 (eval "$ac_link") 2>&5
24571 ac_status=$?
24572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24573 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24574 { (case "(($ac_try" in
24575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24576 *) ac_try_echo=$ac_try;;
24577esac
24578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24579 (eval "$ac_try") 2>&5
24580 ac_status=$?
24581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24582 (exit $ac_status); }; }; then
24583 ac_cv_broken_sem_getvalue=no
24584else
24585 echo "$as_me: program exited with status $ac_status" >&5
24586echo "$as_me: failed program was:" >&5
24587sed 's/^/| /' conftest.$ac_ext >&5
24588
24589( exit $ac_status )
24590ac_cv_broken_sem_getvalue=yes
24591fi
24592rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24593fi
24594
24595
24596
24597fi
24598
24599{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
24600echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
24601if test $ac_cv_broken_sem_getvalue = yes
24602then
24603
24604cat >>confdefs.h <<\_ACEOF
24605#define HAVE_BROKEN_SEM_GETVALUE 1
24606_ACEOF
24607
24608fi
24609
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024610# determine what size digit to use for Python's longs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024611{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
24612echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024613# Check whether --enable-big-digits was given.
24614if test "${enable_big_digits+set}" = set; then
24615 enableval=$enable_big_digits; case $enable_big_digits in
24616yes)
24617 enable_big_digits=30 ;;
24618no)
24619 enable_big_digits=15 ;;
2462015|30)
24621 ;;
24622*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024623 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
24624echo "$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 +000024625 { (exit 1); exit 1; }; } ;;
24626esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024627{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
24628echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024629
24630cat >>confdefs.h <<_ACEOF
24631#define PYLONG_BITS_IN_DIGIT $enable_big_digits
24632_ACEOF
24633
24634
24635else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024636 { echo "$as_me:$LINENO: result: no value specified" >&5
24637echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024638fi
24639
24640
Guido van Rossumef2255b2000-03-10 22:30:29 +000024641# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000024642if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024643 { echo "$as_me:$LINENO: checking for wchar.h" >&5
24644echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024645if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024646 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024647fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024648{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24649echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024650else
Martin v. Löwis11437992002-04-12 09:54:03 +000024651 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024652{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
24653echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024654cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024655/* confdefs.h. */
24656_ACEOF
24657cat confdefs.h >>conftest.$ac_ext
24658cat >>conftest.$ac_ext <<_ACEOF
24659/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024660$ac_includes_default
24661#include <wchar.h>
24662_ACEOF
24663rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024664if { (ac_try="$ac_compile"
24665case "(($ac_try" in
24666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24667 *) ac_try_echo=$ac_try;;
24668esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024670 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024671 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024672 grep -v '^ *+' conftest.er1 >conftest.err
24673 rm -f conftest.er1
24674 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024676 (exit $ac_status); } && {
24677 test -z "$ac_c_werror_flag" ||
24678 test ! -s conftest.err
24679 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024680 ac_header_compiler=yes
24681else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024683sed 's/^/| /' conftest.$ac_ext >&5
24684
Martin v. Löwiseba40652007-08-30 20:10:57 +000024685 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000024686fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024687
24688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024689{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24690echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024691
24692# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024693{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
24694echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024695cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024696/* confdefs.h. */
24697_ACEOF
24698cat confdefs.h >>conftest.$ac_ext
24699cat >>conftest.$ac_ext <<_ACEOF
24700/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024701#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024702_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024703if { (ac_try="$ac_cpp conftest.$ac_ext"
24704case "(($ac_try" in
24705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24706 *) ac_try_echo=$ac_try;;
24707esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024709 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024710 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024711 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024712 rm -f conftest.er1
24713 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024715 (exit $ac_status); } >/dev/null && {
24716 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24717 test ! -s conftest.err
24718 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024719 ac_header_preproc=yes
24720else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024721 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024722sed 's/^/| /' conftest.$ac_ext >&5
24723
Martin v. Löwis11437992002-04-12 09:54:03 +000024724 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024725fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024726
Martin v. Löwis11437992002-04-12 09:54:03 +000024727rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024728{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24729echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024730
24731# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024732case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24733 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024734 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24735echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24736 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24737echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024738 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024739 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024740 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024741 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24742echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24743 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24744echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24745 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24746echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24747 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24748echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24749 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24750echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24751 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24752echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000024753 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000024754## -------------------------------------- ##
24755## Report this to http://bugs.python.org/ ##
24756## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024757_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000024758 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024759 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024760esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024761{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24762echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024763if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024764 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024765else
24766 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024767fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024768{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24769echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024770
24771fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024772if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024773
24774
24775cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024776#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024777_ACEOF
24778
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024779 wchar_h="yes"
24780
Guido van Rossumef2255b2000-03-10 22:30:29 +000024781else
Martin v. Löwis11437992002-04-12 09:54:03 +000024782 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000024783
24784fi
24785
Michael W. Hudson54241132001-12-07 15:38:26 +000024786
Martin v. Löwis11437992002-04-12 09:54:03 +000024787
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024788# determine wchar_t size
24789if test "$wchar_h" = yes
24790then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024791 { echo "$as_me:$LINENO: checking for wchar_t" >&5
24792echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
24793if test "${ac_cv_type_wchar_t+set}" = set; then
24794 echo $ECHO_N "(cached) $ECHO_C" >&6
24795else
24796 cat >conftest.$ac_ext <<_ACEOF
24797/* confdefs.h. */
24798_ACEOF
24799cat confdefs.h >>conftest.$ac_ext
24800cat >>conftest.$ac_ext <<_ACEOF
24801/* end confdefs.h. */
24802#include <wchar.h>
24803
24804typedef wchar_t ac__type_new_;
24805int
24806main ()
24807{
24808if ((ac__type_new_ *) 0)
24809 return 0;
24810if (sizeof (ac__type_new_))
24811 return 0;
24812 ;
24813 return 0;
24814}
24815_ACEOF
24816rm -f conftest.$ac_objext
24817if { (ac_try="$ac_compile"
24818case "(($ac_try" in
24819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24820 *) ac_try_echo=$ac_try;;
24821esac
24822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24823 (eval "$ac_compile") 2>conftest.er1
24824 ac_status=$?
24825 grep -v '^ *+' conftest.er1 >conftest.err
24826 rm -f conftest.er1
24827 cat conftest.err >&5
24828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24829 (exit $ac_status); } && {
24830 test -z "$ac_c_werror_flag" ||
24831 test ! -s conftest.err
24832 } && test -s conftest.$ac_objext; then
24833 ac_cv_type_wchar_t=yes
24834else
24835 echo "$as_me: failed program was:" >&5
24836sed 's/^/| /' conftest.$ac_ext >&5
24837
24838 ac_cv_type_wchar_t=no
24839fi
24840
24841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24842fi
24843{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
24844echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
24845
24846# The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000024847# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24848# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24849# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024850{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
24851echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024852if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024853 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024854else
Martin v. Löwis11437992002-04-12 09:54:03 +000024855 if test "$cross_compiling" = yes; then
24856 # Depending upon the size, compute the lo and hi bounds.
24857cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024858/* confdefs.h. */
24859_ACEOF
24860cat confdefs.h >>conftest.$ac_ext
24861cat >>conftest.$ac_ext <<_ACEOF
24862/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024863#include <wchar.h>
24864
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024865 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024866int
24867main ()
24868{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024869static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024870test_array [0] = 0
24871
24872 ;
24873 return 0;
24874}
24875_ACEOF
24876rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024877if { (ac_try="$ac_compile"
24878case "(($ac_try" in
24879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24880 *) ac_try_echo=$ac_try;;
24881esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024883 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024884 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024885 grep -v '^ *+' conftest.er1 >conftest.err
24886 rm -f conftest.er1
24887 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024889 (exit $ac_status); } && {
24890 test -z "$ac_c_werror_flag" ||
24891 test ! -s conftest.err
24892 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024893 ac_lo=0 ac_mid=0
24894 while :; do
24895 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024896/* confdefs.h. */
24897_ACEOF
24898cat confdefs.h >>conftest.$ac_ext
24899cat >>conftest.$ac_ext <<_ACEOF
24900/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024901#include <wchar.h>
24902
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024903 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024904int
24905main ()
24906{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024907static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024908test_array [0] = 0
24909
24910 ;
24911 return 0;
24912}
24913_ACEOF
24914rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024915if { (ac_try="$ac_compile"
24916case "(($ac_try" in
24917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24918 *) ac_try_echo=$ac_try;;
24919esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024921 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024922 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024923 grep -v '^ *+' conftest.er1 >conftest.err
24924 rm -f conftest.er1
24925 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024927 (exit $ac_status); } && {
24928 test -z "$ac_c_werror_flag" ||
24929 test ! -s conftest.err
24930 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024931 ac_hi=$ac_mid; break
24932else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024933 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024934sed 's/^/| /' conftest.$ac_ext >&5
24935
Martin v. Löwiseba40652007-08-30 20:10:57 +000024936 ac_lo=`expr $ac_mid + 1`
24937 if test $ac_lo -le $ac_mid; then
24938 ac_lo= ac_hi=
24939 break
24940 fi
24941 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024942fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024943
24944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024945 done
24946else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024947 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024948sed 's/^/| /' conftest.$ac_ext >&5
24949
Martin v. Löwiseba40652007-08-30 20:10:57 +000024950 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024951/* confdefs.h. */
24952_ACEOF
24953cat confdefs.h >>conftest.$ac_ext
24954cat >>conftest.$ac_ext <<_ACEOF
24955/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024956#include <wchar.h>
24957
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024958 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024959int
24960main ()
24961{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024962static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024963test_array [0] = 0
24964
24965 ;
24966 return 0;
24967}
24968_ACEOF
24969rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024970if { (ac_try="$ac_compile"
24971case "(($ac_try" in
24972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24973 *) ac_try_echo=$ac_try;;
24974esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024976 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024977 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024978 grep -v '^ *+' conftest.er1 >conftest.err
24979 rm -f conftest.er1
24980 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024982 (exit $ac_status); } && {
24983 test -z "$ac_c_werror_flag" ||
24984 test ! -s conftest.err
24985 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024986 ac_hi=-1 ac_mid=-1
24987 while :; do
24988 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024989/* confdefs.h. */
24990_ACEOF
24991cat confdefs.h >>conftest.$ac_ext
24992cat >>conftest.$ac_ext <<_ACEOF
24993/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024994#include <wchar.h>
24995
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024996 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024997int
24998main ()
24999{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025000static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025001test_array [0] = 0
25002
25003 ;
25004 return 0;
25005}
25006_ACEOF
25007rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025008if { (ac_try="$ac_compile"
25009case "(($ac_try" in
25010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25011 *) ac_try_echo=$ac_try;;
25012esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025014 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025015 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025016 grep -v '^ *+' conftest.er1 >conftest.err
25017 rm -f conftest.er1
25018 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025020 (exit $ac_status); } && {
25021 test -z "$ac_c_werror_flag" ||
25022 test ! -s conftest.err
25023 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025024 ac_lo=$ac_mid; break
25025else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025026 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025027sed 's/^/| /' conftest.$ac_ext >&5
25028
Martin v. Löwiseba40652007-08-30 20:10:57 +000025029 ac_hi=`expr '(' $ac_mid ')' - 1`
25030 if test $ac_mid -le $ac_hi; then
25031 ac_lo= ac_hi=
25032 break
25033 fi
25034 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000025035fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025036
25037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025038 done
25039else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025040 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025041sed 's/^/| /' conftest.$ac_ext >&5
25042
Martin v. Löwiseba40652007-08-30 20:10:57 +000025043 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000025044fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025045
25046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025047fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025048
25049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025050# Binary search between lo and hi bounds.
25051while test "x$ac_lo" != "x$ac_hi"; do
25052 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25053 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025054/* confdefs.h. */
25055_ACEOF
25056cat confdefs.h >>conftest.$ac_ext
25057cat >>conftest.$ac_ext <<_ACEOF
25058/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025059#include <wchar.h>
25060
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025061 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025062int
25063main ()
25064{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025065static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025066test_array [0] = 0
25067
25068 ;
25069 return 0;
25070}
25071_ACEOF
25072rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025073if { (ac_try="$ac_compile"
25074case "(($ac_try" in
25075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25076 *) ac_try_echo=$ac_try;;
25077esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025079 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025080 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025081 grep -v '^ *+' conftest.er1 >conftest.err
25082 rm -f conftest.er1
25083 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025085 (exit $ac_status); } && {
25086 test -z "$ac_c_werror_flag" ||
25087 test ! -s conftest.err
25088 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025089 ac_hi=$ac_mid
25090else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025091 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025092sed 's/^/| /' conftest.$ac_ext >&5
25093
Martin v. Löwiseba40652007-08-30 20:10:57 +000025094 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000025095fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025096
25097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025098done
25099case $ac_lo in
25100?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025101'') if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025102 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025103See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025104echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025105See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025106 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025107 else
25108 ac_cv_sizeof_wchar_t=0
25109 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025110esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025111else
Martin v. Löwis11437992002-04-12 09:54:03 +000025112 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025113/* confdefs.h. */
25114_ACEOF
25115cat confdefs.h >>conftest.$ac_ext
25116cat >>conftest.$ac_ext <<_ACEOF
25117/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025118#include <wchar.h>
25119
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025120 typedef wchar_t ac__type_sizeof_;
25121static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
25122static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000025123#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025124#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025125int
25126main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025127{
Martin v. Löwis11437992002-04-12 09:54:03 +000025128
25129 FILE *f = fopen ("conftest.val", "w");
25130 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000025131 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025132 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000025133 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000025134 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025135 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000025136 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025137 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000025138 }
25139 else
25140 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000025141 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025142 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000025143 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025144 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000025145 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025146 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000025147
25148 ;
25149 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025150}
Martin v. Löwis11437992002-04-12 09:54:03 +000025151_ACEOF
25152rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025153if { (ac_try="$ac_link"
25154case "(($ac_try" in
25155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25156 *) ac_try_echo=$ac_try;;
25157esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025159 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025160 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025162 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025163 { (case "(($ac_try" in
25164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25165 *) ac_try_echo=$ac_try;;
25166esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025167eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025168 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025169 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025171 (exit $ac_status); }; }; then
25172 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000025173else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025174 echo "$as_me: program exited with status $ac_status" >&5
25175echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025176sed 's/^/| /' conftest.$ac_ext >&5
25177
Martin v. Löwis11437992002-04-12 09:54:03 +000025178( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000025179if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025180 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025181See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025182echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025183See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025184 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025185 else
25186 ac_cv_sizeof_wchar_t=0
25187 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025188fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025189rm -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 +000025190fi
25191rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000025192fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025193{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
25194echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025195
25196
25197
Martin v. Löwis11437992002-04-12 09:54:03 +000025198cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025199#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025200_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025201
Michael W. Hudson54241132001-12-07 15:38:26 +000025202
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025203fi
25204
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025205{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
25206echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025207have_ucs4_tcl=no
25208cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025209/* confdefs.h. */
25210_ACEOF
25211cat confdefs.h >>conftest.$ac_ext
25212cat >>conftest.$ac_ext <<_ACEOF
25213/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025214
25215#include <tcl.h>
25216#if TCL_UTF_MAX != 6
25217# error "NOT UCS4_TCL"
25218#endif
25219int
25220main ()
25221{
25222
25223 ;
25224 return 0;
25225}
25226_ACEOF
25227rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025228if { (ac_try="$ac_compile"
25229case "(($ac_try" in
25230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25231 *) ac_try_echo=$ac_try;;
25232esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025234 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025235 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025236 grep -v '^ *+' conftest.er1 >conftest.err
25237 rm -f conftest.er1
25238 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025240 (exit $ac_status); } && {
25241 test -z "$ac_c_werror_flag" ||
25242 test ! -s conftest.err
25243 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025244
25245
25246cat >>confdefs.h <<\_ACEOF
25247#define HAVE_UCS4_TCL 1
25248_ACEOF
25249
25250 have_ucs4_tcl=yes
25251
25252else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025253 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025254sed 's/^/| /' conftest.$ac_ext >&5
25255
Martin v. Löwiseba40652007-08-30 20:10:57 +000025256
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025257fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025258
25259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025260{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
25261echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025262
Skip Montanaro6dead952003-09-25 14:50:04 +000025263# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025264if test "$wchar_h" = yes
25265then
25266 # check whether wchar_t is signed or not
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025267 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
25268echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025269 if test "${ac_cv_wchar_t_signed+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025270 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025271else
25272
25273 if test "$cross_compiling" = yes; then
25274 ac_cv_wchar_t_signed=yes
25275else
25276 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025277/* confdefs.h. */
25278_ACEOF
25279cat confdefs.h >>conftest.$ac_ext
25280cat >>conftest.$ac_ext <<_ACEOF
25281/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025282
25283 #include <wchar.h>
25284 int main()
25285 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000025286 /* Success: exit code 0 */
25287 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025288 }
25289
25290_ACEOF
25291rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025292if { (ac_try="$ac_link"
25293case "(($ac_try" in
25294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25295 *) ac_try_echo=$ac_try;;
25296esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025298 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025299 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025301 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025302 { (case "(($ac_try" in
25303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25304 *) ac_try_echo=$ac_try;;
25305esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025306eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025307 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025308 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025310 (exit $ac_status); }; }; then
25311 ac_cv_wchar_t_signed=yes
25312else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025313 echo "$as_me: program exited with status $ac_status" >&5
25314echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025315sed 's/^/| /' conftest.$ac_ext >&5
25316
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025317( exit $ac_status )
25318ac_cv_wchar_t_signed=no
25319fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025320rm -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 +000025321fi
25322
Martin v. Löwiseba40652007-08-30 20:10:57 +000025323
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025324fi
25325
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025326 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
25327echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025328fi
25329
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025330{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
25331echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025332# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025333if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025334 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025335else
25336 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000025337fi
25338
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025339
25340if test $enable_unicode = yes
25341then
Martin v. Löwisfd917792001-06-27 20:22:04 +000025342 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025343 case "$have_ucs4_tcl" in
25344 yes) enable_unicode="ucs4"
25345 ;;
25346 *) enable_unicode="ucs2"
25347 ;;
25348 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025349fi
25350
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025351
25352
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025353case "$enable_unicode" in
25354ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000025355 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025356#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000025357_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025358
25359 ;;
25360ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000025361 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025362#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000025363_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025364
25365 ;;
25366esac
25367
Michael W. Hudson54241132001-12-07 15:38:26 +000025368
Martin v. Löwis11437992002-04-12 09:54:03 +000025369
25370
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025371
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025372if test "$enable_unicode" = "no"
25373then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000025374 UNICODE_OBJS=""
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025375 { echo "$as_me:$LINENO: result: not used" >&5
25376echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025377else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000025378 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000025379
25380cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025381#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025382_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025383
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025384
25385 # wchar_t is only usable if it maps to an unsigned type
25386 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000025387 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025388 then
25389 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025390
Martin v. Löwis11437992002-04-12 09:54:03 +000025391cat >>confdefs.h <<\_ACEOF
25392#define HAVE_USABLE_WCHAR_T 1
25393_ACEOF
25394
25395 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025396#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025397_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025398
25399 elif test "$ac_cv_sizeof_short" = "$unicode_size"
25400 then
25401 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000025402 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025403#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000025404_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025405
25406 elif test "$ac_cv_sizeof_long" = "$unicode_size"
25407 then
25408 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000025409 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025410#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000025411_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025412
25413 else
25414 PY_UNICODE_TYPE="no type found"
25415 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025416 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
25417echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025418fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000025419
25420# check for endianness
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025421{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
25422echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025423if test "${ac_cv_c_bigendian+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025424 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000025425else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025426 # See if sys/param.h defines the BYTE_ORDER macro.
25427cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025428/* confdefs.h. */
25429_ACEOF
25430cat confdefs.h >>conftest.$ac_ext
25431cat >>conftest.$ac_ext <<_ACEOF
25432/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025433#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025434#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025435
Martin v. Löwis11437992002-04-12 09:54:03 +000025436int
25437main ()
25438{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025439#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
25440 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
25441 bogus endian macros
25442#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025443
25444 ;
25445 return 0;
25446}
25447_ACEOF
25448rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025449if { (ac_try="$ac_compile"
25450case "(($ac_try" in
25451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25452 *) ac_try_echo=$ac_try;;
25453esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025455 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025456 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025457 grep -v '^ *+' conftest.er1 >conftest.err
25458 rm -f conftest.er1
25459 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025461 (exit $ac_status); } && {
25462 test -z "$ac_c_werror_flag" ||
25463 test ! -s conftest.err
25464 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025465 # It does; now see whether it defined to BIG_ENDIAN or not.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025466cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025467/* confdefs.h. */
25468_ACEOF
25469cat confdefs.h >>conftest.$ac_ext
25470cat >>conftest.$ac_ext <<_ACEOF
25471/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025472#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025473#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025474
Martin v. Löwis11437992002-04-12 09:54:03 +000025475int
25476main ()
25477{
Guido van Rossumef2255b2000-03-10 22:30:29 +000025478#if BYTE_ORDER != BIG_ENDIAN
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025479 not big endian
25480#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025481
25482 ;
25483 return 0;
25484}
25485_ACEOF
25486rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025487if { (ac_try="$ac_compile"
25488case "(($ac_try" in
25489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25490 *) ac_try_echo=$ac_try;;
25491esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025493 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025494 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025495 grep -v '^ *+' conftest.er1 >conftest.err
25496 rm -f conftest.er1
25497 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025499 (exit $ac_status); } && {
25500 test -z "$ac_c_werror_flag" ||
25501 test ! -s conftest.err
25502 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025503 ac_cv_c_bigendian=yes
25504else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025505 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025506sed 's/^/| /' conftest.$ac_ext >&5
25507
Martin v. Löwiseba40652007-08-30 20:10:57 +000025508 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000025509fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025510
25511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000025512else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025513 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025514sed 's/^/| /' conftest.$ac_ext >&5
25515
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025516 # It does not; compile a test program.
25517if test "$cross_compiling" = yes; then
25518 # try to guess the endianness by grepping values into an object file
25519 ac_cv_c_bigendian=unknown
25520 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025521/* confdefs.h. */
25522_ACEOF
25523cat confdefs.h >>conftest.$ac_ext
25524cat >>conftest.$ac_ext <<_ACEOF
25525/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025526short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
25527short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
25528void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
25529short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
25530short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
25531void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025532int
25533main ()
25534{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025535 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025536 ;
25537 return 0;
25538}
25539_ACEOF
25540rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025541if { (ac_try="$ac_compile"
25542case "(($ac_try" in
25543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25544 *) ac_try_echo=$ac_try;;
25545esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025547 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025548 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025549 grep -v '^ *+' conftest.er1 >conftest.err
25550 rm -f conftest.er1
25551 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025553 (exit $ac_status); } && {
25554 test -z "$ac_c_werror_flag" ||
25555 test ! -s conftest.err
25556 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025557 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025558 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025559fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025560if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
25561 if test "$ac_cv_c_bigendian" = unknown; then
25562 ac_cv_c_bigendian=no
25563 else
25564 # finding both strings is unlikely to happen, but who knows?
25565 ac_cv_c_bigendian=unknown
25566 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025567fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025568else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025569 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025570sed 's/^/| /' conftest.$ac_ext >&5
25571
Martin v. Löwiseba40652007-08-30 20:10:57 +000025572
Martin v. Löwis11437992002-04-12 09:54:03 +000025573fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025574
25575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025576else
25577 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025578/* confdefs.h. */
25579_ACEOF
25580cat confdefs.h >>conftest.$ac_ext
25581cat >>conftest.$ac_ext <<_ACEOF
25582/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000025583$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000025584int
25585main ()
25586{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025587
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025588 /* Are we little or big endian? From Harbison&Steele. */
25589 union
25590 {
25591 long int l;
25592 char c[sizeof (long int)];
25593 } u;
25594 u.l = 1;
25595 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025596
25597 ;
25598 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025599}
Martin v. Löwis11437992002-04-12 09:54:03 +000025600_ACEOF
25601rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025602if { (ac_try="$ac_link"
25603case "(($ac_try" in
25604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25605 *) ac_try_echo=$ac_try;;
25606esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025608 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025609 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025611 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025612 { (case "(($ac_try" in
25613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25614 *) ac_try_echo=$ac_try;;
25615esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025617 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025618 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025620 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025621 ac_cv_c_bigendian=no
25622else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025623 echo "$as_me: program exited with status $ac_status" >&5
25624echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025625sed 's/^/| /' conftest.$ac_ext >&5
25626
Martin v. Löwis11437992002-04-12 09:54:03 +000025627( exit $ac_status )
25628ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000025629fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025630rm -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 +000025631fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025632
25633
Martin v. Löwis11437992002-04-12 09:54:03 +000025634fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025635
25636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25637fi
25638{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
25639echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
25640case $ac_cv_c_bigendian in
25641 yes)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025642
25643cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025644#define WORDS_BIGENDIAN 1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025645_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025646 ;;
25647 no)
25648 ;;
25649 *)
25650 { { echo "$as_me:$LINENO: error: unknown endianness
25651presetting ac_cv_c_bigendian=no (or yes) will help" >&5
25652echo "$as_me: error: unknown endianness
25653presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025654 { (exit 1); exit 1; }; } ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025655esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000025656
Michael W. Hudson54241132001-12-07 15:38:26 +000025657
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025658# Check whether right shifting a negative integer extends the sign bit
25659# or fills with zeros (like the Cray J90, according to Tim Peters).
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025660{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
25661echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025662if test "${ac_cv_rshift_extends_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025663 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000025664else
Martin v. Löwis11437992002-04-12 09:54:03 +000025665
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025666if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025667 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025668else
Martin v. Löwis11437992002-04-12 09:54:03 +000025669 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025670/* confdefs.h. */
25671_ACEOF
25672cat confdefs.h >>conftest.$ac_ext
25673cat >>conftest.$ac_ext <<_ACEOF
25674/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025675
25676int main()
25677{
Vladimir Marangozova6180282000-07-12 05:05:06 +000025678 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025679}
25680
Martin v. Löwis11437992002-04-12 09:54:03 +000025681_ACEOF
25682rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025683if { (ac_try="$ac_link"
25684case "(($ac_try" in
25685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25686 *) ac_try_echo=$ac_try;;
25687esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025689 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025690 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025692 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025693 { (case "(($ac_try" in
25694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25695 *) ac_try_echo=$ac_try;;
25696esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025698 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025699 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025701 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000025702 ac_cv_rshift_extends_sign=yes
25703else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025704 echo "$as_me: program exited with status $ac_status" >&5
25705echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025706sed 's/^/| /' conftest.$ac_ext >&5
25707
Martin v. Löwis11437992002-04-12 09:54:03 +000025708( exit $ac_status )
25709ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000025710fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025711rm -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 +000025712fi
25713
Martin v. Löwiseba40652007-08-30 20:10:57 +000025714
25715fi
25716
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025717{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25718echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025719if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025720then
Martin v. Löwis11437992002-04-12 09:54:03 +000025721
25722cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025723#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025724_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025725
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025726fi
25727
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025728# check for getc_unlocked and related locking functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025729{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25730echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025731if test "${ac_cv_have_getc_unlocked+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025732 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025733else
Martin v. Löwis11437992002-04-12 09:54:03 +000025734
25735cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025736/* confdefs.h. */
25737_ACEOF
25738cat confdefs.h >>conftest.$ac_ext
25739cat >>conftest.$ac_ext <<_ACEOF
25740/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025741#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025742int
25743main ()
25744{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025745
25746 FILE *f = fopen("/dev/null", "r");
25747 flockfile(f);
25748 getc_unlocked(f);
25749 funlockfile(f);
25750
Martin v. Löwis11437992002-04-12 09:54:03 +000025751 ;
25752 return 0;
25753}
25754_ACEOF
25755rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025756if { (ac_try="$ac_link"
25757case "(($ac_try" in
25758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25759 *) ac_try_echo=$ac_try;;
25760esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025762 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025763 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025764 grep -v '^ *+' conftest.er1 >conftest.err
25765 rm -f conftest.er1
25766 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025768 (exit $ac_status); } && {
25769 test -z "$ac_c_werror_flag" ||
25770 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025771 } && test -s conftest$ac_exeext &&
25772 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025773 ac_cv_have_getc_unlocked=yes
25774else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025775 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025776sed 's/^/| /' conftest.$ac_ext >&5
25777
Martin v. Löwiseba40652007-08-30 20:10:57 +000025778 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025779fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025780
25781rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025782 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025783fi
25784
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025785{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
25786echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025787if test "$ac_cv_have_getc_unlocked" = yes
25788then
Martin v. Löwis11437992002-04-12 09:54:03 +000025789
25790cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025791#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025792_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025793
25794fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025795
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025796# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000025797# save the value of LIBS so we don't actually link Python with readline
25798LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025799
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025800# On some systems we need to link readline to a termcap compatible
25801# library. NOTE: Keep the precedence of listed libraries synchronised
25802# with setup.py.
25803py_cv_lib_readline=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025804{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
25805echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025806for py_libtermcap in "" ncursesw ncurses curses termcap; do
25807 if test -z "$py_libtermcap"; then
25808 READLINE_LIBS="-lreadline"
25809 else
25810 READLINE_LIBS="-lreadline -l$py_libtermcap"
25811 fi
25812 LIBS="$READLINE_LIBS $LIBS_no_readline"
25813 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025814/* confdefs.h. */
25815_ACEOF
25816cat confdefs.h >>conftest.$ac_ext
25817cat >>conftest.$ac_ext <<_ACEOF
25818/* end confdefs.h. */
25819
Martin v. Löwiseba40652007-08-30 20:10:57 +000025820/* Override any GCC internal prototype to avoid an error.
25821 Use char because int might match the return type of a GCC
25822 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025823#ifdef __cplusplus
25824extern "C"
25825#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025826char readline ();
25827int
25828main ()
25829{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025830return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025831 ;
25832 return 0;
25833}
25834_ACEOF
25835rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025836if { (ac_try="$ac_link"
25837case "(($ac_try" in
25838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25839 *) ac_try_echo=$ac_try;;
25840esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025842 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025843 ac_status=$?
25844 grep -v '^ *+' conftest.er1 >conftest.err
25845 rm -f conftest.er1
25846 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025848 (exit $ac_status); } && {
25849 test -z "$ac_c_werror_flag" ||
25850 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025851 } && test -s conftest$ac_exeext &&
25852 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025853 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025854else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025855 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025856sed 's/^/| /' conftest.$ac_ext >&5
25857
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025858
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025859fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025860
25861rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025862 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025863 if test $py_cv_lib_readline = yes; then
25864 break
25865 fi
25866done
25867# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
25868#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000025869if test $py_cv_lib_readline = no; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025870 { echo "$as_me:$LINENO: result: none" >&5
25871echo "${ECHO_T}none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025872else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025873 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
25874echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025875
25876cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025877#define HAVE_LIBREADLINE 1
25878_ACEOF
25879
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025880fi
25881
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025882# check for readline 2.1
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025883{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
25884echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025885if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025886 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025887else
25888 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025889LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025890cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025891/* confdefs.h. */
25892_ACEOF
25893cat confdefs.h >>conftest.$ac_ext
25894cat >>conftest.$ac_ext <<_ACEOF
25895/* end confdefs.h. */
25896
Martin v. Löwiseba40652007-08-30 20:10:57 +000025897/* Override any GCC internal prototype to avoid an error.
25898 Use char because int might match the return type of a GCC
25899 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025900#ifdef __cplusplus
25901extern "C"
25902#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025903char rl_callback_handler_install ();
25904int
25905main ()
25906{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025907return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025908 ;
25909 return 0;
25910}
25911_ACEOF
25912rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025913if { (ac_try="$ac_link"
25914case "(($ac_try" in
25915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25916 *) ac_try_echo=$ac_try;;
25917esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025919 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025920 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025921 grep -v '^ *+' conftest.er1 >conftest.err
25922 rm -f conftest.er1
25923 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025925 (exit $ac_status); } && {
25926 test -z "$ac_c_werror_flag" ||
25927 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025928 } && test -s conftest$ac_exeext &&
25929 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025930 ac_cv_lib_readline_rl_callback_handler_install=yes
25931else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025932 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025933sed 's/^/| /' conftest.$ac_ext >&5
25934
Martin v. Löwiseba40652007-08-30 20:10:57 +000025935 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025936fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025937
25938rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025939 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025940LIBS=$ac_check_lib_save_LIBS
25941fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025942{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25943echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25944if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025945
25946cat >>confdefs.h <<\_ACEOF
25947#define HAVE_RL_CALLBACK 1
25948_ACEOF
25949
25950fi
25951
25952
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025953# check for readline 2.2
25954cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025955/* confdefs.h. */
25956_ACEOF
25957cat confdefs.h >>conftest.$ac_ext
25958cat >>conftest.$ac_ext <<_ACEOF
25959/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025960#include <readline/readline.h>
25961_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025962if { (ac_try="$ac_cpp conftest.$ac_ext"
25963case "(($ac_try" in
25964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25965 *) ac_try_echo=$ac_try;;
25966esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025968 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025969 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025970 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025971 rm -f conftest.er1
25972 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025974 (exit $ac_status); } >/dev/null && {
25975 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25976 test ! -s conftest.err
25977 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025978 have_readline=yes
25979else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025980 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025981sed 's/^/| /' conftest.$ac_ext >&5
25982
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025983 have_readline=no
25984fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025985
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025986rm -f conftest.err conftest.$ac_ext
25987if test $have_readline = yes
25988then
25989 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025990/* confdefs.h. */
25991_ACEOF
25992cat confdefs.h >>conftest.$ac_ext
25993cat >>conftest.$ac_ext <<_ACEOF
25994/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025995#include <readline/readline.h>
25996
25997_ACEOF
25998if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025999 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026000
26001cat >>confdefs.h <<\_ACEOF
26002#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
26003_ACEOF
26004
26005fi
Ronald Oussoren92919a62009-12-24 13:30:58 +000026006rm -f -r conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000026007
26008 cat >conftest.$ac_ext <<_ACEOF
26009/* confdefs.h. */
26010_ACEOF
26011cat confdefs.h >>conftest.$ac_ext
26012cat >>conftest.$ac_ext <<_ACEOF
26013/* end confdefs.h. */
26014#include <readline/readline.h>
26015
26016_ACEOF
26017if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26018 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
26019
26020cat >>confdefs.h <<\_ACEOF
26021#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
26022_ACEOF
26023
26024fi
Ronald Oussoren92919a62009-12-24 13:30:58 +000026025rm -f -r conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026026
26027fi
26028
Martin v. Löwis0daad592001-09-30 21:09:59 +000026029# check for readline 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026030{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
26031echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026032if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026033 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000026034else
Martin v. Löwis11437992002-04-12 09:54:03 +000026035 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026036LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000026037cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026038/* confdefs.h. */
26039_ACEOF
26040cat confdefs.h >>conftest.$ac_ext
26041cat >>conftest.$ac_ext <<_ACEOF
26042/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026043
Martin v. Löwiseba40652007-08-30 20:10:57 +000026044/* Override any GCC internal prototype to avoid an error.
26045 Use char because int might match the return type of a GCC
26046 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026047#ifdef __cplusplus
26048extern "C"
26049#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000026050char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026051int
26052main ()
26053{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026054return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026055 ;
26056 return 0;
26057}
26058_ACEOF
26059rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026060if { (ac_try="$ac_link"
26061case "(($ac_try" in
26062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26063 *) ac_try_echo=$ac_try;;
26064esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026065eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026066 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026067 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026068 grep -v '^ *+' conftest.er1 >conftest.err
26069 rm -f conftest.er1
26070 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026072 (exit $ac_status); } && {
26073 test -z "$ac_c_werror_flag" ||
26074 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026075 } && test -s conftest$ac_exeext &&
26076 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026077 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000026078else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026079 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026080sed 's/^/| /' conftest.$ac_ext >&5
26081
Martin v. Löwiseba40652007-08-30 20:10:57 +000026082 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000026083fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026084
26085rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026086 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026087LIBS=$ac_check_lib_save_LIBS
26088fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026089{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
26090echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
26091if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000026092
Martin v. Löwis11437992002-04-12 09:54:03 +000026093cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000026094#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026095_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000026096
Martin v. Löwis0daad592001-09-30 21:09:59 +000026097fi
26098
Michael W. Hudson54241132001-12-07 15:38:26 +000026099
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026100# also in 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026101{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
26102echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026103if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026104 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026105else
26106 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026107LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026108cat >conftest.$ac_ext <<_ACEOF
26109/* confdefs.h. */
26110_ACEOF
26111cat confdefs.h >>conftest.$ac_ext
26112cat >>conftest.$ac_ext <<_ACEOF
26113/* end confdefs.h. */
26114
26115/* Override any GCC internal prototype to avoid an error.
26116 Use char because int might match the return type of a GCC
26117 builtin and then its argument prototype would still apply. */
26118#ifdef __cplusplus
26119extern "C"
26120#endif
26121char rl_completion_display_matches_hook ();
26122int
26123main ()
26124{
26125return rl_completion_display_matches_hook ();
26126 ;
26127 return 0;
26128}
26129_ACEOF
26130rm -f conftest.$ac_objext conftest$ac_exeext
26131if { (ac_try="$ac_link"
26132case "(($ac_try" in
26133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26134 *) ac_try_echo=$ac_try;;
26135esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026137 (eval "$ac_link") 2>conftest.er1
26138 ac_status=$?
26139 grep -v '^ *+' conftest.er1 >conftest.err
26140 rm -f conftest.er1
26141 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026143 (exit $ac_status); } && {
26144 test -z "$ac_c_werror_flag" ||
26145 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026146 } && test -s conftest$ac_exeext &&
26147 $as_test_x conftest$ac_exeext; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026148 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
26149else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026150 echo "$as_me: failed program was:" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026151sed 's/^/| /' conftest.$ac_ext >&5
26152
26153 ac_cv_lib_readline_rl_completion_display_matches_hook=no
26154fi
26155
26156rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26157 conftest$ac_exeext conftest.$ac_ext
26158LIBS=$ac_check_lib_save_LIBS
26159fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026160{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
26161echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
26162if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026163
26164cat >>confdefs.h <<\_ACEOF
26165#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
26166_ACEOF
26167
26168fi
26169
26170
Martin v. Löwis0daad592001-09-30 21:09:59 +000026171# check for readline 4.2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026172{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
26173echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026174if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026175 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000026176else
Martin v. Löwis11437992002-04-12 09:54:03 +000026177 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026178LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000026179cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026180/* confdefs.h. */
26181_ACEOF
26182cat confdefs.h >>conftest.$ac_ext
26183cat >>conftest.$ac_ext <<_ACEOF
26184/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026185
Martin v. Löwiseba40652007-08-30 20:10:57 +000026186/* Override any GCC internal prototype to avoid an error.
26187 Use char because int might match the return type of a GCC
26188 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026189#ifdef __cplusplus
26190extern "C"
26191#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000026192char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026193int
26194main ()
26195{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026196return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026197 ;
26198 return 0;
26199}
26200_ACEOF
26201rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026202if { (ac_try="$ac_link"
26203case "(($ac_try" in
26204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26205 *) ac_try_echo=$ac_try;;
26206esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026208 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026209 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026210 grep -v '^ *+' conftest.er1 >conftest.err
26211 rm -f conftest.er1
26212 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026214 (exit $ac_status); } && {
26215 test -z "$ac_c_werror_flag" ||
26216 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026217 } && test -s conftest$ac_exeext &&
26218 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026219 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000026220else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026221 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026222sed 's/^/| /' conftest.$ac_ext >&5
26223
Martin v. Löwiseba40652007-08-30 20:10:57 +000026224 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000026225fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026226
26227rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026228 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026229LIBS=$ac_check_lib_save_LIBS
26230fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026231{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
26232echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
26233if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000026234
Martin v. Löwis11437992002-04-12 09:54:03 +000026235cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000026236#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026237_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000026238
Guido van Rossum353ae582001-07-10 16:45:32 +000026239fi
26240
Jack Jansendd19cf82001-12-06 22:36:17 +000026241
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026242# also in readline 4.2
26243cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026244/* confdefs.h. */
26245_ACEOF
26246cat confdefs.h >>conftest.$ac_ext
26247cat >>conftest.$ac_ext <<_ACEOF
26248/* end confdefs.h. */
26249#include <readline/readline.h>
26250_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026251if { (ac_try="$ac_cpp conftest.$ac_ext"
26252case "(($ac_try" in
26253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26254 *) ac_try_echo=$ac_try;;
26255esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026257 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026258 ac_status=$?
26259 grep -v '^ *+' conftest.er1 >conftest.err
26260 rm -f conftest.er1
26261 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026263 (exit $ac_status); } >/dev/null && {
26264 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26265 test ! -s conftest.err
26266 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026267 have_readline=yes
26268else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026269 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026270sed 's/^/| /' conftest.$ac_ext >&5
26271
26272 have_readline=no
26273fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026274
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026275rm -f conftest.err conftest.$ac_ext
26276if test $have_readline = yes
26277then
26278 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026279/* confdefs.h. */
26280_ACEOF
26281cat confdefs.h >>conftest.$ac_ext
26282cat >>conftest.$ac_ext <<_ACEOF
26283/* end confdefs.h. */
26284#include <readline/readline.h>
26285
26286_ACEOF
26287if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26288 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
26289
26290cat >>confdefs.h <<\_ACEOF
26291#define HAVE_RL_CATCH_SIGNAL 1
26292_ACEOF
26293
26294fi
Ronald Oussoren92919a62009-12-24 13:30:58 +000026295rm -f -r conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026296
26297fi
26298
Martin v. Löwis82bca632006-02-10 20:49:30 +000026299# End of readline checks: restore LIBS
26300LIBS=$LIBS_no_readline
26301
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026302{ echo "$as_me:$LINENO: checking for broken nice()" >&5
26303echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026304if test "${ac_cv_broken_nice+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026305 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000026306else
Martin v. Löwis11437992002-04-12 09:54:03 +000026307
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026308if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000026309 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026310else
Martin v. Löwis11437992002-04-12 09:54:03 +000026311 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026312/* confdefs.h. */
26313_ACEOF
26314cat confdefs.h >>conftest.$ac_ext
26315cat >>conftest.$ac_ext <<_ACEOF
26316/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026317
26318int main()
26319{
26320 int val1 = nice(1);
26321 if (val1 != -1 && val1 == nice(2))
26322 exit(0);
26323 exit(1);
26324}
26325
Martin v. Löwis11437992002-04-12 09:54:03 +000026326_ACEOF
26327rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026328if { (ac_try="$ac_link"
26329case "(($ac_try" in
26330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26331 *) ac_try_echo=$ac_try;;
26332esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026334 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026335 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026337 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026338 { (case "(($ac_try" in
26339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26340 *) ac_try_echo=$ac_try;;
26341esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026343 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026344 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026346 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026347 ac_cv_broken_nice=yes
26348else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026349 echo "$as_me: program exited with status $ac_status" >&5
26350echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026351sed 's/^/| /' conftest.$ac_ext >&5
26352
Martin v. Löwis11437992002-04-12 09:54:03 +000026353( exit $ac_status )
26354ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026355fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026356rm -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 +000026357fi
26358
Martin v. Löwiseba40652007-08-30 20:10:57 +000026359
26360fi
26361
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026362{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
26363echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026364if test "$ac_cv_broken_nice" = yes
26365then
Martin v. Löwis11437992002-04-12 09:54:03 +000026366
26367cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026368#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026369_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026370
26371fi
26372
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026373{ echo "$as_me:$LINENO: checking for broken poll()" >&5
26374echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026375if test "${ac_cv_broken_poll+set}" = set; then
26376 echo $ECHO_N "(cached) $ECHO_C" >&6
26377else
26378 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026379 ac_cv_broken_poll=no
26380else
26381 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026382/* confdefs.h. */
26383_ACEOF
26384cat confdefs.h >>conftest.$ac_ext
26385cat >>conftest.$ac_ext <<_ACEOF
26386/* end confdefs.h. */
26387
26388#include <poll.h>
26389
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026390int main()
26391{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026392 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026393 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026394
26395 close (42);
26396
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026397 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026398 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026399 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026400 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026401 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026402 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026403 return 1;
26404}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026405
26406_ACEOF
26407rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026408if { (ac_try="$ac_link"
26409case "(($ac_try" in
26410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26411 *) ac_try_echo=$ac_try;;
26412esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026414 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026415 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026417 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026418 { (case "(($ac_try" in
26419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26420 *) ac_try_echo=$ac_try;;
26421esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026423 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026424 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026426 (exit $ac_status); }; }; then
26427 ac_cv_broken_poll=yes
26428else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026429 echo "$as_me: program exited with status $ac_status" >&5
26430echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026431sed 's/^/| /' conftest.$ac_ext >&5
26432
26433( exit $ac_status )
26434ac_cv_broken_poll=no
26435fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026436rm -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 +000026437fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026438
26439
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026440fi
26441
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026442{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
26443echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026444if test "$ac_cv_broken_poll" = yes
26445then
26446
26447cat >>confdefs.h <<\_ACEOF
26448#define HAVE_BROKEN_POLL 1
26449_ACEOF
26450
26451fi
26452
Brett Cannon43802422005-02-10 20:48:03 +000026453# 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 +000026454# (which is not required by ISO C or UNIX spec) and/or if we support
26455# tzname[]
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026456{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
26457echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026458if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026459 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026460else
26461 cat >conftest.$ac_ext <<_ACEOF
26462/* confdefs.h. */
26463_ACEOF
26464cat confdefs.h >>conftest.$ac_ext
26465cat >>conftest.$ac_ext <<_ACEOF
26466/* end confdefs.h. */
26467#include <sys/types.h>
26468#include <$ac_cv_struct_tm>
26469
26470
26471int
26472main ()
26473{
26474static struct tm ac_aggr;
26475if (ac_aggr.tm_zone)
26476return 0;
26477 ;
26478 return 0;
26479}
26480_ACEOF
26481rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026482if { (ac_try="$ac_compile"
26483case "(($ac_try" in
26484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26485 *) ac_try_echo=$ac_try;;
26486esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026488 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026489 ac_status=$?
26490 grep -v '^ *+' conftest.er1 >conftest.err
26491 rm -f conftest.er1
26492 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026494 (exit $ac_status); } && {
26495 test -z "$ac_c_werror_flag" ||
26496 test ! -s conftest.err
26497 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026498 ac_cv_member_struct_tm_tm_zone=yes
26499else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026500 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026501sed 's/^/| /' conftest.$ac_ext >&5
26502
Martin v. Löwiseba40652007-08-30 20:10:57 +000026503 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000026504/* confdefs.h. */
26505_ACEOF
26506cat confdefs.h >>conftest.$ac_ext
26507cat >>conftest.$ac_ext <<_ACEOF
26508/* end confdefs.h. */
26509#include <sys/types.h>
26510#include <$ac_cv_struct_tm>
26511
26512
26513int
26514main ()
26515{
26516static struct tm ac_aggr;
26517if (sizeof ac_aggr.tm_zone)
26518return 0;
26519 ;
26520 return 0;
26521}
26522_ACEOF
26523rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026524if { (ac_try="$ac_compile"
26525case "(($ac_try" in
26526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26527 *) ac_try_echo=$ac_try;;
26528esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026530 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026531 ac_status=$?
26532 grep -v '^ *+' conftest.er1 >conftest.err
26533 rm -f conftest.er1
26534 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026536 (exit $ac_status); } && {
26537 test -z "$ac_c_werror_flag" ||
26538 test ! -s conftest.err
26539 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026540 ac_cv_member_struct_tm_tm_zone=yes
26541else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026542 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026543sed 's/^/| /' conftest.$ac_ext >&5
26544
Martin v. Löwiseba40652007-08-30 20:10:57 +000026545 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000026546fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026547
26548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026549fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026550
26551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026552fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026553{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
26554echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
26555if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000026556
26557cat >>confdefs.h <<_ACEOF
26558#define HAVE_STRUCT_TM_TM_ZONE 1
26559_ACEOF
26560
26561
26562fi
26563
26564if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
26565
26566cat >>confdefs.h <<\_ACEOF
26567#define HAVE_TM_ZONE 1
26568_ACEOF
26569
26570else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026571 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
26572echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000026573if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026574 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000026575else
26576 cat >conftest.$ac_ext <<_ACEOF
26577/* confdefs.h. */
26578_ACEOF
26579cat confdefs.h >>conftest.$ac_ext
26580cat >>conftest.$ac_ext <<_ACEOF
26581/* end confdefs.h. */
26582#include <time.h>
26583
26584int
26585main ()
26586{
26587#ifndef tzname
26588 (void) tzname;
26589#endif
26590
26591 ;
26592 return 0;
26593}
26594_ACEOF
26595rm -f conftest.$ac_objext
26596if { (ac_try="$ac_compile"
26597case "(($ac_try" in
26598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26599 *) ac_try_echo=$ac_try;;
26600esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026602 (eval "$ac_compile") 2>conftest.er1
26603 ac_status=$?
26604 grep -v '^ *+' conftest.er1 >conftest.err
26605 rm -f conftest.er1
26606 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026608 (exit $ac_status); } && {
26609 test -z "$ac_c_werror_flag" ||
26610 test ! -s conftest.err
26611 } && test -s conftest.$ac_objext; then
26612 ac_cv_have_decl_tzname=yes
26613else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026614 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026615sed 's/^/| /' conftest.$ac_ext >&5
26616
26617 ac_cv_have_decl_tzname=no
26618fi
26619
26620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26621fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026622{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
26623echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
26624if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000026625
26626cat >>confdefs.h <<_ACEOF
26627#define HAVE_DECL_TZNAME 1
26628_ACEOF
26629
26630
26631else
26632 cat >>confdefs.h <<_ACEOF
26633#define HAVE_DECL_TZNAME 0
26634_ACEOF
26635
26636
26637fi
26638
26639
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026640 { echo "$as_me:$LINENO: checking for tzname" >&5
26641echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026642if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026643 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026644else
26645 cat >conftest.$ac_ext <<_ACEOF
26646/* confdefs.h. */
26647_ACEOF
26648cat confdefs.h >>conftest.$ac_ext
26649cat >>conftest.$ac_ext <<_ACEOF
26650/* end confdefs.h. */
26651#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000026652#if !HAVE_DECL_TZNAME
26653extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000026654#endif
26655
26656int
26657main ()
26658{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026659return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000026660 ;
26661 return 0;
26662}
26663_ACEOF
26664rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026665if { (ac_try="$ac_link"
26666case "(($ac_try" in
26667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26668 *) ac_try_echo=$ac_try;;
26669esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026671 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026672 ac_status=$?
26673 grep -v '^ *+' conftest.er1 >conftest.err
26674 rm -f conftest.er1
26675 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026677 (exit $ac_status); } && {
26678 test -z "$ac_c_werror_flag" ||
26679 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026680 } && test -s conftest$ac_exeext &&
26681 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000026682 ac_cv_var_tzname=yes
26683else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026684 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026685sed 's/^/| /' conftest.$ac_ext >&5
26686
Martin v. Löwiseba40652007-08-30 20:10:57 +000026687 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000026688fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026689
26690rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000026691 conftest$ac_exeext conftest.$ac_ext
26692fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026693{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
26694echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026695 if test $ac_cv_var_tzname = yes; then
26696
26697cat >>confdefs.h <<\_ACEOF
26698#define HAVE_TZNAME 1
26699_ACEOF
26700
26701 fi
26702fi
26703
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026704
Martin v. Löwis1d459062005-03-14 21:23:33 +000026705# check tzset(3) exists and works like we expect it to
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026706{ echo "$as_me:$LINENO: checking for working tzset()" >&5
26707echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026708if test "${ac_cv_working_tzset+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026709 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026710else
26711
26712if test "$cross_compiling" = yes; then
26713 ac_cv_working_tzset=no
26714else
26715 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026716/* confdefs.h. */
26717_ACEOF
26718cat confdefs.h >>conftest.$ac_ext
26719cat >>conftest.$ac_ext <<_ACEOF
26720/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026721
26722#include <stdlib.h>
26723#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000026724#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000026725
26726#if HAVE_TZNAME
26727extern char *tzname[];
26728#endif
26729
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026730int main()
26731{
Brett Cannon18367812003-09-19 00:59:16 +000026732 /* Note that we need to ensure that not only does tzset(3)
26733 do 'something' with localtime, but it works as documented
26734 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000026735 This includes making sure that tzname is set properly if
26736 tm->tm_zone does not exist since it is the alternative way
26737 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000026738
26739 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000026740 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000026741 */
26742
Martin v. Löwis1d459062005-03-14 21:23:33 +000026743 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000026744 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
26745
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026746 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026747 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026748 if (localtime(&groundhogday)->tm_hour != 0)
26749 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026750#if HAVE_TZNAME
26751 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26752 if (strcmp(tzname[0], "UTC") ||
26753 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26754 exit(1);
26755#endif
Brett Cannon18367812003-09-19 00:59:16 +000026756
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026757 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026758 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026759 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026760 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026761#if HAVE_TZNAME
26762 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26763 exit(1);
26764#endif
Brett Cannon18367812003-09-19 00:59:16 +000026765
26766 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26767 tzset();
26768 if (localtime(&groundhogday)->tm_hour != 11)
26769 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026770#if HAVE_TZNAME
26771 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26772 exit(1);
26773#endif
26774
26775#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000026776 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
26777 exit(1);
26778 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
26779 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026780#endif
Brett Cannon18367812003-09-19 00:59:16 +000026781
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026782 exit(0);
26783}
26784
26785_ACEOF
26786rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026787if { (ac_try="$ac_link"
26788case "(($ac_try" in
26789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26790 *) ac_try_echo=$ac_try;;
26791esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026793 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026794 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026796 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026797 { (case "(($ac_try" in
26798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26799 *) ac_try_echo=$ac_try;;
26800esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026802 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026803 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026805 (exit $ac_status); }; }; then
26806 ac_cv_working_tzset=yes
26807else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026808 echo "$as_me: program exited with status $ac_status" >&5
26809echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026810sed 's/^/| /' conftest.$ac_ext >&5
26811
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026812( exit $ac_status )
26813ac_cv_working_tzset=no
26814fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026815rm -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 +000026816fi
26817
Martin v. Löwiseba40652007-08-30 20:10:57 +000026818
26819fi
26820
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026821{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
26822echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026823if test "$ac_cv_working_tzset" = yes
26824then
26825
26826cat >>confdefs.h <<\_ACEOF
26827#define HAVE_WORKING_TZSET 1
26828_ACEOF
26829
26830fi
26831
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026832# Look for subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026833{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
26834echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026835if test "${ac_cv_stat_tv_nsec+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026836 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026837else
26838 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026839/* confdefs.h. */
26840_ACEOF
26841cat confdefs.h >>conftest.$ac_ext
26842cat >>conftest.$ac_ext <<_ACEOF
26843/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026844#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026845int
26846main ()
26847{
26848
26849struct stat st;
26850st.st_mtim.tv_nsec = 1;
26851
26852 ;
26853 return 0;
26854}
26855_ACEOF
26856rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026857if { (ac_try="$ac_compile"
26858case "(($ac_try" in
26859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26860 *) ac_try_echo=$ac_try;;
26861esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026862eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026863 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026864 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026865 grep -v '^ *+' conftest.er1 >conftest.err
26866 rm -f conftest.er1
26867 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026869 (exit $ac_status); } && {
26870 test -z "$ac_c_werror_flag" ||
26871 test ! -s conftest.err
26872 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000026873 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026874else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026875 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026876sed 's/^/| /' conftest.$ac_ext >&5
26877
Martin v. Löwiseba40652007-08-30 20:10:57 +000026878 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026879fi
26880
Martin v. Löwiseba40652007-08-30 20:10:57 +000026881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26882fi
26883
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026884{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
26885echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026886if test "$ac_cv_stat_tv_nsec" = yes
26887then
26888
26889cat >>confdefs.h <<\_ACEOF
26890#define HAVE_STAT_TV_NSEC 1
26891_ACEOF
26892
26893fi
26894
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026895# Look for BSD style subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026896{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
26897echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026898if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026899 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026900else
26901 cat >conftest.$ac_ext <<_ACEOF
26902/* confdefs.h. */
26903_ACEOF
26904cat confdefs.h >>conftest.$ac_ext
26905cat >>conftest.$ac_ext <<_ACEOF
26906/* end confdefs.h. */
26907#include <sys/stat.h>
26908int
26909main ()
26910{
26911
26912struct stat st;
26913st.st_mtimespec.tv_nsec = 1;
26914
26915 ;
26916 return 0;
26917}
26918_ACEOF
26919rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026920if { (ac_try="$ac_compile"
26921case "(($ac_try" in
26922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26923 *) ac_try_echo=$ac_try;;
26924esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026926 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026927 ac_status=$?
26928 grep -v '^ *+' conftest.er1 >conftest.err
26929 rm -f conftest.er1
26930 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026932 (exit $ac_status); } && {
26933 test -z "$ac_c_werror_flag" ||
26934 test ! -s conftest.err
26935 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026936 ac_cv_stat_tv_nsec2=yes
26937else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026938 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026939sed 's/^/| /' conftest.$ac_ext >&5
26940
Martin v. Löwiseba40652007-08-30 20:10:57 +000026941 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026942fi
26943
Martin v. Löwiseba40652007-08-30 20:10:57 +000026944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26945fi
26946
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026947{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26948echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026949if test "$ac_cv_stat_tv_nsec2" = yes
26950then
26951
26952cat >>confdefs.h <<\_ACEOF
26953#define HAVE_STAT_TV_NSEC2 1
26954_ACEOF
26955
26956fi
26957
Jack Jansen666b1e72001-10-31 12:11:48 +000026958# On HP/UX 11.0, mvwdelch is a block with a return statement
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026959{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26960echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026961if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026962 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026963else
Martin v. Löwis11437992002-04-12 09:54:03 +000026964 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026965/* confdefs.h. */
26966_ACEOF
26967cat confdefs.h >>conftest.$ac_ext
26968cat >>conftest.$ac_ext <<_ACEOF
26969/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026970#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026971int
26972main ()
26973{
Jack Jansen666b1e72001-10-31 12:11:48 +000026974
26975 int rtn;
26976 rtn = mvwdelch(0,0,0);
26977
Martin v. Löwis11437992002-04-12 09:54:03 +000026978 ;
26979 return 0;
26980}
26981_ACEOF
26982rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026983if { (ac_try="$ac_compile"
26984case "(($ac_try" in
26985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26986 *) ac_try_echo=$ac_try;;
26987esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026989 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026990 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026991 grep -v '^ *+' conftest.er1 >conftest.err
26992 rm -f conftest.er1
26993 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026995 (exit $ac_status); } && {
26996 test -z "$ac_c_werror_flag" ||
26997 test ! -s conftest.err
26998 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026999 ac_cv_mvwdelch_is_expression=yes
27000else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027001 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027002sed 's/^/| /' conftest.$ac_ext >&5
27003
Martin v. Löwiseba40652007-08-30 20:10:57 +000027004 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000027005fi
27006
Martin v. Löwiseba40652007-08-30 20:10:57 +000027007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27008fi
27009
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027010{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
27011echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000027012
27013if test "$ac_cv_mvwdelch_is_expression" = yes
27014then
Martin v. Löwis11437992002-04-12 09:54:03 +000027015
27016cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027017#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000027018_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027019
27020fi
27021
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027022{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
27023echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027024if test "${ac_cv_window_has_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027025 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000027026else
Martin v. Löwis11437992002-04-12 09:54:03 +000027027 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027028/* confdefs.h. */
27029_ACEOF
27030cat confdefs.h >>conftest.$ac_ext
27031cat >>conftest.$ac_ext <<_ACEOF
27032/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000027033#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000027034int
27035main ()
27036{
Jack Jansen666b1e72001-10-31 12:11:48 +000027037
27038 WINDOW *w;
27039 w->_flags = 0;
27040
Martin v. Löwis11437992002-04-12 09:54:03 +000027041 ;
27042 return 0;
27043}
27044_ACEOF
27045rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027046if { (ac_try="$ac_compile"
27047case "(($ac_try" in
27048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27049 *) ac_try_echo=$ac_try;;
27050esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027052 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027053 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027054 grep -v '^ *+' conftest.er1 >conftest.err
27055 rm -f conftest.er1
27056 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027058 (exit $ac_status); } && {
27059 test -z "$ac_c_werror_flag" ||
27060 test ! -s conftest.err
27061 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000027062 ac_cv_window_has_flags=yes
27063else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027064 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027065sed 's/^/| /' conftest.$ac_ext >&5
27066
Martin v. Löwiseba40652007-08-30 20:10:57 +000027067 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000027068fi
27069
Martin v. Löwiseba40652007-08-30 20:10:57 +000027070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27071fi
27072
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027073{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
27074echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027075
Jack Jansen666b1e72001-10-31 12:11:48 +000027076
27077if test "$ac_cv_window_has_flags" = yes
27078then
Martin v. Löwis11437992002-04-12 09:54:03 +000027079
27080cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027081#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000027082_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027083
27084fi
27085
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027086{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
27087echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027088cat >conftest.$ac_ext <<_ACEOF
27089/* confdefs.h. */
27090_ACEOF
27091cat confdefs.h >>conftest.$ac_ext
27092cat >>conftest.$ac_ext <<_ACEOF
27093/* end confdefs.h. */
27094#include <curses.h>
27095int
27096main ()
27097{
27098void *x=is_term_resized
27099 ;
27100 return 0;
27101}
27102_ACEOF
27103rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027104if { (ac_try="$ac_compile"
27105case "(($ac_try" in
27106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27107 *) ac_try_echo=$ac_try;;
27108esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027110 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027111 ac_status=$?
27112 grep -v '^ *+' conftest.er1 >conftest.err
27113 rm -f conftest.er1
27114 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027116 (exit $ac_status); } && {
27117 test -z "$ac_c_werror_flag" ||
27118 test ! -s conftest.err
27119 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027120
27121cat >>confdefs.h <<\_ACEOF
27122#define HAVE_CURSES_IS_TERM_RESIZED 1
27123_ACEOF
27124
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027125 { echo "$as_me:$LINENO: result: yes" >&5
27126echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027127else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027128 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027129sed 's/^/| /' conftest.$ac_ext >&5
27130
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027131 { echo "$as_me:$LINENO: result: no" >&5
27132echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027133
27134fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027135
Martin v. Löwiseba40652007-08-30 20:10:57 +000027136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27137
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027138{ echo "$as_me:$LINENO: checking for resize_term" >&5
27139echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027140cat >conftest.$ac_ext <<_ACEOF
27141/* confdefs.h. */
27142_ACEOF
27143cat confdefs.h >>conftest.$ac_ext
27144cat >>conftest.$ac_ext <<_ACEOF
27145/* end confdefs.h. */
27146#include <curses.h>
27147int
27148main ()
27149{
27150void *x=resize_term
27151 ;
27152 return 0;
27153}
27154_ACEOF
27155rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027156if { (ac_try="$ac_compile"
27157case "(($ac_try" in
27158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27159 *) ac_try_echo=$ac_try;;
27160esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027162 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027163 ac_status=$?
27164 grep -v '^ *+' conftest.er1 >conftest.err
27165 rm -f conftest.er1
27166 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027168 (exit $ac_status); } && {
27169 test -z "$ac_c_werror_flag" ||
27170 test ! -s conftest.err
27171 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027172
27173cat >>confdefs.h <<\_ACEOF
27174#define HAVE_CURSES_RESIZE_TERM 1
27175_ACEOF
27176
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027177 { echo "$as_me:$LINENO: result: yes" >&5
27178echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027179else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027180 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027181sed 's/^/| /' conftest.$ac_ext >&5
27182
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027183 { echo "$as_me:$LINENO: result: no" >&5
27184echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027185
27186fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027187
Martin v. Löwiseba40652007-08-30 20:10:57 +000027188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27189
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027190{ echo "$as_me:$LINENO: checking for resizeterm" >&5
27191echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027192cat >conftest.$ac_ext <<_ACEOF
27193/* confdefs.h. */
27194_ACEOF
27195cat confdefs.h >>conftest.$ac_ext
27196cat >>conftest.$ac_ext <<_ACEOF
27197/* end confdefs.h. */
27198#include <curses.h>
27199int
27200main ()
27201{
27202void *x=resizeterm
27203 ;
27204 return 0;
27205}
27206_ACEOF
27207rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027208if { (ac_try="$ac_compile"
27209case "(($ac_try" in
27210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27211 *) ac_try_echo=$ac_try;;
27212esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027214 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027215 ac_status=$?
27216 grep -v '^ *+' conftest.er1 >conftest.err
27217 rm -f conftest.er1
27218 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027220 (exit $ac_status); } && {
27221 test -z "$ac_c_werror_flag" ||
27222 test ! -s conftest.err
27223 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027224
27225cat >>confdefs.h <<\_ACEOF
27226#define HAVE_CURSES_RESIZETERM 1
27227_ACEOF
27228
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027229 { echo "$as_me:$LINENO: result: yes" >&5
27230echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027231else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027232 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027233sed 's/^/| /' conftest.$ac_ext >&5
27234
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027235 { echo "$as_me:$LINENO: result: no" >&5
27236echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027237
27238fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027239
Martin v. Löwiseba40652007-08-30 20:10:57 +000027240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27241
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027242{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
27243echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027244
27245if test -r /dev/ptmx
27246then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027247 { echo "$as_me:$LINENO: result: yes" >&5
27248echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000027249
27250cat >>confdefs.h <<\_ACEOF
27251#define HAVE_DEV_PTMX 1
27252_ACEOF
27253
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027254else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027255 { echo "$as_me:$LINENO: result: no" >&5
27256echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000027257fi
27258
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027259{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
27260echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027261
27262if test -r /dev/ptc
27263then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027264 { echo "$as_me:$LINENO: result: yes" >&5
27265echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027266
27267cat >>confdefs.h <<\_ACEOF
27268#define HAVE_DEV_PTC 1
27269_ACEOF
27270
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027271else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027272 { echo "$as_me:$LINENO: result: no" >&5
27273echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027274fi
27275
Mark Dickinson82864d12009-11-15 16:18:58 +000027276if test "$have_long_long" = yes
27277then
27278 { echo "$as_me:$LINENO: checking for %lld and %llu printf() format support" >&5
27279echo $ECHO_N "checking for %lld and %llu printf() format support... $ECHO_C" >&6; }
27280 if test "${ac_cv_have_long_long_format+set}" = set; then
27281 echo $ECHO_N "(cached) $ECHO_C" >&6
27282else
27283 if test "$cross_compiling" = yes; then
27284 ac_cv_have_long_long_format=no
27285else
27286 cat >conftest.$ac_ext <<_ACEOF
27287/* confdefs.h. */
27288_ACEOF
27289cat confdefs.h >>conftest.$ac_ext
27290cat >>conftest.$ac_ext <<_ACEOF
27291/* end confdefs.h. */
27292
27293 #include <stdio.h>
27294 #include <stddef.h>
27295 #include <string.h>
27296
27297 #ifdef HAVE_SYS_TYPES_H
27298 #include <sys/types.h>
27299 #endif
27300
27301 int main()
27302 {
27303 char buffer[256];
27304
27305 if (sprintf(buffer, "%lld", (long long)123) < 0)
27306 return 1;
27307 if (strcmp(buffer, "123"))
27308 return 1;
27309
27310 if (sprintf(buffer, "%lld", (long long)-123) < 0)
27311 return 1;
27312 if (strcmp(buffer, "-123"))
27313 return 1;
27314
27315 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
27316 return 1;
27317 if (strcmp(buffer, "123"))
27318 return 1;
27319
27320 return 0;
27321 }
27322
27323_ACEOF
27324rm -f conftest$ac_exeext
27325if { (ac_try="$ac_link"
27326case "(($ac_try" in
27327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27328 *) ac_try_echo=$ac_try;;
27329esac
27330eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27331 (eval "$ac_link") 2>&5
27332 ac_status=$?
27333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27334 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27335 { (case "(($ac_try" in
27336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27337 *) ac_try_echo=$ac_try;;
27338esac
27339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27340 (eval "$ac_try") 2>&5
27341 ac_status=$?
27342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27343 (exit $ac_status); }; }; then
27344 ac_cv_have_long_long_format=yes
27345else
27346 echo "$as_me: program exited with status $ac_status" >&5
27347echo "$as_me: failed program was:" >&5
27348sed 's/^/| /' conftest.$ac_ext >&5
27349
27350( exit $ac_status )
27351ac_cv_have_long_long_format=no
27352fi
27353rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27354fi
27355
27356
27357
27358fi
27359
27360 { echo "$as_me:$LINENO: result: $ac_cv_have_long_long_format" >&5
27361echo "${ECHO_T}$ac_cv_have_long_long_format" >&6; }
27362fi
27363
27364if test $ac_cv_have_long_long_format = yes
27365then
27366
27367cat >>confdefs.h <<\_ACEOF
27368#define PY_FORMAT_LONG_LONG "ll"
27369_ACEOF
27370
27371fi
27372
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000027373if test $ac_sys_system = Darwin
27374then
27375 LIBS="$LIBS -framework CoreFoundation"
27376fi
27377
Mark Dickinson82864d12009-11-15 16:18:58 +000027378
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027379{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
27380echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027381if test "${ac_cv_have_size_t_format+set}" = set; then
27382 echo $ECHO_N "(cached) $ECHO_C" >&6
27383else
27384 if test "$cross_compiling" = yes; then
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000027385 ac_cv_have_size_t_format="cross -- assuming yes"
27386
Brett Cannon09d12362006-05-11 05:11:33 +000027387else
27388 cat >conftest.$ac_ext <<_ACEOF
27389/* confdefs.h. */
27390_ACEOF
27391cat confdefs.h >>conftest.$ac_ext
27392cat >>conftest.$ac_ext <<_ACEOF
27393/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027394
Brett Cannon09d12362006-05-11 05:11:33 +000027395#include <stdio.h>
27396#include <stddef.h>
27397#include <string.h>
27398
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000027399#ifdef HAVE_SYS_TYPES_H
27400#include <sys/types.h>
27401#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000027402
27403#ifdef HAVE_SSIZE_T
27404typedef ssize_t Py_ssize_t;
27405#elif SIZEOF_VOID_P == SIZEOF_LONG
27406typedef long Py_ssize_t;
27407#else
27408typedef int Py_ssize_t;
27409#endif
Brett Cannon09d12362006-05-11 05:11:33 +000027410
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000027411int main()
27412{
27413 char buffer[256];
27414
Brett Cannon09d12362006-05-11 05:11:33 +000027415 if(sprintf(buffer, "%zd", (size_t)123) < 0)
27416 return 1;
27417
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000027418 if (strcmp(buffer, "123"))
27419 return 1;
27420
27421 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
27422 return 1;
27423
27424 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000027425 return 1;
27426
27427 return 0;
27428}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027429
Brett Cannon09d12362006-05-11 05:11:33 +000027430_ACEOF
27431rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027432if { (ac_try="$ac_link"
27433case "(($ac_try" in
27434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27435 *) ac_try_echo=$ac_try;;
27436esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027438 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000027439 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000027441 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027442 { (case "(($ac_try" in
27443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27444 *) ac_try_echo=$ac_try;;
27445esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027447 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000027448 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000027450 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027451 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027452else
27453 echo "$as_me: program exited with status $ac_status" >&5
27454echo "$as_me: failed program was:" >&5
27455sed 's/^/| /' conftest.$ac_ext >&5
27456
27457( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027458ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027459fi
27460rm -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 +000027461fi
27462
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027463
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027464fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027465{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
27466echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000027467if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027468
27469cat >>confdefs.h <<\_ACEOF
27470#define PY_FORMAT_SIZE_T "z"
27471_ACEOF
27472
27473fi
27474
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027475{ echo "$as_me:$LINENO: checking for socklen_t" >&5
27476echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027477if test "${ac_cv_type_socklen_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027478 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000027479else
Martin v. Löwis11437992002-04-12 09:54:03 +000027480 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027481/* confdefs.h. */
27482_ACEOF
27483cat confdefs.h >>conftest.$ac_ext
27484cat >>conftest.$ac_ext <<_ACEOF
27485/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000027486
27487#ifdef HAVE_SYS_TYPES_H
27488#include <sys/types.h>
27489#endif
27490#ifdef HAVE_SYS_SOCKET_H
27491#include <sys/socket.h>
27492#endif
27493
27494
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027495typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000027496int
27497main ()
27498{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027499if ((ac__type_new_ *) 0)
27500 return 0;
27501if (sizeof (ac__type_new_))
27502 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000027503 ;
27504 return 0;
27505}
27506_ACEOF
27507rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027508if { (ac_try="$ac_compile"
27509case "(($ac_try" in
27510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27511 *) ac_try_echo=$ac_try;;
27512esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027514 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027515 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027516 grep -v '^ *+' conftest.er1 >conftest.err
27517 rm -f conftest.er1
27518 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027520 (exit $ac_status); } && {
27521 test -z "$ac_c_werror_flag" ||
27522 test ! -s conftest.err
27523 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027524 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000027525else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027526 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027527sed 's/^/| /' conftest.$ac_ext >&5
27528
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027529 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000027530fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027531
27532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000027533fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027534{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
27535echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
27536if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027537 :
27538else
Guido van Rossum95713eb2000-05-18 20:53:31 +000027539
Martin v. Löwis01c04012002-11-11 14:58:44 +000027540cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027541#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000027542_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027543
27544fi
27545
Michael W. Hudson54241132001-12-07 15:38:26 +000027546
Michael W. Hudson54241132001-12-07 15:38:26 +000027547
27548
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000027549for h in `(cd $srcdir;echo Python/thread_*.h)`
27550do
27551 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
27552done
27553
Michael W. Hudson54241132001-12-07 15:38:26 +000027554
Neal Norwitzd24499d2005-12-18 21:36:39 +000027555SRCDIRS="Parser Grammar Objects Python Modules Mac"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027556{ echo "$as_me:$LINENO: checking for build directories" >&5
27557echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027558for dir in $SRCDIRS; do
27559 if test ! -d $dir; then
27560 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000027561 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027562done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027563{ echo "$as_me:$LINENO: result: done" >&5
27564echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000027565
Guido van Rossum627b2d71993-12-24 10:39:16 +000027566# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000027567ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000027568
Martin v. Löwis11437992002-04-12 09:54:03 +000027569cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027570# This file is a shell script that caches the results of configure
27571# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000027572# scripts and configure runs, see configure's option --config-cache.
27573# It is not useful on other systems. If it contains results you don't
27574# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027575#
Martin v. Löwis11437992002-04-12 09:54:03 +000027576# config.status only pays attention to the cache file if you give it
27577# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027578#
Skip Montanaro6dead952003-09-25 14:50:04 +000027579# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000027580# loading this file, other *unset* `ac_cv_foo' will be assigned the
27581# following values.
27582
27583_ACEOF
27584
Guido van Rossumf78abae1997-01-21 22:02:36 +000027585# The following way of writing the cache mishandles newlines in values,
27586# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027587# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027588# Ultrix sh set writes to stderr and can't be redirected directly,
27589# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027590(
27591 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27592 eval ac_val=\$$ac_var
27593 case $ac_val in #(
27594 *${as_nl}*)
27595 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027596 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
27597echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027598 esac
27599 case $ac_var in #(
27600 _ | IFS | as_nl) ;; #(
27601 *) $as_unset $ac_var ;;
27602 esac ;;
27603 esac
27604 done
27605
Martin v. Löwis11437992002-04-12 09:54:03 +000027606 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027607 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27608 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000027609 # `set' does not quote correctly, so add quotes (double-quote
27610 # substitution turns \\\\ into \\, and sed turns \\ into \).
27611 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027612 "s/'/'\\\\''/g;
27613 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027614 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000027615 *)
27616 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027617 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027618 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027619 esac |
27620 sort
27621) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027622 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000027623 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027624 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000027625 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027626 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27627 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000027628 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27629 :end' >>confcache
27630if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27631 if test -w "$cache_file"; then
27632 test "x$cache_file" != "x/dev/null" &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027633 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
27634echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027635 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027636 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027637 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27638echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027639 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027640fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027641rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027642
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027643test "x$prefix" = xNONE && prefix=$ac_default_prefix
27644# Let make expand exec_prefix.
27645test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027646
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027647DEFS=-DHAVE_CONFIG_H
27648
Skip Montanaro6dead952003-09-25 14:50:04 +000027649ac_libobjs=
27650ac_ltlibobjs=
27651for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27652 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027653 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027654 ac_i=`echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000027655 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27656 # will be set to the directory where LIBOBJS objects are built.
27657 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27658 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027659done
27660LIBOBJS=$ac_libobjs
27661
27662LTLIBOBJS=$ac_ltlibobjs
27663
27664
Martin v. Löwis11437992002-04-12 09:54:03 +000027665
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027666: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000027667ac_clean_files_save=$ac_clean_files
27668ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027669{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27670echo "$as_me: creating $CONFIG_STATUS" >&6;}
27671cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027672#! $SHELL
27673# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027674# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027675# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027676# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027677
Martin v. Löwis11437992002-04-12 09:54:03 +000027678debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027679ac_cs_recheck=false
27680ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027681SHELL=\${CONFIG_SHELL-$SHELL}
27682_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027683
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027684cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027685## --------------------- ##
27686## M4sh Initialization. ##
27687## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027688
Martin v. Löwiseba40652007-08-30 20:10:57 +000027689# Be more Bourne compatible
27690DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027691if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27692 emulate sh
27693 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027694 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027695 # is contrary to our usage. Disable this feature.
27696 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027697 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000027698else
Martin v. Löwiseba40652007-08-30 20:10:57 +000027699 case `(set -o) 2>/dev/null` in
27700 *posix*) set -o posix ;;
27701esac
27702
Martin v. Löwis11437992002-04-12 09:54:03 +000027703fi
Michael W. Hudson54241132001-12-07 15:38:26 +000027704
Skip Montanaro6dead952003-09-25 14:50:04 +000027705
Martin v. Löwis11437992002-04-12 09:54:03 +000027706
27707
Martin v. Löwiseba40652007-08-30 20:10:57 +000027708# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027709# Avoid depending upon Character Ranges.
27710as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27711as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27712as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27713as_cr_digits='0123456789'
27714as_cr_alnum=$as_cr_Letters$as_cr_digits
27715
27716# The user is always right.
27717if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027718 echo "#! /bin/sh" >conf$$.sh
27719 echo "exit 0" >>conf$$.sh
27720 chmod +x conf$$.sh
27721 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27722 PATH_SEPARATOR=';'
27723 else
27724 PATH_SEPARATOR=:
27725 fi
27726 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027727fi
27728
Martin v. Löwiseba40652007-08-30 20:10:57 +000027729# Support unset when possible.
27730if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27731 as_unset=unset
27732else
27733 as_unset=false
27734fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027735
Martin v. Löwiseba40652007-08-30 20:10:57 +000027736
27737# IFS
27738# We need space, tab and new line, in precisely that order. Quoting is
27739# there to prevent editors from complaining about space-tab.
27740# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27741# splitting by setting IFS to empty value.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027742as_nl='
27743'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027744IFS=" "" $as_nl"
27745
27746# Find who we are. Look in the path if we contain no directory separator.
27747case $0 in
27748 *[\\/]* ) as_myself=$0 ;;
27749 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000027750for as_dir in $PATH
27751do
27752 IFS=$as_save_IFS
27753 test -z "$as_dir" && as_dir=.
27754 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27755done
Martin v. Löwiseba40652007-08-30 20:10:57 +000027756IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000027757
Martin v. Löwiseba40652007-08-30 20:10:57 +000027758 ;;
27759esac
27760# We did not find ourselves, most probably we were run as `sh COMMAND'
27761# in which case we are not to be found in the path.
27762if test "x$as_myself" = x; then
27763 as_myself=$0
27764fi
27765if test ! -f "$as_myself"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027766 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +000027767 { (exit 1); exit 1; }
27768fi
27769
27770# Work around bugs in pre-3.0 UWIN ksh.
27771for as_var in ENV MAIL MAILPATH
27772do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27773done
27774PS1='$ '
27775PS2='> '
27776PS4='+ '
27777
27778# NLS nuisances.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027779for as_var in \
27780 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
27781 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
27782 LC_TELEPHONE LC_TIME
27783do
27784 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
27785 eval $as_var=C; export $as_var
27786 else
27787 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27788 fi
27789done
Martin v. Löwiseba40652007-08-30 20:10:57 +000027790
27791# Required to use basename.
27792if expr a : '\(a\)' >/dev/null 2>&1 &&
27793 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27794 as_expr=expr
27795else
27796 as_expr=false
27797fi
27798
27799if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27800 as_basename=basename
27801else
27802 as_basename=false
27803fi
27804
27805
27806# Name of the executable.
27807as_me=`$as_basename -- "$0" ||
27808$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27809 X"$0" : 'X\(//\)$' \| \
27810 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027811echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027812 sed '/^.*\/\([^/][^/]*\)\/*$/{
27813 s//\1/
27814 q
27815 }
27816 /^X\/\(\/\/\)$/{
27817 s//\1/
27818 q
27819 }
27820 /^X\/\(\/\).*/{
27821 s//\1/
27822 q
27823 }
27824 s/.*/./; q'`
27825
27826# CDPATH.
27827$as_unset CDPATH
27828
27829
27830
Martin v. Löwis11437992002-04-12 09:54:03 +000027831 as_lineno_1=$LINENO
27832 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000027833 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000027834 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000027835
Martin v. Löwis11437992002-04-12 09:54:03 +000027836 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
27837 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000027838 # line-number line after each line using $LINENO; the second 'sed'
27839 # does the real work. The second script uses 'N' to pair each
27840 # line-number line with the line containing $LINENO, and appends
27841 # trailing '-' during substitution so that $LINENO is not a special
27842 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000027843 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000027844 # scripts with optimization help from Paolo Bonzini. Blame Lee
27845 # E. McMahon (1931-1989) for sed's syntax. :-)
27846 sed -n '
27847 p
27848 /[$]LINENO/=
27849 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000027850 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000027851 s/[$]LINENO.*/&-/
27852 t lineno
27853 b
27854 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000027855 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000027856 :loop
27857 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000027858 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000027859 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000027860 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000027861 chmod +x "$as_me.lineno" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027862 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027863 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027864
Martin v. Löwis11437992002-04-12 09:54:03 +000027865 # Don't try to exec as it changes $[0], causing all sort of problems
27866 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000027867 # original and so on. Autoconf is especially sensitive to this).
27868 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000027869 # Exit status is that of the last command.
27870 exit
27871}
27872
27873
Martin v. Löwiseba40652007-08-30 20:10:57 +000027874if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27875 as_dirname=dirname
27876else
27877 as_dirname=false
27878fi
27879
27880ECHO_C= ECHO_N= ECHO_T=
27881case `echo -n x` in
27882-n*)
27883 case `echo 'x\c'` in
27884 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27885 *) ECHO_C='\c';;
27886 esac;;
27887*)
27888 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027889esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027890
Martin v. Löwiseba40652007-08-30 20:10:57 +000027891if expr a : '\(a\)' >/dev/null 2>&1 &&
27892 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027893 as_expr=expr
27894else
27895 as_expr=false
27896fi
27897
27898rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000027899if test -d conf$$.dir; then
27900 rm -f conf$$.dir/conf$$.file
27901else
27902 rm -f conf$$.dir
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027903 mkdir conf$$.dir
Martin v. Löwiseba40652007-08-30 20:10:57 +000027904fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027905echo >conf$$.file
27906if ln -s conf$$.file conf$$ 2>/dev/null; then
27907 as_ln_s='ln -s'
27908 # ... but there are two gotchas:
27909 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27910 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27911 # In both cases, we have to default to `cp -p'.
27912 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027913 as_ln_s='cp -p'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027914elif ln conf$$.file conf$$ 2>/dev/null; then
27915 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000027916else
27917 as_ln_s='cp -p'
27918fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027919rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27920rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027921
Skip Montanaro6dead952003-09-25 14:50:04 +000027922if mkdir -p . 2>/dev/null; then
27923 as_mkdir_p=:
27924else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027925 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027926 as_mkdir_p=false
27927fi
27928
Martin v. Löwiseba40652007-08-30 20:10:57 +000027929if test -x / >/dev/null 2>&1; then
27930 as_test_x='test -x'
27931else
27932 if ls -dL / >/dev/null 2>&1; then
27933 as_ls_L_option=L
27934 else
27935 as_ls_L_option=
27936 fi
27937 as_test_x='
27938 eval sh -c '\''
27939 if test -d "$1"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027940 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000027941 else
27942 case $1 in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027943 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027944 esac;
27945 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27946 ???[sx]*):;;*)false;;esac;fi
27947 '\'' sh
27948 '
27949fi
27950as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027951
27952# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027953as_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 +000027954
27955# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027956as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027957
27958
Martin v. Löwis11437992002-04-12 09:54:03 +000027959exec 6>&1
27960
Martin v. Löwiseba40652007-08-30 20:10:57 +000027961# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027962# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000027963# values after options handling.
27964ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000027965This file was extended by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027966generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027967
27968 CONFIG_FILES = $CONFIG_FILES
27969 CONFIG_HEADERS = $CONFIG_HEADERS
27970 CONFIG_LINKS = $CONFIG_LINKS
27971 CONFIG_COMMANDS = $CONFIG_COMMANDS
27972 $ $0 $@
27973
Martin v. Löwiseba40652007-08-30 20:10:57 +000027974on `(hostname || uname -n) 2>/dev/null | sed 1q`
27975"
27976
Martin v. Löwis11437992002-04-12 09:54:03 +000027977_ACEOF
27978
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027979cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027980# Files that config.status was made for.
Ronald Oussoren450d5612009-06-08 21:12:41 +000027981config_files="$ac_config_files"
27982config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027983
Martin v. Löwiseba40652007-08-30 20:10:57 +000027984_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027985
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027986cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027987ac_cs_usage="\
27988\`$as_me' instantiates files from templates according to the
27989current configuration.
27990
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027991Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027992
27993 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000027994 -V, --version print version number and configuration settings, then exit
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027995 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000027996 -d, --debug don't remove temporary files
27997 --recheck update $as_me by reconfiguring in the same conditions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027998 --file=FILE[:TEMPLATE]
27999 instantiate the configuration file FILE
28000 --header=FILE[:TEMPLATE]
28001 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000028002
28003Configuration files:
28004$config_files
28005
28006Configuration headers:
28007$config_headers
28008
28009Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000028010
Martin v. Löwiseba40652007-08-30 20:10:57 +000028011_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028012cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028013ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000028014python config.status 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028015configured by $0, generated by GNU Autoconf 2.61,
28016 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000028017
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028018Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000028019This config.status script is free software; the Free Software Foundation
28020gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000028021
28022ac_pwd='$ac_pwd'
28023srcdir='$srcdir'
28024INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000028025_ACEOF
28026
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028027cat >>$CONFIG_STATUS <<\_ACEOF
28028# If no file are specified by the user, then we need to provide default
28029# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000028030ac_need_defaults=:
28031while test $# != 0
28032do
28033 case $1 in
28034 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000028035 ac_option=`expr "X$1" : 'X\([^=]*\)='`
28036 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000028037 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000028038 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028039 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000028040 ac_option=$1
28041 ac_optarg=$2
28042 ac_shift=shift
28043 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028044 esac
28045
Skip Montanaro6dead952003-09-25 14:50:04 +000028046 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000028047 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000028048 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28049 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028050 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028051 echo "$ac_cs_version"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028052 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000028053 debug=: ;;
28054 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000028055 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028056 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000028057 ac_need_defaults=false;;
28058 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000028059 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028060 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000028061 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028062 --he | --h)
28063 # Conflict between --help and --header
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028064 { echo "$as_me: error: ambiguous option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000028065Try \`$0 --help' for more information." >&2
28066 { (exit 1); exit 1; }; };;
28067 --help | --hel | -h )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028068 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000028069 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
28070 | -silent | --silent | --silen | --sile | --sil | --si | --s)
28071 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028072
28073 # This is an error.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028074 -*) { echo "$as_me: error: unrecognized option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000028075Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028076 { (exit 1); exit 1; }; } ;;
28077
Martin v. Löwiseba40652007-08-30 20:10:57 +000028078 *) ac_config_targets="$ac_config_targets $1"
28079 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028080
28081 esac
28082 shift
28083done
28084
Skip Montanaro6dead952003-09-25 14:50:04 +000028085ac_configure_extra_args=
28086
28087if $ac_cs_silent; then
28088 exec 6>/dev/null
28089 ac_configure_extra_args="$ac_configure_extra_args --silent"
28090fi
28091
28092_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028093cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000028094if \$ac_cs_recheck; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028095 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
28096 CONFIG_SHELL=$SHELL
Martin v. Löwiseba40652007-08-30 20:10:57 +000028097 export CONFIG_SHELL
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028098 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000028099fi
28100
Martin v. Löwis11437992002-04-12 09:54:03 +000028101_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028102cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028103exec 5>>config.log
28104{
28105 echo
28106 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
28107## Running $as_me. ##
28108_ASBOX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028109 echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028110} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000028111
Martin v. Löwiseba40652007-08-30 20:10:57 +000028112_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028113cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028114_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028115
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028116cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028117
28118# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000028119for ac_config_target in $ac_config_targets
28120do
Martin v. Löwiseba40652007-08-30 20:10:57 +000028121 case $ac_config_target in
28122 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
28123 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
28124 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
28125 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000028126 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
28127 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028128 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
28129 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000028130 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028131
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028132 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
28133echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028134 { (exit 1); exit 1; }; };;
28135 esac
28136done
28137
Martin v. Löwiseba40652007-08-30 20:10:57 +000028138
Martin v. Löwis11437992002-04-12 09:54:03 +000028139# If the user did not use the arguments to specify the items to instantiate,
28140# then the envvar interface is used. Set only those that are not.
28141# We use the long form for the default assignment because of an extremely
28142# bizarre bug on SunOS 4.1.3.
28143if $ac_need_defaults; then
28144 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
28145 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
28146fi
28147
Skip Montanaro6dead952003-09-25 14:50:04 +000028148# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000028149# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000028150# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000028151# Hook for its removal unless debugging.
28152# Note that there is a small window in which the directory will not be cleaned:
28153# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000028154$debug ||
28155{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028156 tmp=
28157 trap 'exit_status=$?
28158 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
28159' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000028160 trap '{ (exit 1); exit 1; }' 1 2 13 15
28161}
Martin v. Löwis11437992002-04-12 09:54:03 +000028162# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000028163
Martin v. Löwis11437992002-04-12 09:54:03 +000028164{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028165 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000028166 test -n "$tmp" && test -d "$tmp"
28167} ||
28168{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028169 tmp=./conf$$-$RANDOM
28170 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000028171} ||
28172{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028173 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028174 { (exit 1); exit 1; }
28175}
28176
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028177#
28178# Set up the sed scripts for CONFIG_FILES section.
28179#
28180
28181# No need to generate the scripts if there are no CONFIG_FILES.
28182# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000028183if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000028184
28185_ACEOF
28186
Martin v. Löwiseba40652007-08-30 20:10:57 +000028187
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028188
Martin v. Löwiseba40652007-08-30 20:10:57 +000028189ac_delim='%!_!# '
28190for ac_last_try in false false false false false :; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028191 cat >conf$$subs.sed <<_ACEOF
28192SHELL!$SHELL$ac_delim
28193PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
28194PACKAGE_NAME!$PACKAGE_NAME$ac_delim
28195PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
28196PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
28197PACKAGE_STRING!$PACKAGE_STRING$ac_delim
28198PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
28199exec_prefix!$exec_prefix$ac_delim
28200prefix!$prefix$ac_delim
28201program_transform_name!$program_transform_name$ac_delim
28202bindir!$bindir$ac_delim
28203sbindir!$sbindir$ac_delim
28204libexecdir!$libexecdir$ac_delim
28205datarootdir!$datarootdir$ac_delim
28206datadir!$datadir$ac_delim
28207sysconfdir!$sysconfdir$ac_delim
28208sharedstatedir!$sharedstatedir$ac_delim
28209localstatedir!$localstatedir$ac_delim
28210includedir!$includedir$ac_delim
28211oldincludedir!$oldincludedir$ac_delim
28212docdir!$docdir$ac_delim
28213infodir!$infodir$ac_delim
28214htmldir!$htmldir$ac_delim
28215dvidir!$dvidir$ac_delim
28216pdfdir!$pdfdir$ac_delim
28217psdir!$psdir$ac_delim
28218libdir!$libdir$ac_delim
28219localedir!$localedir$ac_delim
28220mandir!$mandir$ac_delim
28221DEFS!$DEFS$ac_delim
28222ECHO_C!$ECHO_C$ac_delim
28223ECHO_N!$ECHO_N$ac_delim
28224ECHO_T!$ECHO_T$ac_delim
28225LIBS!$LIBS$ac_delim
28226build_alias!$build_alias$ac_delim
28227host_alias!$host_alias$ac_delim
28228target_alias!$target_alias$ac_delim
28229VERSION!$VERSION$ac_delim
28230SOVERSION!$SOVERSION$ac_delim
28231CONFIG_ARGS!$CONFIG_ARGS$ac_delim
28232UNIVERSALSDK!$UNIVERSALSDK$ac_delim
28233ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Ronald Oussoren92919a62009-12-24 13:30:58 +000028234LIPO_32BIT_FLAGS!$LIPO_32BIT_FLAGS$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028235PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
28236PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
28237PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
28238PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
28239PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
28240FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
28241FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
28242FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
28243FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
28244FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
28245MACHDEP!$MACHDEP$ac_delim
28246SGI_ABI!$SGI_ABI$ac_delim
28247EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
28248EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
28249CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
28250EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
28251CC!$CC$ac_delim
28252CFLAGS!$CFLAGS$ac_delim
28253LDFLAGS!$LDFLAGS$ac_delim
28254CPPFLAGS!$CPPFLAGS$ac_delim
28255ac_ct_CC!$ac_ct_CC$ac_delim
28256EXEEXT!$EXEEXT$ac_delim
28257OBJEXT!$OBJEXT$ac_delim
28258CXX!$CXX$ac_delim
28259MAINCC!$MAINCC$ac_delim
28260CPP!$CPP$ac_delim
28261GREP!$GREP$ac_delim
28262EGREP!$EGREP$ac_delim
28263BUILDEXEEXT!$BUILDEXEEXT$ac_delim
28264LIBRARY!$LIBRARY$ac_delim
28265LDLIBRARY!$LDLIBRARY$ac_delim
28266DLLLIBRARY!$DLLLIBRARY$ac_delim
28267BLDLIBRARY!$BLDLIBRARY$ac_delim
28268LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
28269INSTSONAME!$INSTSONAME$ac_delim
28270RUNSHARED!$RUNSHARED$ac_delim
28271LINKCC!$LINKCC$ac_delim
28272GNULD!$GNULD$ac_delim
28273RANLIB!$RANLIB$ac_delim
28274AR!$AR$ac_delim
28275ARFLAGS!$ARFLAGS$ac_delim
28276SVNVERSION!$SVNVERSION$ac_delim
28277INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
28278INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
28279INSTALL_DATA!$INSTALL_DATA$ac_delim
28280LN!$LN$ac_delim
28281OPT!$OPT$ac_delim
28282BASECFLAGS!$BASECFLAGS$ac_delim
28283UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
28284OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
28285LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
28286SO!$SO$ac_delim
28287LDSHARED!$LDSHARED$ac_delim
28288BLDSHARED!$BLDSHARED$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028289_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028290
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028291 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 +000028292 break
28293 elif $ac_last_try; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028294 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28295echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028296 { (exit 1); exit 1; }; }
28297 else
28298 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000028299 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000028300done
28301
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028302ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28303if test -n "$ac_eof"; then
28304 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28305 ac_eof=`expr $ac_eof + 1`
28306fi
28307
28308cat >>$CONFIG_STATUS <<_ACEOF
28309cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
28310/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000028311_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028312sed '
28313s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28314s/^/s,@/; s/!/@,|#_!!_#|/
28315:n
28316t n
28317s/'"$ac_delim"'$/,g/; t
28318s/$/\\/; p
28319N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28320' >>$CONFIG_STATUS <conf$$subs.sed
28321rm -f conf$$subs.sed
28322cat >>$CONFIG_STATUS <<_ACEOF
28323CEOF$ac_eof
Martin v. Löwiseba40652007-08-30 20:10:57 +000028324_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028325
28326
28327ac_delim='%!_!# '
28328for ac_last_try in false false false false false :; do
28329 cat >conf$$subs.sed <<_ACEOF
Ronald Oussoren92919a62009-12-24 13:30:58 +000028330CCSHARED!$CCSHARED$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028331LINKFORSHARED!$LINKFORSHARED$ac_delim
28332CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
28333SHLIBS!$SHLIBS$ac_delim
28334USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
28335SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
28336USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
28337LDLAST!$LDLAST$ac_delim
28338THREADOBJ!$THREADOBJ$ac_delim
28339DLINCLDIR!$DLINCLDIR$ac_delim
28340DYNLOADFILE!$DYNLOADFILE$ac_delim
28341MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
28342TRUE!$TRUE$ac_delim
28343LIBOBJS!$LIBOBJS$ac_delim
28344HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
28345HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
28346HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
28347HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
28348HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
28349LIBM!$LIBM$ac_delim
28350LIBC!$LIBC$ac_delim
28351UNICODE_OBJS!$UNICODE_OBJS$ac_delim
28352THREADHEADERS!$THREADHEADERS$ac_delim
28353SRCDIRS!$SRCDIRS$ac_delim
28354LTLIBOBJS!$LTLIBOBJS$ac_delim
28355_ACEOF
28356
Ronald Oussoren92919a62009-12-24 13:30:58 +000028357 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 25; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028358 break
28359 elif $ac_last_try; then
28360 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28361echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028362 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028363 else
28364 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28365 fi
28366done
28367
28368ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28369if test -n "$ac_eof"; then
28370 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28371 ac_eof=`expr $ac_eof + 1`
28372fi
28373
28374cat >>$CONFIG_STATUS <<_ACEOF
28375cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
28376/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Martin v. Löwiseba40652007-08-30 20:10:57 +000028377_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028378sed '
28379s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28380s/^/s,@/; s/!/@,|#_!!_#|/
28381:n
28382t n
28383s/'"$ac_delim"'$/,g/; t
28384s/$/\\/; p
28385N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28386' >>$CONFIG_STATUS <conf$$subs.sed
28387rm -f conf$$subs.sed
28388cat >>$CONFIG_STATUS <<_ACEOF
28389:end
28390s/|#_!!_#|//g
28391CEOF$ac_eof
28392_ACEOF
28393
Martin v. Löwiseba40652007-08-30 20:10:57 +000028394
28395# VPATH may cause trouble with some makes, so we remove $(srcdir),
28396# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28397# trailing colons and then remove the whole line if VPATH becomes empty
28398# (actually we leave an empty line to preserve line numbers).
28399if test "x$srcdir" = x.; then
28400 ac_vpsub='/^[ ]*VPATH[ ]*=/{
28401s/:*\$(srcdir):*/:/
28402s/:*\${srcdir}:*/:/
28403s/:*@srcdir@:*/:/
28404s/^\([^=]*=[ ]*\):*/\1/
28405s/:*$//
28406s/^[^=]*=[ ]*$//
28407}'
28408fi
28409
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028410cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028411fi # test -n "$CONFIG_FILES"
28412
Martin v. Löwiseba40652007-08-30 20:10:57 +000028413
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028414for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Martin v. Löwiseba40652007-08-30 20:10:57 +000028415do
28416 case $ac_tag in
28417 :[FHLC]) ac_mode=$ac_tag; continue;;
28418 esac
28419 case $ac_mode$ac_tag in
28420 :[FHL]*:*);;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028421 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
28422echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028423 { (exit 1); exit 1; }; };;
28424 :[FH]-) ac_tag=-:-;;
28425 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28426 esac
28427 ac_save_IFS=$IFS
28428 IFS=:
28429 set x $ac_tag
28430 IFS=$ac_save_IFS
28431 shift
28432 ac_file=$1
28433 shift
28434
28435 case $ac_mode in
28436 :L) ac_source=$1;;
28437 :[FH])
28438 ac_file_inputs=
28439 for ac_f
28440 do
28441 case $ac_f in
28442 -) ac_f="$tmp/stdin";;
28443 *) # Look for the file first in the build tree, then in the source tree
28444 # (if the path is not absolute). The absolute path cannot be DOS-style,
28445 # because $ac_f cannot contain `:'.
28446 test -f "$ac_f" ||
28447 case $ac_f in
28448 [\\/$]*) false;;
28449 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28450 esac ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028451 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
28452echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028453 { (exit 1); exit 1; }; };;
28454 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028455 ac_file_inputs="$ac_file_inputs $ac_f"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028456 done
28457
28458 # Let's still pretend it is `configure' which instantiates (i.e., don't
28459 # use $as_me), people would be surprised to read:
28460 # /* config.h. Generated by config.status. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028461 configure_input="Generated from "`IFS=:
28462 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Martin v. Löwiseba40652007-08-30 20:10:57 +000028463 if test x"$ac_file" != x-; then
28464 configure_input="$ac_file. $configure_input"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028465 { echo "$as_me:$LINENO: creating $ac_file" >&5
28466echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028467 fi
28468
28469 case $ac_tag in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028470 *:-:* | *:-) cat >"$tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028471 esac
28472 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028473 esac
28474
Martin v. Löwiseba40652007-08-30 20:10:57 +000028475 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028476$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028477 X"$ac_file" : 'X\(//\)[^/]' \| \
28478 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000028479 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028480echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028481 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28482 s//\1/
28483 q
28484 }
28485 /^X\(\/\/\)[^/].*/{
28486 s//\1/
28487 q
28488 }
28489 /^X\(\/\/\)$/{
28490 s//\1/
28491 q
28492 }
28493 /^X\(\/\).*/{
28494 s//\1/
28495 q
28496 }
28497 s/.*/./; q'`
28498 { as_dir="$ac_dir"
28499 case $as_dir in #(
28500 -*) as_dir=./$as_dir;;
28501 esac
28502 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000028503 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000028504 while :; do
28505 case $as_dir in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028506 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Martin v. Löwiseba40652007-08-30 20:10:57 +000028507 *) as_qdir=$as_dir;;
28508 esac
28509 as_dirs="'$as_qdir' $as_dirs"
28510 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000028511$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028512 X"$as_dir" : 'X\(//\)[^/]' \| \
28513 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000028514 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028515echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028516 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28517 s//\1/
28518 q
28519 }
28520 /^X\(\/\/\)[^/].*/{
28521 s//\1/
28522 q
28523 }
28524 /^X\(\/\/\)$/{
28525 s//\1/
28526 q
28527 }
28528 /^X\(\/\).*/{
28529 s//\1/
28530 q
28531 }
28532 s/.*/./; q'`
28533 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000028534 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000028535 test -z "$as_dirs" || eval "mkdir $as_dirs"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028536 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
28537echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000028538 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028539 ac_builddir=.
28540
Martin v. Löwiseba40652007-08-30 20:10:57 +000028541case "$ac_dir" in
28542.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28543*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028544 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028545 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028546 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028547 case $ac_top_builddir_sub in
28548 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28549 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28550 esac ;;
28551esac
28552ac_abs_top_builddir=$ac_pwd
28553ac_abs_builddir=$ac_pwd$ac_dir_suffix
28554# for backward compatibility:
28555ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000028556
28557case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028558 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000028559 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000028560 ac_top_srcdir=$ac_top_builddir_sub
28561 ac_abs_top_srcdir=$ac_pwd ;;
28562 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000028563 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028564 ac_top_srcdir=$srcdir
28565 ac_abs_top_srcdir=$srcdir ;;
28566 *) # Relative name.
28567 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28568 ac_top_srcdir=$ac_top_build_prefix$srcdir
28569 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028570esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028571ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000028572
Martin v. Löwis11437992002-04-12 09:54:03 +000028573
Martin v. Löwiseba40652007-08-30 20:10:57 +000028574 case $ac_mode in
28575 :F)
28576 #
28577 # CONFIG_FILE
28578 #
Martin v. Löwis11437992002-04-12 09:54:03 +000028579
28580 case $INSTALL in
28581 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028582 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028583 esac
Brett Cannon19fab762007-06-02 03:02:29 +000028584_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028585
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028586cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028587# If the template does not know about datarootdir, expand it.
28588# FIXME: This hack should be removed a few years after 2.60.
28589ac_datarootdir_hack=; ac_datarootdir_seen=
28590
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028591case `sed -n '/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000028592 p
28593 q
28594}
28595/@datadir@/p
28596/@docdir@/p
28597/@infodir@/p
28598/@localedir@/p
28599/@mandir@/p
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028600' $ac_file_inputs` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028601*datarootdir*) ac_datarootdir_seen=yes;;
28602*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028603 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28604echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028605_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028606cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028607 ac_datarootdir_hack='
28608 s&@datadir@&$datadir&g
28609 s&@docdir@&$docdir&g
28610 s&@infodir@&$infodir&g
28611 s&@localedir@&$localedir&g
28612 s&@mandir@&$mandir&g
28613 s&\\\${datarootdir}&$datarootdir&g' ;;
28614esac
28615_ACEOF
28616
28617# Neutralize VPATH when `$srcdir' = `.'.
28618# Shell code in configure.ac might set extrasub.
28619# FIXME: do we really want to maintain this feature?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028620cat >>$CONFIG_STATUS <<_ACEOF
28621 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028622$extrasub
28623_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028624cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028625:t
28626/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028627s&@configure_input@&$configure_input&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000028628s&@top_builddir@&$ac_top_builddir_sub&;t t
28629s&@srcdir@&$ac_srcdir&;t t
28630s&@abs_srcdir@&$ac_abs_srcdir&;t t
28631s&@top_srcdir@&$ac_top_srcdir&;t t
28632s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28633s&@builddir@&$ac_builddir&;t t
28634s&@abs_builddir@&$ac_abs_builddir&;t t
28635s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28636s&@INSTALL@&$ac_INSTALL&;t t
28637$ac_datarootdir_hack
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028638" $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 +000028639
Martin v. Löwiseba40652007-08-30 20:10:57 +000028640test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28641 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28642 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028643 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028644which seems to be undefined. Please make sure it is defined." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028645echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028646which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028647
Martin v. Löwiseba40652007-08-30 20:10:57 +000028648 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028649 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028650 -) cat "$tmp/out"; rm -f "$tmp/out";;
28651 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
28652 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028653 ;;
28654 :H)
28655 #
28656 # CONFIG_HEADER
28657 #
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028658_ACEOF
28659
28660# Transform confdefs.h into a sed script `conftest.defines', that
28661# substitutes the proper values into config.h.in to produce config.h.
28662rm -f conftest.defines conftest.tail
28663# First, append a space to every undef/define line, to ease matching.
28664echo 's/$/ /' >conftest.defines
28665# Then, protect against being on the right side of a sed subst, or in
28666# an unquoted here document, in config.status. If some macros were
28667# called several times there might be several #defines for the same
28668# symbol, which is useless. But do not sort them, since the last
28669# AC_DEFINE must be honored.
28670ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28671# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
28672# NAME is the cpp macro being defined, VALUE is the value it is being given.
28673# PARAMS is the parameter list in the macro definition--in most cases, it's
28674# just an empty string.
28675ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
28676ac_dB='\\)[ (].*,\\1define\\2'
28677ac_dC=' '
28678ac_dD=' ,'
28679
28680uniq confdefs.h |
28681 sed -n '
28682 t rset
28683 :rset
28684 s/^[ ]*#[ ]*define[ ][ ]*//
28685 t ok
28686 d
28687 :ok
28688 s/[\\&,]/\\&/g
28689 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
28690 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
28691 ' >>conftest.defines
28692
28693# Remove the space that was appended to ease matching.
28694# Then replace #undef with comments. This is necessary, for
28695# example, in the case of _POSIX_SOURCE, which is predefined and required
28696# on some systems where configure will not decide to define it.
28697# (The regexp can be short, since the line contains either #define or #undef.)
28698echo 's/ $//
28699s,^[ #]*u.*,/* & */,' >>conftest.defines
28700
28701# Break up conftest.defines:
28702ac_max_sed_lines=50
28703
28704# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28705# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28706# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28707# et cetera.
28708ac_in='$ac_file_inputs'
28709ac_out='"$tmp/out1"'
28710ac_nxt='"$tmp/out2"'
28711
28712while :
28713do
28714 # Write a here document:
28715 cat >>$CONFIG_STATUS <<_ACEOF
28716 # First, check the format of the line:
28717 cat >"\$tmp/defines.sed" <<\\CEOF
28718/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
28719/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
28720b
28721:def
28722_ACEOF
28723 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
28724 echo 'CEOF
28725 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
28726 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
28727 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
28728 grep . conftest.tail >/dev/null || break
28729 rm -f conftest.defines
28730 mv conftest.tail conftest.defines
28731done
28732rm -f conftest.defines conftest.tail
28733
28734echo "ac_result=$ac_in" >>$CONFIG_STATUS
28735cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028736 if test x"$ac_file" != x-; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028737 echo "/* $configure_input */" >"$tmp/config.h"
28738 cat "$ac_result" >>"$tmp/config.h"
28739 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
28740 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28741echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028742 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028743 rm -f $ac_file
28744 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000028745 fi
28746 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028747 echo "/* $configure_input */"
28748 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000028749 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028750 rm -f "$tmp/out12"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028751 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000028752
Martin v. Löwiseba40652007-08-30 20:10:57 +000028753
28754 esac
28755
28756done # for ac_tag
28757
Guido van Rossum627b2d71993-12-24 10:39:16 +000028758
Martin v. Löwis11437992002-04-12 09:54:03 +000028759{ (exit 0); exit 0; }
28760_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028761chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000028762ac_clean_files=$ac_clean_files_save
28763
28764
28765# configure is writing to config.log, and then calls config.status.
28766# config.status does its own redirection, appending to config.log.
28767# Unfortunately, on DOS this fails, as config.log is still kept open
28768# by configure, so config.status won't be able to write to it; its
28769# output is simply discarded. So we exec the FD to /dev/null,
28770# effectively closing config.log, so it can be properly (re)opened and
28771# appended to by config.status. When coming back to configure, we
28772# need to make the FD available again.
28773if test "$no_create" != yes; then
28774 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000028775 ac_config_status_args=
28776 test "$silent" = yes &&
28777 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000028778 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000028779 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000028780 exec 5>>config.log
28781 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28782 # would make configure fail if this is the last instruction.
28783 $ac_cs_success || { (exit 1); exit 1; }
28784fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000028785
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028786
Martin v. Löwisf7afe952006-04-14 15:16:15 +000028787echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028788if test ! -f Modules/Setup
28789then
28790 cp $srcdir/Modules/Setup.dist Modules/Setup
28791fi
28792
Martin v. Löwisf7afe952006-04-14 15:16:15 +000028793echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028794if test ! -f Modules/Setup.local
28795then
28796 echo "# Edit this file for local setup changes" >Modules/Setup.local
28797fi
28798
28799echo "creating Makefile"
28800$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
28801 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000028802 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000028803
28804case $ac_sys_system in
28805BeOS)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028806 { echo "$as_me:$LINENO: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000028807
28808 Support for BeOS is deprecated as of Python 2.6.
28809 See PEP 11 for the gory details.
28810 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028811echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000028812
28813 Support for BeOS is deprecated as of Python 2.6.
28814 See PEP 11 for the gory details.
28815 " >&2;}
28816 ;;
28817*) ;;
28818esac
28819
Neil Schemenauerc761fc82001-02-19 04:50:49 +000028820mv config.c Modules